ldc.conf is missing some tango libraries

Bug #558810 reported by Matt Jones
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ldc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Updated: My initial speculation about the bug was wrong. See the next posts for details.

Related branches

Revision history for this message
Matt Jones (workhorsy) wrote :

Changed from a tango bug, to a ldc bug.

summary: - svn5259 is broken
+ ldc.conf is missing some tango libraries
affects: libtango (Ubuntu) → ldc (Ubuntu)
Revision history for this message
Matt Jones (workhorsy) wrote :

The problem is that the /etc/ldc.conf file only has some of the tango libraries. The switches are:

    switches = [
        "-I/usr/include/d",
        "-L-L/usr/lib/d",
        "-d-version=Tango",
        "-defaultlib=tango-base-ldc",
        "-debuglib=tango-base-ldc"
    ];

But they should be:

    switches = [
        "-I/usr/include/d",
        "-I/usr/include/d/ldc",
        "-L-L/usr/lib/d",
        "-L-ltango-user-ldc",
        "-d-version=Tango",
        "-defaultlib=tango-base-ldc",
        "-debuglib=tango-base-ldc"
    ];

Matt Jones (workhorsy)
description: updated
Revision history for this message
Michael Bienia (geser) wrote :

The ldc.conf from ldc 0.9.2+hg1655 (from maverick) looks as following:

default:
{
    // 'switches' holds array of string that are appends to the command line
    // arguments before they are parsed.
    switches = [
        "-I/usr/include/d",
        "-I/usr/include/d/ldc",
        "-I/usr/include/d/tango/core/vendor",
        "-L-L/usr/lib/d",
        "-d-version=Tango",
        "-defaultlib=tango-user-ldc",
        "-debuglib=tango-user-ldc"
    ];
};

Do you know if the change you mentioned is still needed?

Revision history for this message
Matt Jones (workhorsy) wrote :

I just tried it in Maverick. Unfortunately I was unable to test, as the latest version is 0.9.1+hg1596-3. Even with the proposed repo activated. I need a way to test 0.9.2+hg1655 to be sure.

Revision history for this message
Michael Bienia (geser) wrote :

ldc 0.9.2+hg1655-0ubuntu1 is now in Maverick. There was a slight delay due to Beta Freeze till it got accepted into the archive.

Revision history for this message
Matt Jones (workhorsy) wrote :

I just tried it. The 1655 revision can't even build a simple:

void main() {
}

I dumps out linking errors like this:

/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
main.o: In function `_D4main16__moduleinfoCtorZ':
main:(.text+0x11): undefined reference to `_Dmodule_ref'
main:(.text+0x21): undefined reference to `_Dmodule_ref'
main.o:(.data+0x0): undefined reference to `_D10ModuleInfo6__vtblZ'
collect2: ld returned 1 exit status
Error: linking failed:
status: 1

I tried linking manually. But can't get it to work at all.

If you can't get the 1655 revision to work, I recommend moving to previous version 0.9.1+hg1596-3, and fixing the ldc.conf file.

In my limited experience of building ldc manually, 1596 version is an okay place to build from. Everything after that is extremely unstable. The ldc devs need to put out a snap shot that works.

Revision history for this message
Michael Bienia (geser) wrote :

Unfortunately going back to an older version would be really hard as the reason for the upgrade to hg1655 is that maverick has only llvm 2.7 and only versions greater than hg1650 build with it.

I can reproduce this problem you see and I might have a possible fix for it (at least I could compile your simple code):
based on the fix you proposed, I tried now adding "-L-ltango-base-ldc" to ldc.conf (as tango-user-ldc is now listed as defaultlib) and it worked.

Here is my current ldc.conf:
default:
{
    // 'switches' holds array of string that are appends to the command line
    // arguments before they are parsed.
    switches = [
        "-I/usr/include/d",
        "-I/usr/include/d/ldc",
        "-I/usr/include/d/tango/core/vendor",
        "-L-L/usr/lib/d",
        "-L-ltango-base-ldc",
        "-d-version=Tango",
        "-defaultlib=tango-user-ldc",
        "-debuglib=tango-user-ldc"
    ];
};

If you can confirm that it fixes this problem, I'll upload a fixed package.

Revision history for this message
Matt Jones (workhorsy) wrote :

I just tried your new ldc.conf. It works! I was able to compile trivial examples, and large frameworks.

Thanks

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ldc - 0.9.2+hg1655-0ubuntu2

---------------
ldc (0.9.2+hg1655-0ubuntu2) maverick; urgency=low

  * Add missing tango libraries to ldc.conf.in (lp: #558810).
 -- Michael Bienia <email address hidden> Sun, 29 Aug 2010 23:59:01 +0200

Changed in ldc (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.