clojure-emacs / clojure-ts-mode

The next generation Clojure major mode for Emacs, powered by TreeSitter
GNU General Public License v3.0
129 stars 11 forks source link

Update macOS compile from source directions #27

Closed luandy64 closed 8 months ago

luandy64 commented 9 months ago

Running the instructions before this change resulted in the following error

$ mkdir -p dist
$ cc -c -I./src src/parser.c -o "parser.o"
cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.dylib"
$ cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.dylib"
clang: error: no such file or directory: 'src/parser.o'
clang: error: no input files

Before submitting a PR mark the checkboxes for the items you've done (if you think a checkbox does not apply, then leave it unchecked):

Thanks!

luandy64 commented 8 months ago

Closing for inactivity

sogaiu commented 8 months ago

A similar thing may apply to the current Linux instructions:

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"

There's another way the instructions could be tweaked, which is to output to the current directory instead of under src, though may be that's kind of an odd thing to do.

In any case, perhaps it would be better if both sets of instructions were updated.

A peripheral remark to maintainers -- don't know if it's worth mentioning in the README but I think it's possible to build an appropriate shared library using tree-sitter-module.


On a side note, it doesn't seem so useful to me to close this PR as having it open might make it easier to locate for folks who have encoutered a similar situation or are interested in knowing what kinds of PRs are in the pipeline.

Though may be it's more useful for there to be an issue at this point...

Update: I've made https://github.com/clojure-emacs/clojure-ts-mode/issues/29