Thread overview | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
November 21, 2006 GDC on Mac - math linker errors for do-nothing program | ||||
---|---|---|---|---|
| ||||
Hi there, I've been using D for a while now, but only on Windows, and I'm currently trying to get my project to compile on Mac OS X. I'm pretty new to Macs, in general. The machine is a classic iMac, one of the original ones from 1998; I think it's a Revision B. (My workplace was going to throw it out so I got it for free.) I installed a fresh copy of Mac OS X 10.3 "Panther" on it (Tiger dropped support for the classic iMacs), downloaded and installed Xcode Tools 1.5 as instructed, and then downloaded and installed gdc from http://gdcmac.sf.net. To test it I created a simple D file, like this: void main() { } I tried to compile it (using either gdc test.d or gdmd test.d) and got this: $ gdc test.d ld: Undefined symbols: _acosl _asinl _atan2l _atanl _cbrtl _ceill _copysignl _coshl _erfcl _erfl _exp2l _expl _expm1l _fabsl _floorl _frexpl _ilogbl _ldexpl _lgammal _log10l _log1pl _log2l _logbl _logl _modfl _nanl _nearbyintl _powl _remainderl _roundl _sinhl _sqrtf _sqrtl _tanhl _tgammal _truncl I have no idea what's causing this. I've tried reinstalling Xcode and the BSD Subsystem, to no avail. Any ideas? Thanks in advance! --Chris Pelling |
November 21, 2006 Re: GDC on Mac - math linker errors for do-nothing program | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Pelling | Chris Pelling wrote: > The machine is a classic iMac, one of the original ones from 1998; I > think it's a Revision B. (My workplace was going to throw it out so I > got it for free.) I installed a fresh copy of Mac OS X 10.3 "Panther" on > it (Tiger dropped support for the classic iMacs), downloaded and > installed Xcode Tools 1.5 as instructed, and then downloaded and > installed gdc from http://gdcmac.sf.net. Sounds reasonable. The math symbols you describe are being defined in /usr/lib/libSystem.dylib, so it should be able to find those easilly... > I have no idea what's causing this. I've tried reinstalling Xcode and > the BSD Subsystem, to no avail. It works here, Mac OS X 10.3.9, Xcode 1.5. So it should for you too. Which GDC installation for Panther did you use ? (i.e. 0.19 or r20) --anders PS. You might try installing GDC from source code to see if that helps |
November 21, 2006 Re: GDC on Mac - math linker errors for do-nothing program | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Anders F Björklund wrote: > The math symbols you describe are being defined in /usr/lib/libSystem.dylib, so it should be able to find those easilly... That's what I thought too... > It works here, Mac OS X 10.3.9, Xcode 1.5. So it should for you too. Which GDC installation for Panther did you use ? (i.e. 0.19 or r20) I used 0.19. > PS. You might try installing GDC from source code to see if that helps I'll look into that, thanks for the suggestion. |
November 21, 2006 Re: GDC on Mac - math linker errors for do-nothing program | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Pelling | Chris Pelling wrote:
>>It works here, Mac OS X 10.3.9, Xcode 1.5. So it should for you too.
>>Which GDC installation for Panther did you use ? (i.e. 0.19 or r20)
>
> I used 0.19.
OK. *scratches head*. That is the one I've used most.
If you run with gdc --verbose it'll show all the steps,
and if you run it with ktrace it'll dump a ktrace.out:
gdc --verbose -c test.d 2> test.out
ktrace gdc -c test.d
Email those two outputs to me, and I'll have a look...
(zip the test.out and ktrace.out up in an archive or so)
--anders
|
November 21, 2006 Re: GDC on Mac - math linker errors for do-nothing program | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund |
> If you run with gdc --verbose it'll show all the steps,
> and if you run it with ktrace it'll dump a ktrace.out:
>
> gdc --verbose -c test.d 2> test.out
> ktrace gdc -c test.d
Probably more interesting if we include the linker step too:
gdc --verbose -o test test.d 2> test.out
ktrace gdc -o test test.d
BTW; you can view the ktrace.out using the "kdump" command.
--anders
|
November 21, 2006 Re: GDC on Mac - math linker errors for do-nothing program | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Anders F Björklund wrote:
> gdc --verbose -o test test.d 2> test.out
> ktrace gdc -o test test.d
I sent you test.out and ktrace.out.
By the way, I should mention that my system isn't quite the same as yours. I'm not running OS X 10.3.9; I think it's 10.3.0 (all the version numbers I can find just say "10.3"). I suppose upgrading would be a good idea...
|
November 21, 2006 Re: GDC on Mac - math linker errors for do-nothing program - fixed! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Pelling | Chris Pelling wrote:
> I suppose upgrading would be a good
> idea...
A very good idea, as it turns out. Upgrading to 10.3.9 solved the problem.
Thanks for your help Anders!
|
November 21, 2006 Re: GDC on Mac - math linker errors for do-nothing program - fixed! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Pelling | Chris Pelling wrote:
>>I suppose upgrading would be a good idea...
>
> A very good idea, as it turns out. Upgrading to 10.3.9 solved the problem.
Okay, explains why I couldn't reproduce or find anything.
I think I will maybe post a "warning" on the gdcmac site.
--anders
|
November 21, 2006 Re: GDC on Mac - math linker errors for do-nothing program - fixed! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Anders F Björklund wrote:
> I think I will maybe post a "warning" on the gdcmac site.
Yes, good idea. I was going to suggest that but forgot. :-)
--Chris Pelling
|
November 21, 2006 Re: GDC on Mac - math linker errors for do-nothing program - fixed! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Pelling | Chris Pelling wrote:
>>I think I will maybe post a "warning" on the gdcmac site.
>
> Yes, good idea. I was going to suggest that but forgot. :-)
Probably could have made a version with the MacOSX10.3.0.sdk,
but it's better to force upgrading to 10.2.8 and 10.3.9... :-)
Besides, you probably *want* Mac OS X 10.3.9 anyway for the
security fixes, and for the compatibility with GCC/G++ 4.0 ?
--anders
|
Copyright © 1999-2021 by the D Language Foundation