clasp-developers / clasp

clasp Common Lisp environment
https://clasp-developers.github.io/
2.56k stars 144 forks source link

koga/units.lisp fails to find clang and clang++ #1353

Open Ambrevar opened 2 years ago

Ambrevar commented 2 years ago

On some distros like Guix clang may not be in the llvm-bindir. Then Koga fails to set cc and cxx.

Easy fix:

(setf cxx (configure-program "cxx"
                                 (or cxx
                                     (merge-pathnames #P"clang++" llvm-bindir)
                                     "clang++")
                                 :required t))

Similar for cc.

yitzchak commented 2 years ago

This isn't really a bug, but a configuration variation. If you need to specifiy the path to clang you can do it on the koga command line via ./koga --cxx=path-to-cxx --cc=path-to-cc or create a config.sexp with (:cc "bla" :cxx "baz")

Ambrevar commented 2 years ago

Fair enough, but Koga could fallback to the compiler basename by default so that it's found in the PATH.

yitzchak commented 2 years ago

Well, maybe but we will need to do some version verification at a minimum. Our clang binary & library detection is a bit weak right now. Its on my todo list to improve it,