www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19553] New: runnable/cpp_stdlib.d fails on NixOS

https://issues.dlang.org/show_bug.cgi?id=19553

          Issue ID: 19553
           Summary: runnable/cpp_stdlib.d fails on NixOS
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: thomas.mader gmail.com

Created attachment 1722
  --> https://issues.dlang.org/attachment.cgi?id=1722&action=edit
cpp_stdlib_0.o

Here is what I get when running the testsuite after compiling dmd 2.084.0 on
NixOS.

 ... runnable/integrate.d            -fPIC ()
 ... runnable/cpp_stdlib.d           -fPIC -L-lstdc++ (-inline -release -g -O)
Test runnable/cpp_stdlib.d failed.  The logged output:
/build/dmd/generated/linux/release/64/dmd -conf= -m64 -Irunnable  -fPIC
-L-lstdc++  -odtest_results/runnable -oftest_results/runnable/cpp_stdlib_0 
runnable/cpp_stdlib.d test_results/runnable/cpp_stdlib.cpp.o
test_results/runnable/cpp_stdlib_0.o: In function `_Dmain':
runnable/cpp_stdlib.d:(.text._Dmain[_Dmain]+0x31): undefined reference to `int&
identity<int>(int&)'
runnable/cpp_stdlib.d:(.text._Dmain[_Dmain]+0x50): undefined reference to
`float& identity<float>(float&)'
runnable/cpp_stdlib.d:(.text._Dmain[_Dmain]+0x7d): undefined reference to
`int** identityPP<int>(int**)'
runnable/cpp_stdlib.d:(.text._Dmain[_Dmain]+0xa0): undefined reference to
`float** identityPP<float>(float**)'
runnable/cpp_stdlib.d:(.text._Dmain[_Dmain]+0xc8): undefined reference to
`std::vector<int, std::allocator<int> >* getVector<int>(unsigned long, int
const*)'
runnable/cpp_stdlib.d:(.text._Dmain[_Dmain]+0x10f): undefined reference to
`std::vector<float, std::allocator<float> >* getVector<float>(unsigned long,
float const*)'
runnable/cpp_stdlib.d:(.text._Dmain[_Dmain]+0x179): undefined reference to
`std::array<int, 4ul>* getArray<int, 4ul>(int const*)'
runnable/cpp_stdlib.d:(.text._Dmain[_Dmain]+0x1d1): undefined reference to
`std::array<float, 4ul>* getArray<float, 4ul>(float const*)'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1


==============================
Test runnable/cpp_stdlib.d failed: expected rc == 0, exited with rc == 1

make[1]: *** [Makefile:133: test_results/runnable/cpp_stdlib.d.out] Error 1

--
Jan 05 2019