clay icon indicating copy to clipboard operation
clay copied to clipboard

-run linker search paths differ from clang linker

Open galchinsky opened this issue 12 years ago • 4 comments

main.clay:

external curl_easy_init(): OpaquePointer;
main() {
    curl_easy_init();
}
  • clay main.clay -lcurl works
  • clay main.clay -lcurl -run don't: clay: error: Cannot find library 'curl.so'
  • clay main.clay -run -L/usr/lib/x86_64-linux-gnu -lcurl works

galchinsky avatar Nov 26 '12 22:11 galchinsky

-run linker's search paths are

./
/usr/local/lib
/usr/local/lib/
/usr/X11R6/lib/
/usr/lib/
/lib/

galchinsky avatar Nov 26 '12 22:11 galchinsky

Cannot reproduce this issue on Archlinux or OSX with llvm-3.2 & clay/master.

ghost avatar Jan 07 '13 18:01 ghost

It could have been fixed at the LLVM level in 3.2.

jckarter avatar Jan 07 '13 19:01 jckarter

llvm-3.2 & clay/master: Now even $ clay test.clay -run -L/usr/lib/x86_64-linux-gnu -lcurl doesn't work: Couldn't load shared library curl

$ clay test.clay -run -L/usr/lib/x86_64-linux-gnu -lcurl.so : works. runLibraries in clay.cpp hasn't been properly coded yet.

galchinsky avatar Jan 08 '13 10:01 galchinsky