Unable to compile gdc with gcc 4.8.2 on OSX 10.8.5
    kahuna 
    kahuna0k at gmail.com
       
    Mon Nov  4 19:51:47 PST 2013
    
    
  
On Sunday, 3 November 2013 at 05:51:07 UTC, Joseph Rushton 
Wakeling wrote:
> On Saturday, 2 November 2013 at 10:49:50 UTC, Joseph Rushton 
> Wakeling wrote:
>> On 02/11/13 04:56, kahuna wrote:
>>> I have compiled it with gcc-4.8.1, but anyway it should 
>>> bootstrap itself.
>>
>> Just to avoid doubt, I want to be absolutely clear what you're 
>> doing here.
>
> Kahuna, any news? Did you manage to get your build working?
Sorry I was without internet during the weekend (THE HELL ON 
EARTH!!! :-), I'm using gcc 4.8.1 binary distribution for osx to 
compile gcc-4.8.2, I also tried gcc-4.7.0 to compile latest 
gcc-4.7.3 with identical result (the gcc-4.8.1 was downloaded 
from 
http://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/4.8.1/) 
and gcc-4.7.0 from the equivalent place for it.
the problem seems to be related to double underscore and simple 
underscore during the linking process. Compiling an empty main() 
and then linking produce lot of errors similar to
Undefined symbols for architecture x86_64:
   "_D10TypeInfo_a6__initZ", referenced from:
….
if I make
nm libgphobos.a | grep D10TypeInfo_a6__initZ
I get:
                  U _D10TypeInfo_a6__initZ
                  U _D10TypeInfo_a6__initZ
                  U _D10TypeInfo_a6__initZ
                  U _D10TypeInfo_a6__initZ
00000000000002b0 S __D10TypeInfo_a6__initZ
                  U _D10TypeInfo_a6__initZ
so maybe the compiler is failing when building the libgphobos.a
With gcc-4.8.2 I get the equivalent for libgphobos2.a
maybe the linker for OSX is not compatible with something deep 
inside gdc?? I have compiled c++ and c code without problems 
using those compilers and the references for c++ classes are 
correctly constructed with double underscore prefix..
Any idea?
    
    
More information about the D.gnu
mailing list