Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

attempted to build llvm again using formerly built llvm #23754

Open Quuxplusone opened 9 years ago

Quuxplusone commented 9 years ago
Bugzilla Link PR23755
Status NEW
Importance P normal
Reported by goochmi@gmail.com
Reported on 2015-06-04 01:02:00 -0700
Last modified on 2015-06-04 02:56:04 -0700
Version 3.6
Hardware PC Linux
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
downloaded sources for 3.6.1
extracted the tarballs
clang extra tools was symlinked into the clang source tree as tools/extra
clang was symlinked into llvm source tree as tools/clang
lld was symlinked into llvm source tree as tools/lld
compiler-rt was symlinked into llvm source tree as projects/compiler-rt
libcxx was symlinked into llvm source tree as projects/libcxx
libcxxabi was symlinked into llvm source tree as projects/libcxxabi

I built this once using GCC and libstdc++.

I was hoping to build it again using the now available clang/clang++ and
libc++/libc++abi, but when I attempt this, various executable linking stages
fail claiming they can't find __cxa_guard_acquire, __cxa_guard_release, and
__cxa_pure_virtual

this seems to indicate something isn't being linked against libc++, or that
libc++ lacks those symbols/targets for some reason.

it is ENTIRELY possible that I did something incorrectly with my former build
or setup or that I am doing something incorrectly this time.

the command for cmake would be something like this correct?:

cmake /path/to/llvm/source/tree \
-DCMAKE_INSTALL_PREFIX=/UCHC/HPC/Gooch/biotoolmodules/llvm_suite/3.6.1 \
-DCMAKE_C_COMPILER=/UCHC/HPC/Gooch/biotoolmodules/llvm_suite/3.6.1/bin/clang \
-
DCMAKE_CXX_COMPILER=/UCHC/HPC/Gooch/biotoolmodules/llvm_suite/3.6.1/bin/clang++
\
-DLLVM_ENABLE_LIBCXX=1 \
-DLIBCXX_CXX_ABI=libcxxabi

if not, what am I missing?
Quuxplusone commented 9 years ago
-bash-4.1$ nm -Ca /UCHC/HPC/Gooch/biotoolmodules/llvm_suite/3.6.1/lib/libc++.so
| grep pure
                 U __cxa_pure_virtual
-bash-4.1$ nm -Ca
/UCHC/HPC/Gooch/biotoolmodules/llvm_suite/3.6.1/lib/libc++abi.so | grep pure
00000000000633d7 T __cxa_pure_virtual

-bash-4.1$ nm -Ca
/UCHC/HPC/Gooch/biotoolmodules/llvm_suite/3.6.1/lib/libc++abi.so | grep
cxa_guard
0000000000060f83 T __cxa_guard_abort
0000000000060e05 T __cxa_guard_acquire
0000000000000000 a cxa_guard.cpp
0000000000060eeb T __cxa_guard_release
-bash-4.1$ nm -Ca /UCHC/HPC/Gooch/biotoolmodules/llvm_suite/3.6.1/lib/libc++.so
| grep cxa_guard
                 U __cxa_guard_abort
                 U __cxa_guard_acquire
                 U __cxa_guard_release

it appears that the linker isn't including the abi library in its link commands.
Quuxplusone commented 9 years ago
during build attempt i noticed the following lines:
Linking CXX shared library ../../../lib/libc++.so
clang-3.6: warning: argument unused during compilation: '-stdlib=libc++'

shouldn't it be linking against libc++abi?
Quuxplusone commented 9 years ago
i noticed a few of the .so files and executables showing the following in their
ldd output:
    libstdc++.so.6 =>
/UCHC/HPC/Gooch/biotoolmodules/gcc/5.1.0/lib64/libstdc++.so.6
(0x00007ffa30c40000)
    libgcc_s.so.1 => /UCHC/HPC/Gooch/biotoolmodules/gcc/5.1.0/lib64/libgcc_s.so.1
(0x00007ffa30a28000)

is it realistic to expect to build a functional llvm with no dependencies on
gcc or gnu's libstdc++?