digitalmars.D - "make std/concurrency.test" fails but others don't... why?
- Andrei Alexandrescu (23/23) Apr 10 2015 Martin Nowak added recently a nice feature to the Phobos makefile: by
- weaselcat (4/27) Apr 10 2015 works for me, might be an issue with clang being your C compiler?
- Martin Nowak (14/18) Apr 10 2015 For some reason the linker drags in another copy of the concurrency
- weaselcat (3/26) Apr 10 2015 d'oh, thought he was on linux - been a while since I've seen
- Steven Schveighoffer (7/30) Apr 10 2015 There is a bug somewhere that causes issues with dmd compiled with clang...
- Vladimir Panteleev (6/11) Apr 11 2015 FWIW, in most cases you can also do this simply by running:
- Andrei Alexandrescu (14/26) Apr 11 2015 The actual command line generated by is:
- timotheecour (5/20) Jul 26 2015 just posted this regression:
Martin Nowak added recently a nice feature to the Phobos makefile: by specifying e.g. make std/stdio.test only the unittests for std/stdio.d would build and run. This greatly improves development turnaround for Phobos. I've used this feature regularly since introduction, but it seems to not work with at least std.concurrency. Running make std/concurrency.test produces: duplicate symbol _D3std11concurrency10MessageBox6__initZ in: concurrency.o generated/osx/release/64/libphobos2.a(concurrency_329_3ee.o) duplicate symbol _D3std11concurrency10MessageBox7__ClassZ in: concurrency.o generated/osx/release/64/libphobos2.a(concurrency_329_3ee.o) duplicate symbol _D3std11concurrency10MessageBox6__vtblZ in: concurrency.o generated/osx/release/64/libphobos2.a(concurrency_329_3ee.o) ld: 3 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) What makes MessageBox special? Andrei
Apr 10 2015
On Friday, 10 April 2015 at 23:04:44 UTC, Andrei Alexandrescu wrote:Martin Nowak added recently a nice feature to the Phobos makefile: by specifying e.g. make std/stdio.test only the unittests for std/stdio.d would build and run. This greatly improves development turnaround for Phobos. I've used this feature regularly since introduction, but it seems to not work with at least std.concurrency. Running make std/concurrency.test produces: duplicate symbol _D3std11concurrency10MessageBox6__initZ in: concurrency.o generated/osx/release/64/libphobos2.a(concurrency_329_3ee.o) duplicate symbol _D3std11concurrency10MessageBox7__ClassZ in: concurrency.o generated/osx/release/64/libphobos2.a(concurrency_329_3ee.o) duplicate symbol _D3std11concurrency10MessageBox6__vtblZ in: concurrency.o generated/osx/release/64/libphobos2.a(concurrency_329_3ee.o) ld: 3 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) What makes MessageBox special? Andreiworks for me, might be an issue with clang being your C compiler? try with CC=gcc make -f posix.mak std/concurrency.test
Apr 10 2015
On 04/11/2015 01:04 AM, Andrei Alexandrescu wrote:What makes MessageBox special? AndreiFor some reason the linker drags in another copy of the concurrency module (part of it to be precise concurrency_329_3ee.o). That collides with concurrency.o the to be tested module. I don't have time to debug this on OSX, but looking at the verbose linker output or at the symbols in both object files might give you an idea, why it was pulled in. ar x generated/osx/release/64/libphobos2.a concurrency_329_3ee.o nm concurrency_329_3ee.o ../dmd/src/dmd -conf= -I../druntime/import -w -dip25 -m64 -O -release -main -unittest -c std/concurrency.d nm concurrency.o | grep ' U ' It's probably because of some undefined ModuleInfoZ or InitZ symbol in the concurrency.o object.
Apr 10 2015
On Friday, 10 April 2015 at 23:29:04 UTC, Martin Nowak wrote:On 04/11/2015 01:04 AM, Andrei Alexandrescu wrote:d'oh, thought he was on linux - been a while since I've seen anyone use a non-linux POSIX system. Sorry!What makes MessageBox special? AndreiFor some reason the linker drags in another copy of the concurrency module (part of it to be precise concurrency_329_3ee.o). That collides with concurrency.o the to be tested module. I don't have time to debug this on OSX, but looking at the verbose linker output or at the symbols in both object files might give you an idea, why it was pulled in. ar x generated/osx/release/64/libphobos2.a concurrency_329_3ee.o nm concurrency_329_3ee.o ../dmd/src/dmd -conf= -I../druntime/import -w -dip25 -m64 -O -release -main -unittest -c std/concurrency.d nm concurrency.o | grep ' U ' It's probably because of some undefined ModuleInfoZ or InitZ symbol in the concurrency.o object.
Apr 10 2015
On 4/10/15 7:04 PM, Andrei Alexandrescu wrote:Martin Nowak added recently a nice feature to the Phobos makefile: by specifying e.g. make std/stdio.test only the unittests for std/stdio.d would build and run. This greatly improves development turnaround for Phobos. I've used this feature regularly since introduction, but it seems to not work with at least std.concurrency. Running make std/concurrency.test produces: duplicate symbol _D3std11concurrency10MessageBox6__initZ in: concurrency.o generated/osx/release/64/libphobos2.a(concurrency_329_3ee.o) duplicate symbol _D3std11concurrency10MessageBox7__ClassZ in: concurrency.o generated/osx/release/64/libphobos2.a(concurrency_329_3ee.o) duplicate symbol _D3std11concurrency10MessageBox6__vtblZ in: concurrency.o generated/osx/release/64/libphobos2.a(concurrency_329_3ee.o) ld: 3 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) What makes MessageBox special? AndreiThere is a bug somewhere that causes issues with dmd compiled with clang on OSX. I've had to disable a test in dmd test suite before. If this problem could be solved, we could switch default build on the auto tester to use clang (it currently uses gcc). FWIW, I never had an issue with phobos unit tests. -Steve
Apr 10 2015
On Friday, 10 April 2015 at 23:04:44 UTC, Andrei Alexandrescu wrote:Martin Nowak added recently a nice feature to the Phobos makefile: by specifying e.g. make std/stdio.test only the unittests for std/stdio.d would build and run. This greatly improves development turnaround for Phobos.FWIW, in most cases you can also do this simply by running: dmd -unittest -main -run stdio.d It won't work if other modules have changed (compared to the dmd in your PATH).
Apr 11 2015
On 4/11/15 12:25 AM, Vladimir Panteleev wrote:On Friday, 10 April 2015 at 23:04:44 UTC, Andrei Alexandrescu wrote:The actual command line generated by is: ../dmd/src/dmd -conf= -I../druntime/import -w -dip25 -m64 -g -debug -main -unittest generated/osx/debug/64/libphobos2.a -defaultlib= -debuglib= -L-lcurl -run std/stdio.d So having this in the makefile: * makes sure the library is built automatically * links the right external libs * makes sure command line options such as -dip25 are not omitted * makes sure there's no interference from dmd.conf files * links the correct library * ... So if your point was it can be done just worse, sure. AndreiMartin Nowak added recently a nice feature to the Phobos makefile: by specifying e.g. make std/stdio.test only the unittests for std/stdio.d would build and run. This greatly improves development turnaround for Phobos.FWIW, in most cases you can also do this simply by running: dmd -unittest -main -run stdio.d It won't work if other modules have changed (compared to the dmd in your PATH).
Apr 11 2015
On Sunday, 12 April 2015 at 04:08:47 UTC, Andrei Alexandrescu wrote:On 4/11/15 12:25 AM, Vladimir Panteleev wrote:just posted this regression: https://issues.dlang.org/show_bug.cgi?id=14828 could this be related?[...]The actual command line generated by is: ../dmd/src/dmd -conf= -I../druntime/import -w -dip25 -m64 -g -debug -main -unittest generated/osx/debug/64/libphobos2.a -defaultlib= -debuglib= -L-lcurl -run std/stdio.d So having this in the makefile: * makes sure the library is built automatically * links the right external libs * makes sure command line options such as -dip25 are not omitted * makes sure there's no interference from dmd.conf files * links the correct library * ... So if your point was it can be done just worse, sure. Andrei
Jul 26 2015