Open llvmbot opened 8 years ago
Hi all,
copying from the Mageia bug tracker:
One workaround I found for this bug today (thanks in part to this stackoverflow thread - http://stackoverflow.com/questions/4160262/clang-linker-problem#4160340 ) is to set these environment variables (e.g: by sourcing the code from Bash):
« export COMPILER_PATH=/usr/lib/gcc/x86_64-mageia-linux-gnu/5.3.1/ export LIBRARY_PATH="$COMPILER_PATH" »
after doing that, the Hello World program compiles and I was able to get Freecell Solver to build and pass its tests' suite using /usr/bin/clang.
Today I built llvm and clang from their 3.8.0 sources under /opt/llvm using the same build scripts - on a Debian Jessie x86-64 VM - and /opt/llvm/bin/clang compiled the Hello World perfectly fine.
Extended Description
Hi all,
I previously reported a similar bug (with the Mageia Linux packages) here - https://bugs.mageia.org/show_bug.cgi?id=18138 . Anyway, building llvm and then clang from source using this bash script:
!/bin/bash
b='/opt/llvm' export PATH="$b/bin:$PATH" export PKG_CONFIG_PATH="$b/lib64/pkgconfig:$b/lib/pkgconfig:$PKG_CONFIG_PATH" cmake -DCMAKE_BUILD_TYPE="release" -DCMAKE_INSTALL_PREFIX="$b" "$@"
And doing "make -j4 ; make -j4 check ; make -j4 install" and then running clang from /opt/llvm on the hello world program results in an error (at least here on Mageia Linux x86-64 v6):
< SHELL > shlomif@telaviv1 C/snippets/shlomif-c-snippets $ cat hello_world.c /*
include
int main(void) { printf ("%s\n", "Hello World!");
} shlomif@telaviv1 C/snippets/shlomif-c-snippets $ /opt/llvm/bin/clang hello_world.c /..//bin/ld: cannot find crtbegin.o: No such file or directory /..//bin/ld: cannot find -lgcc clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation) shlomif@telaviv1 C/snippets/shlomif-c-snippets $ < / SHELL >
I'll attach the strace output of clang soon.