Problems with compiling ROOT 6.12.06

Dear all,

I want to build ROOT 6 from the ROOT repository on a Banana Pi R2 (ARM Cortex-A7). I have tried it the way described here. Unfortunately I got a lot of errors with undefined references to ‘memcpy’, ‘memmove’, ‘free’, etc. during the linking process. Does anyone know how to resolve this problem?

Thanks,
William


Device: Banana Pi BPi-R2
Platform: Debian 9 (stretch)
Compiler: gcc 6.3.0


Output ‘make’ (shortened):

(...)

[ 30%] Built target LLVMSupport
[ 30%] Built target LLVMTableGen
[ 30%] Linking CXX executable ../../bin/llvm-tblgen
/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/Scrt1.o: In function `_start':
(.text+0x30): undefined reference to `__libc_start_main'
/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/Scrt1.o: In function `_start':
(.text+0x34): undefined reference to `abort'
/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/Scrt1.o: In function `_start':
(.text+0x3c): undefined reference to `__libc_csu_fini'
/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/Scrt1.o: In function `_start':
(.text+0x40): undefined reference to `__libc_csu_init'
CMakeFiles/obj.llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o: In function `SimplifyTree(llvm::TreePatternNode*&)':
CodeGenDAGPatterns.cpp:(.text._ZL12SimplifyTreeRPN4llvm15TreePatternNodeE+0x6c): undefined reference to `memcmp'
CMakeFiles/obj.llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) [clone .isra.481]':
CodeGenDAGPatterns.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag.isra.544+0x4c): undefined reference to `memcpy'
CMakeFiles/obj.llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o: In function `hasNullFragReference(llvm::DagInit*)':
CodeGenDAGPatterns.cpp:(.text._ZL20hasNullFragReferencePN4llvm7DagInitE+0x54): undefined reference to `memcmp'
CMakeFiles/obj.llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o: In function `void std::__insertion_sort<llvm::Record**, __gnu_cxx::__ops::_Iter_comp_iter<llvm::LessRecord> >(llvm::Record**, llvm::Record**, __gnu_cxx::__ops::_Iter_comp_iter<llvm::LessRecord>) [clone .isra.720]':
CodeGenDAGPatterns.cpp:(.text._ZSt16__insertion_sortIPPN4llvm6RecordEN9__gnu_cxx5__ops15_Iter_comp_iterINS0_10LessRecordEEEEvT_S9_T0_.isra.720+0x42): undefined reference to `memmove'

(...)

Output 'gcc -v’

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1' --with-bugurl=file:///usr
rogram-suffix=-6 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexec
ot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-a
pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home
j-6-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf --with-arch-directory=arm --with
h --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb 
ihf
Thread model: posix
gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

Hi, what is the C library in your system, is it glibc? Could you please attach a verbose build log? I cannot tell what the problem could be from the errors above. Also, could you please try with the current master branch as well?

Thanks for your reply.
My installed system C library is GLIBC 2.27-3. Below I have attached the logs. This build was attempted with the current master branch. Besides, my current gcc version is 6.4.

log_cmake.txt (2.5 KB)
log_build.txt (584.7 KB)

Hi William, glibc 2.27 was released only a couple of months ago, and I don’t think we support it yet. I am using glibc 2.26 and everything is working for me, though. So if you use the stable branch of Debian, the problems might go away. ROOT can only support a new version of glibc when LLVM supports is, and it isn’t going to get an LLVM upgrade until 6.16 is out, so glibc 2.27 support will probably only arrive in november. The problem could be with some system configuration, though. GCC and glibc are tightly coupled, so you may have to use a more recent compiler to be able to use a very recent glibc.

Thank you very much. It did compile with an older version.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.