On Sunday, 25 December 2016 at 19:25:40 UTC, Johannes Pfau wrote:

This is not place to post bug reports. It was only by chance that I read it.

Better file a Bugzilla Ticket, and notify the author of related tools/scripts. Since noone can monitor everything surrounding D, mailing the author would be appropriate if you can't fix the problem yourself and are stuck.

When DMD then compiles the C++ tests it uses the never C++ compiler shipped with the GDC toolchain. This compiler internally uses a new libstdc++ shippped in a toolchain subfolder. But when running the C++ programm it'll load the stdc++ library from /usr/lib and therefore complain about missing symbols.

This now happens even with the old GCC 4.9 so we have to downgrade travis-ci to GCC 4.8 based compilers for now. Looking at https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html it is just coincidence that GCC 4.8 works and 4.9.3 used to work before. As soon as we start testing more complicated C++ features the newer g++ is more likely to need a symbol not available in the old system stdc++ library.

Possible solutions include:
* Install a newer system GCC from a PPA. This will also update stdc++.
* Append the toolchain location to PATH instead of prepending

The goal of the activate scripts is to switch the current compiler, that includes hiding a system wide installation of dmd, so this wouldn't work.

* Add the location to the toolchain libstdc++ to LD_LIBRARY_PATH

Sounds like a reasonable solution to me, link with what you use for compiling. We're already setting up LIBRARY_PATH and LD_LIBRARY_PATH for the selected version.
https://github.com/dlang/installer/blob/92315cdf58b32178f2c4865db87123d433f45406/script/install.sh#L575

In fact this looks like an incompatibility of the install.sh scripts with your new multilib gdc (using lib32/lib64 instead of lib).

Other solutions.

* We could hide g++/gcc/c++/cc from the gdc binary folder (or use a different folder containing only gdc/gdmd symlinks). But since gcc uses plenty of other tools, such as collect, gprof, et.al. it would ask for troubles.

* We could teach the dmd testsuite to use a specific c++/cc compiler, there is already HOST_CC (the c++/cc driver used for linking). The C++ compiler used for testing can be set here https://github.com/dlang/dmd/blob/dfde61a5b0d206b22be9fa72df7ac14826271eff/test/d_do_test.d#L31.

Reply via email to