digitalmars.D.bugs - std.boxer linker error
- Brad Roberts (32/32) Mar 02 2006 On linux with dmd 0.148, I'm seeing some odd linking issues that I haven...
- Derek Parnell (9/11) Mar 02 2006 On Windows, you have to compile anything that imports std.boxer with the
- Brad Roberts (5/19) Mar 02 2006 Not a bad temporary work around, but only temporary since that
- Don Clugston (2/9) Mar 03 2006 Do we know the reason for that? Has it been reduced to a minimal test ca...
- Thomas Kuehne (11/21) Mar 05 2006 -----BEGIN PGP SIGNED MESSAGE-----
- Brad Roberts (12/31) Mar 05 2006 I tried a little bit to reduce the problem. If you're looking for a
On linux with dmd 0.148, I'm seeing some odd linking issues that I haven't tracked down just yet. $ cat test_box.d import std.boxer; int main() { Box foo = box(1); int bar = unbox!(int)(foo); return 0; } $ dmd -g -v test_box.d parse test_box semantic test_box semantic2 test_box semantic3 test_box code test_box generating code for function 'main' generating code for function 'unbox' generating code for function 'unboxCastInteger' gcc test_box.o -o test_box -g -lphobos -lpthread -lm -Xlinker -L/workplace/bradrob/dmd-0.148/dmd/lib test_box.o(.gnu.linkonce.t_D3std5boxer24__T16unboxCastIntegerTiZ16unboxCastIntegerFS3st 5boxer3BoxZi+0x18): In function `_D3std5boxer24__T16unboxCastIntegerTiZ16unboxCastIntegerFS3std5boxer3BoxZi': /workplace/bradrob/d-playground/test_box.d:5: undefined reference to `_assert_3std5boxer' collect2: ld returned 1 exit status --- errorlevel 1 Commenting out the assert in std/boxer.d inside unboxCastInteger(T) at line 429 allows the link to succeed. Similarly, if I use something other than an int and hit one of the other unboxCast[pick a type] templates I get the same problem. Thoughts? Thanks, Brad
Mar 02 2006
On Thu, 2 Mar 2006 17:38:00 -0800, Brad Roberts wrote:On linux with dmd 0.148, I'm seeing some odd linking issues that I haven't tracked down just yet.On Windows, you have to compile anything that imports std.boxer with the "-release" switch to get the linker happy. -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 3/03/2006 3:18:27 PM
Mar 02 2006
On Fri, 3 Mar 2006, Derek Parnell wrote:On Thu, 2 Mar 2006 17:38:00 -0800, Brad Roberts wrote:Not a bad temporary work around, but only temporary since that disables all asserts. Thanks, BradOn linux with dmd 0.148, I'm seeing some odd linking issues that I haven't tracked down just yet.On Windows, you have to compile anything that imports std.boxer with the "-release" switch to get the linker happy. -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 3/03/2006 3:18:27 PM
Mar 02 2006
Derek Parnell wrote:On Thu, 2 Mar 2006 17:38:00 -0800, Brad Roberts wrote:Do we know the reason for that? Has it been reduced to a minimal test case?On linux with dmd 0.148, I'm seeing some odd linking issues that I haven't tracked down just yet.On Windows, you have to compile anything that imports std.boxer with the "-release" switch to get the linker happy.
Mar 03 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Don Clugston schrieb am 2006-03-03:Derek Parnell wrote:DMD generates different symbols depending on the state of the "-release" switch.On Thu, 2 Mar 2006 17:38:00 -0800, Brad Roberts wrote:Do we know the reason for that?On linux with dmd 0.148, I'm seeing some odd linking issues that I haven't tracked down just yet.On Windows, you have to compile anything that imports std.boxer with the "-release" switch to get the linker happy.Has it been reduced to a minimal test case?Not as far as I know. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFECzFA3w+/yD4P9tIRAg+SAKCX8uLcK8qzpxIETpaKfFrwlkHXIwCdEUqq m0jI3bOzWWovyFAqoAKvjA0= =8x9Q -----END PGP SIGNATURE-----
Mar 05 2006
On Sun, 5 Mar 2006, Thomas Kuehne wrote:Don Clugston schrieb am 2006-03-03:I tried a little bit to reduce the problem. If you're looking for a single file contained test case then I'm not sure that's doable. I suspect this might relate to the other threads going on right now about symbols changing visibility based on compiler options. Random thought: Now that dmd can produce .di files, THOSE are what should be used now rather than the full .d's during subsequent compilation. I haven't checked their output, but I assume that the unused paths around version, debug, release, etc are omitted such that the .di file _exactly_ matches the .o/.obj files produced. Later, BradDerek Parnell wrote:DMD generates different symbols depending on the state of the "-release" switch.On Thu, 2 Mar 2006 17:38:00 -0800, Brad Roberts wrote:Do we know the reason for that?On linux with dmd 0.148, I'm seeing some odd linking issues that I haven't tracked down just yet.On Windows, you have to compile anything that imports std.boxer with the "-release" switch to get the linker happy.Has it been reduced to a minimal test case?Not as far as I know. Thomas
Mar 05 2006