Jump to page: 1 2
Thread overview
Re: Status of gdmd
Dec 16, 2013
Iain Buclaw
Dec 16, 2013
Iain Buclaw
Dec 16, 2013
Iain Buclaw
Dec 16, 2013
Iain Buclaw
Dec 16, 2013
Iain Buclaw
Dec 16, 2013
Iain Buclaw
December 16, 2013
On 15 December 2013 18:47, Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> wrote:
> Hello all,
>
> So, I finally bit the bullet and built latest git-HEAD gdc on top of latest-svn-checkout gcc (and on top of a new pre-alpha Ubuntu 14.04 to boot).
>
> All went fine with the build, which was configured with
>
>     ../gcc-trunk/configure --enable-languages=d --enable-multiarch
> --enable-checking=release --prefix=/opt/gdc
>
> However, on my first attempt at compiling a simple program, I was greeted with a slew of "undefined reference" errors, seemingly covering just about everything in my program and everything it used in druntime and Phobos.
>
> I was compiling using the gdmd wrapper (the perl script), so just to check, I tried compiling using gdc directly, and indeed, it compiled fine and without complaint.
>
> So, what's changed with gdc that the perl script might no longer function? And working on the assumption that it's reached its natural end of life, what's the status of the D port of it? :-)
>
> Thanks & best wishes,
>
>     -- Joe

I'd need to know what undefined reference errors there were and what the simple program was. ;)
December 16, 2013
On 16/12/13 11:59, Iain Buclaw wrote:
> I'd need to know what undefined reference errors there were and what
> the simple program was. ;)

No program seems immune :-)  But try this:

///////////////////////////////////
import std.stdio;

void main()
{
    writeln("Hello, gdmd!");
}
///////////////////////////////////

... which compiled with gdc proper works fine, but when compiled with gdmd results in this:

