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

Ticket #678 (reopened enhancement)

Opened 17 years ago

Last modified 15 years ago

Link libdl on linux

Reported by: Yang Bo Assigned to: larsivi
Priority: major Milestone: External Bugs
Component: Tango Version: trunk
Keywords: Cc:

Description (Last modified by larsivi)

The original issue has been fixed in unittest.sh (by linking libdl), the underlying problem isn't fixed though. This is due to the fact that different build methods would require different ways to specify this.

The only work for all solution would be to put libdl in dmd.conf, something which may be acceptable in that case.

The best thing though, would be to pragma (lib, "") working and interpreted by the compiler. This means that DMD needs to support it on Linux too, and GDC just needs to implement it.

The first is reported in http://d.puremagic.com/issues/show_bug.cgi?id=1663

Change History

10/11/07 07:29:28 changed by kris

  • owner changed from kris to larsivi.

11/12/07 10:23:03 changed by larsivi

  • status changed from new to assigned.
  • milestone set to 0.99.4.

This is because this functionality requires libdl. I'm atm uncertain how to handle this. The only possible way (since pragma(link) isn't heeded on Linux) may be to put it in dmd.conf or otherwise have it put on the command line (-ldl).

11/12/07 10:29:42 changed by larsivi

I meant pragma (lib, )

11/24/07 12:47:59 changed by larsivi

  • description changed.
  • summary changed from Link problem when I run unittest.sh on Linux to Link libdl on linux.

12/17/07 18:49:02 changed by larsivi

  • type changed from defect to enhancement.
  • milestone changed from 0.99.4 to 1.0.

There is currently no way to achieve this in code. The only other solution is to make it linked in by default (dmd.conf or such). This would mean that other libs like zlib probably should get a similar treatment though, so I'd like to hold off on this one a little longer.

01/24/08 20:08:51 changed by larsivi

  • milestone changed from 1.0 to External Bugs.

12/11/08 12:59:04 changed by larsivi

  • milestone changed from External Bugs to 0.99.9.

This is fixed in DMD, will eventually implement in Tango.

Note that GDC does _not_ do this yet.

04/09/09 10:37:31 changed by larsivi

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

(In [4530]) Add pragma(lib, dl), no hope for GDC, closes #678

04/26/09 16:18:08 changed by larsivi

  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from 0.99.9 to External Bugs.

Actually, this will not work yet due to

http://d.puremagic.com/issues/show_bug.cgi?id=2776