www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - LDC build not found for -lclang:

reply Newbie2019 <newbie2019 gmail.com> writes:
I try build ldc master branch with llvm clone from 
https://github.com/ldc-developers/llvm.git

get this error,  not sure where I am doing wrong, there link 
command seems not correct:

clang++  -DDMDV2 -DHAVE_SC_ARG_MAX -O3 -DNDEBUG -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
DKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names 
obj/ldc-build-runtime.o  -o bin/ldc-build-runtime  -lclang: -lcd -l&&
/usr/bin/clang -fomit-frame-pointer -pipe -O0 -L/opt/local/bin/../lib
-lphobos2-ldc -ldruntime-ldc -ldl -lpthread -lm -m64 && :


```sh
[1/56] : && clang++  -DDMDV2 -DHAVE_SC_ARG_MAX -O3 -DNDEBUG 
-isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
DKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names 
obj/ldc-build-runtime.o  -o bin/ldc-build-runtime  -lclang: -lcd -l&&
/usr/bin/clang -fomit-frame-pointer -pipe -O0 -L/opt/local/bin/../lib
-lphobos2-ldc -ldruntime-ldc -ldl -lpthread -lm -m64 && :
FAILED: bin/ldc-build-runtime
: && clang++  -DDMDV2 -DHAVE_SC_ARG_MAX -O3 -DNDEBUG -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
DKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names 
obj/ldc-build-runtime.o  -o bin/ldc-build-runtime  -lclang: -lcd -l&&
/usr/bin/clang -fomit-frame-pointer -pipe -O0 -L/opt/local/bin/../lib
-lphobos2-ldc -ldruntime-ldc -ldl -lpthread -lm -m64 && :
ld: library not found for -lclang:
clang: error: linker command failed with exit code 1 (use -v to 
see invocation)
ninja: build stopped: subcommand failed.
```
Oct 18 2019
parent reply Newbie2019 <newbie2019 gmail.com> writes:
On Saturday, 19 October 2019 at 03:57:08 UTC, Newbie2019 wrote:
 I try build ldc master branch with llvm clone from 
 https://github.com/ldc-developers/llvm.git

 get this error,  not sure where I am doing wrong, there link 
 command seems not correct:

 clang++  -DDMDV2 -DHAVE_SC_ARG_MAX -O3 -DNDEBUG -isysroot
some how the $LINK_LIBRARIES is set to "-lclang: -lcd -l&& /usr/bin/clang -fomit-frame-pointer -pipe -O0 -L/opt/local/bin/../lib -lphobos2-ldc -ldruntime-ldc -ldl -lpthread -lm -m64" how should I fix this ?
Oct 18 2019
parent Newbie2019 <newbie2019 gmail.com> writes:
On Saturday, 19 October 2019 at 04:13:35 UTC, Newbie2019 wrote:
 On Saturday, 19 October 2019 at 03:57:08 UTC, Newbie2019 wrote:
 I try build ldc master branch with llvm clone from 
 https://github.com/ldc-developers/llvm.git

 get this error,  not sure where I am doing wrong, there link 
 command seems not correct:

 clang++  -DDMDV2 -DHAVE_SC_ARG_MAX -O3 -DNDEBUG -isysroot
some how the $LINK_LIBRARIES is set to "-lclang: -lcd -l&& /usr/bin/clang -fomit-frame-pointer -pipe -O0 -L/opt/local/bin/../lib -lphobos2-ldc -ldruntime-ldc -ldl -lpthread -lm -m64" how should I fix this ?
I find the issue and fixed it, because I use a shell to proxy ldc for debug, so the ExtractDMDSystemLinker get the extra symbols.
Oct 18 2019