---------- Forwarded message ---------- From: Mark Pupilli mpupilli@gmail.com Date: 17 November 2013 14:07 Subject: condition_variable_any missing from libstdc To: linaro-toolchain@lists.linaro.org
Hi,
I sent this message a week ago but I don't think I was subscribed to the list correctly. Apologies if it is repeated (it doesn't show in the archive).
I have a problem with my cross build of (Linaro GCC 4.8-2013.10). I get the following runtime linker errors regarding condition_variable_any: "relocation error: /usr/local/lib/librobolib.so: symbol _ZNSt22condition_variable_anyC1Ev, version GLIBCXX_3.4.11 not defined in file libstdc++.so.6 with link time reference"
If I examine my built version of libstdc with readelf I get the following output:
$ readelf -s ./src/.libs/libstdc++.so.6 | grep condition 10383: 000c58d8 68 FUNC LOCAL DEFAULT 11 _ZNSt15error_conditionC1E 10818: 000c58d8 68 FUNC LOCAL DEFAULT 11 _ZNSt15error_conditionC2E 10837: 000c5944 40 FUNC LOCAL DEFAULT 11 _ZNKSt15error_condition8c 10942: 000c591c 40 FUNC LOCAL DEFAULT 11 _ZNKSt15error_condition5v
Where as with the apt-get installed 4.6 version of the toolchain shows:
$ readelf -s /usr/arm-linux-gnueabi/lib/libstdc++.so.6 | grep condition 777: 000523b1 12 FUNC GLOBAL DEFAULT 12 _ZNSt22condition_variable@@GLIBCXX_3.4.11 929: 000522f1 104 FUNC GLOBAL DEFAULT 12 _ZNSt18condition_variable@@GLIBCXX_3.4.11 1037: 000523b1 12 FUNC GLOBAL DEFAULT 12 _ZNSt22condition_variable@@GLIBCXX_3.4.11 1198: 000522f1 104 FUNC GLOBAL DEFAULT 12 _ZNSt18condition_variable@@GLIBCXX_3.4.11 1686: 00052385 14 FUNC GLOBAL DEFAULT 12 _ZNSt18condition_variable@@GLIBCXX_3.4.11 2166: 00052359 12 FUNC GLOBAL DEFAULT 12 _ZNSt18condition_variable@@GLIBCXX_3.4.11 2438: 00052359 12 FUNC GLOBAL DEFAULT 12 _ZNSt18condition_variable@@GLIBCXX_3.4.11 2685: 00052365 16 FUNC GLOBAL DEFAULT 12 _ZNSt18condition_variable@@GLIBCXX_3.4.11 3186: 00052395 26 FUNC GLOBAL DEFAULT 12 _ZNSt22condition_variable@@GLIBCXX_3.4.11 3448: 00052395 26 FUNC GLOBAL DEFAULT 12 _ZNSt22condition_variable@@GLIBCXX_3.4.11 3643: 00052375 14 FUNC GLOBAL DEFAULT 12 _ZNSt18condition_variable@@GLIBCXX_3.4.11
(Which is still missing anything to do with condition_variable_any, but given that my native 4.8 compiler doesn't contain this symbol either and my code builds and runs natively, I assume this is how it should be).
Here is my build's version information:
$ arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/home/mark/arm-linux-gnueabi-4.8.2/libexec/gcc/arm-linux-gnueabi/4.8.2/lto-wrapper Target: arm-linux-gnueabi Configured with: ../gcc-linaro-4.8-2013.10/configure --target=arm-linux-gnueabi --prefix=/home/mark/arm-linux-gnueabi-4.8.2 --with-local-prefix=/home/mark/arm-linux-gnueabi-4.8.2 --disable-nls --enable-shared --enable-multilib --disable-decimal-float --enable-languages=c,c++ --with-mpfr-include=/home/mark/gcc-4.8-arm-linux/gcc-build/../gcc-linaro-4.8-2013.10/mpfr/src --with-mpfr-lib=/home/mark/gcc-4.8-arm-linux/gcc-build/mpfr/src/.libs --enable-clocale=gnu --enable-threads=posix --enable-__cxa_atexit --disable-libstdcxx-pch --with-system-zlib --with-headers=/home/mark/arm-linux-gnueabi-4.8.2/include --with-libs=/home/mark/arm-linux-gnueabi-4.8.2/lib --enable-libstdcxx-threads --enable-libstdcxx-time Thread model: posix gcc version 4.8.2 20131014 (prerelease) (Linaro GCC 4.8-2013.10)
I configured libstdc++-v3 respectively as follows:
$ ../gcc-linaro-4.8-2013.10/libstdc++-v3/configure --host=arm-linux-gnueabi --prefix=/home/mark/arm-linux-gnueabi-4.8.2/ --enable-multilib --enable-shared --disable-nls --disable-libstdcxx-pch --enable-libstdcxx-threads --enable-libstdcxx-time
I assumed the relevant entries to enable C++11 threading and condition variables etc would have been --enable-libstdcxx-threads --enable-libstdcxx-time. I must be missing some other options or have done something else wrong. Any suggestions?
thanks, Mark