Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #450 (closed defect: fixed)

Opened 17 years ago

Last modified 16 years ago

example logging/logging doesn't link on Mac OS X

Reported by: Carlos Assigned to: kris
Priority: normal Milestone: 1.0
Component: Tango Version: trunk
Keywords: Cc: csantander619@gmail.com

Description

Rev [2172]

bud logging/logging.d -noautoimport -op -clean -full -g -debug -I.. -Tlogging/logging -unittest
/usr/bin/ld: Undefined symbols:
____s.2815

???

Attachments

tango-time.patch (415 bytes) - added by afb on 08/20/07 07:50:50.
tango-time.patch

Change History

05/07/07 18:59:24 changed by kris

sorry Carlos ... don't even know where to guess on this one

06/02/07 08:25:05 changed by kris

  • status changed from new to assigned.
  • milestone set to 0.99 RC3.

06/02/07 18:46:24 changed by Carlos

BTW, this happens with Apple's GCC. With FSF's GCC, I get an ICE.

06/29/07 05:16:49 changed by kris

  • milestone changed from 0.99 RC3 to 1.0.

07/04/07 17:18:07 changed by Carlos

Some more info.
Passing "-Wl,-ys.2826" to the linker, I get:
logging/logging.o reference to undefined s.2826
BTW, just now I noticed that the number is different from the first one reported... Weird...

07/04/07 17:20:12 changed by Carlos

... and yes, those s.2826 should be prepended by four underscores. I don't know where they went...

07/12/07 09:25:31 changed by afb

The numbers are random, you can see from the generated assembler code.

It seems to be some symbol from tango.core.Type.Time that is missing...

	.section __DATA,__datacoal_nt,coalesced
	.align 2
__D31TypeInfo_E5tango4core4Type4Time6__initZ:
	.long	__D13TypeInfo_Enum6__vtblZ
	.long	0
	.long	__D10TypeInfo_l6__initZ
	.long	20
	.long	LC42
	.long	8
	.long	____s.2808
	.data
____s.2812:
	.long	__D10TypeInfo_i6__initZ
	.long	__D31TypeInfo_E5tango4core4Type4Time6__initZ
	.globl __D35TypeInfo_B23iE5tango4core4Type4Time6__initZ
	.weak_definition __D35TypeInfo_B23iE5tango4core4Type4Time6__initZ
	.section __DATA,__datacoal_nt,coalesced
	.align 2
__D35TypeInfo_B23iE5tango4core4Type4Time6__initZ:
	.long	__D14TypeInfo_Tuple6__vtblZ
	.long	0
	.long	2
	.long	____s.2812

Here the "s.2812" got generated OK, but not the "s.2802"

(where the Wiki engine eats the four underscores before the "s.")

Since it uses coalesced symbols, it's most likely a template ? (and it also explains the difference between Apple and FSF GCC)

07/12/07 12:38:03 changed by Carlos

I'm not really sure what you're saying, but it sounds like if it was a code generation bug instead of a Tango bug. Am I right?
BTW, using revision 117 of GDC with FSF GCC, I no longer an ICE, but the same undefined symbols error.

08/20/07 07:27:29 changed by afb

It seems like Tango triggers a code generation bug, yes. Still happens with rev 139, unfortunately.

08/20/07 07:28:34 changed by afb

And the -fall-sources (also known as "-circular" in rebuild) doesn't help either...

08/20/07 07:48:52 changed by afb

It's a bug with the initializers of enums, it didn't like TicksPerMillisecond/?10000 but is happy with Zero/0

08/20/07 07:50:50 changed by afb

  • attachment tango-time.patch added.

tango-time.patch

08/28/07 07:08:45 changed by kris

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [2522]) closes #450 :: example logging/logging doesn't link on Mac OS X

A big thank-you to afb for tracking this one down :)

08/28/07 07:09:50 changed by kris

should be good to go, carlos? I'd be interested to see if GDC 0.24 exhibits the same issue with the patch removed

08/28/07 14:05:10 changed by Carlos

Yeah, yeah! Thanks guys! All examples compile and link now.

10/09/07 17:37:10 changed by Auria

Has this bug been reported to the GDC team? It happens in other projects too, and i think it would be better to fix it than work around it.

10/10/07 08:05:43 changed by larsivi

Auria: I don't know, although afb usually does. If you can't find it in the bugzilla and you have a reduced test case, would you be so kind and file it?

10/10/07 13:08:16 changed by Auria

I asked because i could hardly file it myself, since i don't understand this bug :/