gdmd.o: In function `main':
gdmd.d:(.text+0x21): undefined reference to `_d_run_main'
gdmd.o: In function `_D4gdmd9__modinitFZv':
gdmd.d:(.text+0x7d): undefined reference to `_Dmodule_ref'
gdmd.d:(.text+0x8b): undefined reference to `_Dmodule_ref'
gdmd.o:(.data+0x10): undefined reference to `_D3std5stdio12__ModuleInfoZ'
gdmd.o:(.data._D53TypeInfo_S3std6format18__T10FormatSpecTaZ10FormatSpec6__initZ[_D53TypeInfo_S3std6format18__T10FormatSpecTaZ10FormatSpec6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D53TypeInfo_S3std6format18__T10FormatSpecTaZ10FormatSpec6__initZ[_D53TypeInfo_S3std6format18__T10FormatSpecTaZ10FormatSpec6__initZ]+0x38): undefined reference to `_D3std6format18__T10FormatSpecTaZ10FormatSpec11__xopEqualsFKxS3std6format18__T10FormatSpecTaZ10FormatSpecKxS3std6format18__T10FormatSpecTaZ10FormatSpecZb'
gdmd.o:(.data._D53TypeInfo_S3std6format18__T10FormatSpecTaZ10FormatSpec6__initZ[_D53TypeInfo_S3std6format18__T10FormatSpecTaZ10FormatSpec6__initZ]+0x48): undefined reference to `_D3std6format18__T10FormatSpecTaZ10FormatSpec8toStringMFNaNfZAya'
gdmd.o:(.data._D47TypeInfo_S3std6traits15__T8DemangleTkZ8Demangle6__initZ[_D47TypeInfo_S3std6traits15__T8DemangleTkZ8Demangle6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D47TypeInfo_S3std6traits15__T8DemangleTkZ8Demangle6__initZ[_D47TypeInfo_S3std6traits15__T8DemangleTkZ8Demangle6__initZ]+0x38): undefined reference to `_D3std6traits15__T8DemangleTkZ8Demangle11__xopEqualsFKxS3std6traits15__T8DemangleTkZ8DemangleKxS3std6traits15__T8DemangleTkZ8DemangleZb'
gdmd.o:(.data._D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi4Vi9Z9TrieEntry6__initZ[_D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi4Vi9Z9TrieEntry6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi4Vi9Z9TrieEntry6__initZ[_D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi4Vi9Z9TrieEntry6__initZ]+0x38): undefined reference to `_D3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi4Vi9Z9TrieEntry11__xopEqualsFNfKxS3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi4Vi9Z9TrieEntryKxS3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi4Vi9Z9TrieEntryZb'
gdmd.o:(.data._D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTtVi8Vi7Vi6Z9TrieEntry6__initZ[_D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTtVi8Vi7Vi6Z9TrieEntry6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTtVi8Vi7Vi6Z9TrieEntry6__initZ[_D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTtVi8Vi7Vi6Z9TrieEntry6__initZ]+0x38): undefined reference to `_D3std8internal14unicode_tables25__T9TrieEntryTtVi8Vi7Vi6Z9TrieEntry11__xopEqualsFNfKxS3std8internal14unicode_tables25__T9TrieEntryTtVi8Vi7Vi6Z9TrieEntryKxS3std8internal14unicode_tables25__T9TrieEntryTtVi8Vi7Vi6Z9TrieEntryZb'
gdmd.o:(.data._D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi5Vi8Z9TrieEntry6__initZ[_D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi5Vi8Z9TrieEntry6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi5Vi8Z9TrieEntry6__initZ[_D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi5Vi8Z9TrieEntry6__initZ]+0x38): undefined reference to `_D3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi5Vi8Z9TrieEntry11__xopEqualsFNfKxS3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi5Vi8Z9TrieEntryKxS3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi5Vi8Z9TrieEntryZb'
gdmd.o:(.data._D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi6Vi7Z9TrieEntry6__initZ[_D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi6Vi7Z9TrieEntry6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi6Vi7Z9TrieEntry6__initZ[_D76TypeInfo_S3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi6Vi7Z9TrieEntry6__initZ]+0x38): undefined reference to `_D3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi6Vi7Z9TrieEntry11__xopEqualsFNfKxS3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi6Vi7Z9TrieEntryKxS3std8internal14unicode_tables25__T9TrieEntryTbVi8Vi6Vi7Z9TrieEntryZb'
gdmd.o:(.data._D79TypeInfo_S3std8internal14unicode_tables28__T9TrieEntryTbVi7Vi4Vi4Vi6Z9TrieEntry6__initZ[_D79TypeInfo_S3std8internal14unicode_tables28__T9TrieEntryTbVi7Vi4Vi4Vi6Z9TrieEntry6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D79TypeInfo_S3std8internal14unicode_tables28__T9TrieEntryTbVi7Vi4Vi4Vi6Z9TrieEntry6__initZ[_D79TypeInfo_S3std8internal14unicode_tables28__T9TrieEntryTbVi7Vi4Vi4Vi6Z9TrieEntry6__initZ]+0x38): undefined reference to `_D3std8internal14unicode_tables28__T9TrieEntryTbVi7Vi4Vi4Vi6Z9TrieEntry11__xopEqualsFNfKxS3std8internal14unicode_tables28__T9TrieEntryTbVi7Vi4Vi4Vi6Z9TrieEntryKxS3std8internal14unicode_tables28__T9TrieEntryTbVi7Vi4Vi4Vi6Z9TrieEntryZb'
gdmd.o:(.data._D46TypeInfo_S3std7complex14__T7ComplexTeZ7Complex6__initZ[_D46TypeInfo_S3std7complex14__T7ComplexTeZ7Complex6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D46TypeInfo_S3std7complex14__T7ComplexTeZ7Complex6__initZ[_D46TypeInfo_S3std7complex14__T7ComplexTeZ7Complex6__initZ]+0x38): undefined reference to `_D3std7complex14__T7ComplexTeZ7Complex11__xopEqualsFKxS3std7complex14__T7ComplexTeZ7ComplexKxS3std7complex14__T7ComplexTeZ7ComplexZb'
gdmd.o:(.data._D46TypeInfo_S3std7complex14__T7ComplexTeZ7Complex6__initZ[_D46TypeInfo_S3std7complex14__T7ComplexTeZ7Complex6__initZ]+0x48): undefined reference to `_D3std7complex14__T7ComplexTeZ7Complex8toStringMxFZAya'
gdmd.o:(.data._D63TypeInfo_S3std3uni25__T16SliceOverIndexedTAiZ16SliceOverIndexed6__initZ[_D63TypeInfo_S3std3uni25__T16SliceOverIndexedTAiZ16SliceOverIndexed6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D63TypeInfo_S3std3uni25__T16SliceOverIndexedTAiZ16SliceOverIndexed6__initZ[_D63TypeInfo_S3std3uni25__T16SliceOverIndexedTAiZ16SliceOverIndexed6__initZ]+0x38): undefined reference to `_D3std3uni25__T16SliceOverIndexedTAiZ16SliceOverIndexed11__xopEqualsFKxS3std3uni25__T16SliceOverIndexedTAiZ16SliceOverIndexedKxS3std3uni25__T16SliceOverIndexedTAiZ16SliceOverIndexedZb'
gdmd.o:(.data._D50TypeInfo_S3std3uni20__T9sliceBitsVi4Vi7Z9sliceBits6__initZ[_D50TypeInfo_S3std3uni20__T9sliceBitsVi4Vi7Z9sliceBits6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D50TypeInfo_S3std3uni20__T9sliceBitsVi4Vi7Z9sliceBits6__initZ[_D50TypeInfo_S3std3uni20__T9sliceBitsVi4Vi7Z9sliceBits6__initZ]+0x70): undefined reference to `_D10TypeInfo_g6__initZ'
gdmd.o:(.data._D49TypeInfo_S3std3uni19__T9BitPackedTkVi2Z9BitPacked6__initZ[_D49TypeInfo_S3std3uni19__T9BitPackedTkVi2Z9BitPacked6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D49TypeInfo_S3std3uni19__T9BitPackedTkVi2Z9BitPacked6__initZ[_D49TypeInfo_S3std3uni19__T9BitPackedTkVi2Z9BitPacked6__initZ]+0x70): undefined reference to `_D10TypeInfo_k6__initZ'
gdmd.o: In function `_D3std5stdio16__T7writelnTAyaZ7writelnFAyaZv':
gdmd.d:(.text._D3std5stdio16__T7writelnTAyaZ7writelnFAyaZv[_D3std5stdio16__T7writelnTAyaZ7writelnFAyaZv]+0x2f): undefined reference to `_D3std5stdio6stdoutS3std5stdio4File'
gdmd.d:(.text._D3std5stdio16__T7writelnTAyaZ7writelnFAyaZv[_D3std5stdio16__T7writelnTAyaZ7writelnFAyaZv]+0x9b): undefined reference to `_D3std9exception14__T7enforceTbZ7enforceFNaNfbLAxaAyamZb'
gdmd.o:(.data._D48TypeInfo_S3std5array17__T8AppenderTAyaZ8Appender6__initZ[_D48TypeInfo_S3std5array17__T8AppenderTAyaZ8Appender6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D53TypeInfo_S3std5array17__T8AppenderTAyaZ8Appender4Data6__initZ[_D53TypeInfo_S3std5array17__T8AppenderTAyaZ8Appender4Data6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D53TypeInfo_S3std5array17__T8AppenderTAyaZ8Appender4Data6__initZ[_D53TypeInfo_S3std5array17__T8AppenderTAyaZ8Appender4Data6__initZ]+0x38): undefined reference to `_D3std5array17__T8AppenderTAyaZ8Appender4Data11__xopEqualsFKxS3std5array17__T8AppenderTAyaZ8Appender4DataKxS3std5array17__T8AppenderTAyaZ8Appender4DataZb'
gdmd.o:(.data._D48TypeInfo_S3std5array17__T8AppenderTAxaZ8Appender6__initZ[_D48TypeInfo_S3std5array17__T8AppenderTAxaZ8Appender6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D53TypeInfo_S3std5array17__T8AppenderTAxaZ8Appender4Data6__initZ[_D53TypeInfo_S3std5array17__T8AppenderTAxaZ8Appender4Data6__initZ]+0x0): undefined reference to `_D15TypeInfo_Struct6__vtblZ'
gdmd.o:(.data._D53TypeInfo_S3std5array17__T8AppenderTAxaZ8Appender4Data6__initZ[_D53TypeInfo_S3std5array17__T8AppenderTAxaZ8Appender4Data6__initZ]+0x38): undefined reference to `_D3std5array17__T8AppenderTAxaZ8Appender4Data11__xopEqualsFKxS3std5array17__T8AppenderTAxaZ8Appender4DataKxS3std5array17__T8AppenderTAxaZ8Appender4DataZb'
collect2: error: ld returned 1 exit status

December 16, 2013
On 16 December 2013 11:22, Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> wrote:
> On 16/12/13 11:59, Iain Buclaw wrote:
>>
>> I'd need to know what undefined reference errors there were and what the simple program was. ;)
>
>
> No program seems immune :-)  But try this:
>
> ///////////////////////////////////
> import std.stdio;
>
> void main()
> {
>     writeln("Hello, gdmd!");
> }
> ///////////////////////////////////
>
> ... which compiled with gdc proper works fine, but when compiled with gdmd results in this:
>

OK, it's a driver bug. Reproduced using:

gdc -c hello.d
gdc hello.o


Regards
Iain
December 16, 2013
On 16 December 2013 12:14, Iain Buclaw <ibuclaw@gdcproject.org> wrote:
> On 16 December 2013 11:22, Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> wrote:
>> On 16/12/13 11:59, Iain Buclaw wrote:
>>>
>>> I'd need to know what undefined reference errors there were and what the simple program was. ;)
>>
>>
>> No program seems immune :-)  But try this:
>>
>> ///////////////////////////////////
>> import std.stdio;
>>
>> void main()
>> {
>>     writeln("Hello, gdmd!");
>> }
>> ///////////////////////////////////
>>
>> ... which compiled with gdc proper works fine, but when compiled with gdmd results in this:
>>
>
> OK, it's a driver bug. Reproduced using:
>
> gdc -c hello.d
> gdc hello.o
>


Luckily for you the driver is separate from the compiler proper, so you don't need to recompile the entire gcc sources. ;)

https://github.com/D-Programming-GDC/GDC/commit/588d89f5c087329c66663410a17257760b68f040
December 16, 2013
On 16/12/13 13:14, Iain Buclaw wrote:
> OK, it's a driver bug. Reproduced using:
>
> gdc -c hello.d
> gdc hello.o

Aaack, I should have thought to try that before assuming it was gdmd.  I'd forgotten that gdmd technically builds the object file first and then compiles to the executable.

Thanks very much for the fix! :-)
December 16, 2013
On 15/12/13 19:47, Joseph Rushton Wakeling wrote:
> All went fine with the build, which was configured with
>
>      ../gcc-trunk/configure --enable-languages=d --enable-multiarch --enable-checking=release --prefix=/opt/gdc

I should add that this is the first time I've successfully compiled GDC with the --enable-multiarch option.  Did something change recently?

December 16, 2013
On 16 December 2013 14:01, Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> wrote:
> On 15/12/13 19:47, Joseph Rushton Wakeling wrote:
>>
>> All went fine with the build, which was configured with
>>
>>      ../gcc-trunk/configure --enable-languages=d --enable-multiarch
>> --enable-checking=release --prefix=/opt/gdc
>
>
> I should add that this is the first time I've successfully compiled GDC with the --enable-multiarch option.  Did something change recently?
>

Nope. Though I thought that debian patches were still needed in order to be compatible with Debian/Ubuntu's multiarch directory structure.
December 16, 2013
On 16/12/13 15:33, Iain Buclaw wrote:
> Nope. Though I thought that debian patches were still needed in order
> to be compatible with Debian/Ubuntu's multiarch directory structure.

I'm fairly sure I remember you telling me that Debian patches weren't needed for GCC 4.8 and later, although with 4.8-based builds with --enable-multiarch would fall over.
December 16, 2013
On 16 December 2013 15:55, Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> wrote:
> On 16/12/13 15:33, Iain Buclaw wrote:
>>
>> Nope. Though I thought that debian patches were still needed in order to be compatible with Debian/Ubuntu's multiarch directory structure.
>
>
> I'm fairly sure I remember you telling me that Debian patches weren't needed for GCC 4.8 and later, although with 4.8-based builds with --enable-multiarch would fall over.

Just rechecked, gdc-multiarch patch is commented out in rules.patch. ;-)

http://anonscm.debian.org/viewvc/gcccvs?view=revision&revision=6815
December 16, 2013
On 16/12/13 17:38, Iain Buclaw wrote:
> Just rechecked, gdc-multiarch patch is commented out in rules.patch. ;-)

Anything in particular I could try out to see if it's working in practice?

« First   ‹ Prev
1 2