VScode Julia server fails precompilation

The OS is 10.14.6 (Mojave).

and the command returns this:

geo145:~ imac$ echo 'int main(void) { return 0; }' | clang -x c -o main.o -
geo145:~ imac$ /Applications/Julia-1.10.app/Contents/Resources/julia/libexec/julia/lld -flavor darwin -arch x86_64 -o main main.o
dyld: Library not loaded: @rpath/libLLVM.dylib
  Referenced from: /Applications/Julia-1.10.app/Contents/Resources/julia/libexec/julia/lld
  Reason: image not found
Abort trap: 6

Right, sorry, we need to set DYLD_FALLBACK_LIBRARY_PATH, could you please try

echo 'int main(void) { return 0; }' | clang -x c -o main.o -
DYLD_FALLBACK_LIBRARY_PATH="/Applications/Julia-1.10.app/Contents/Resources/julia/lib/julia:/Applications/Julia-1.10.app/Contents/Resources/julia/lib" /Applications/Julia-1.10.app/Contents/Resources/julia/libexec/julia/lld -flavor darwin -arch x86_64 -platform_version macos 13.3.1 13.3 -o main main.o

It also produces “image not found”

geo145:~ imac$ echo 'int main(void) { return 0; }' | clang -x c -o main.o -
geo145:~ imac$ DYLD_FALLBACK_LIBRARY_PATH="/Applications/Julia-1.10.app/Contents/Resources/julia/lib/julia:/Applications/Julia-1.10.app/Contents/Resources/julia/lib" /Applications/Julia-1.10.app/Contents/Resources/julia/libexec/julia/lld -flavor darwin -arch x86_64 -o main main.o
dyld: Library not loaded: @rpath/libLLVM.dylib
  Referenced from: /Applications/Julia-1.10.app/Contents/Resources/julia/libexec/julia/lld
  Reason: image not found
Abort trap: 6

Uhm, do you have SIP enabled? Can you try to temporary disable it following the instructions at Disabling and Enabling System Integrity Protection | Apple Developer Documentation and try again? Edit: but lld shouldn’t fall inside SIP cover, so I’m not sure it’s that one.

Problem solved after updating to OS Catalina (10.15).

1 Like

I had a similar problem. VSCode was unable to open the precompiled LanguageServer package. It was resolved by uninstalling the Julia extension in VSCode, the quitting VSCode, then starting it again and reinstalling the extension.

1 Like