Skip to content

Some paths in "Compile From Source" are off a bit #29

Closed
@sogaiu

Description

@sogaiu

As pointed out in #27, some paths for the "Compile From Source" instructions are off for both Linux and macOS.

For example, for Linux I currently see:

mkdir -p dist
cc -c -I./src src/parser.c -o "parser.o"
cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.so"

The second cc invocation refers to a .o that's not likely to exist from just following the instructions. Likely to lead to a better result might be:

mkdir -p dist
cc -c -I./src src/parser.c -o "src/parser.o"
cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.so"

That is, have the first cc invocation put the .o file in the src subdirectory.

A similar situation holds for the current macOS instructions.

One way to amend those might be:

mkdir -p dist
cc -c -I./src src/parser.c -o "src/parser.o"
cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.dylib"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions