Thread overview | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
April 12, 2008 -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Just wondering why I have to give dsss the -L-ldl flag manually when I compile a Derelict-using program under Linux. Seems like it shouldn't be neecessary for me to have to specify that. But who's to blame? * Is it DMD's fault for not including in the default link libs? * Is it DSSS's fault for not picking up that it's needed (or for not puttin it in the default list of flags?) * Is it Derelict's fault for somehow not telling DSSS that it wants to use libdl on Linux? Any of those seem possible. So anyone know the answer? Or is it just my fault for thinking I shouldn't have to stick a version(linux) block in my dsss.conf file? --bb |
April 12, 2008 Re: -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Isn't this what the "lib" pragma is for, if you don't want to have to pass it?
-[Unknown]
Bill Baxter wrote:
> Just wondering why I have to give dsss the -L-ldl flag manually when I compile a Derelict-using program under Linux.
>
> Seems like it shouldn't be neecessary for me to have to specify that. But who's to blame?
> * Is it DMD's fault for not including in the default link libs?
> * Is it DSSS's fault for not picking up that it's needed (or for not puttin it in the default list of flags?)
> * Is it Derelict's fault for somehow not telling DSSS that it wants to use libdl on Linux?
>
> Any of those seem possible. So anyone know the answer?
>
> Or is it just my fault for thinking I shouldn't have to stick a version(linux) block in my dsss.conf file?
>
> --bb
|
April 12, 2008 Re: -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Unknown W. Brackets | Unknown W. Brackets wrote: > Isn't this what the "lib" pragma is for, if you don't want to have to pass it? I suppose so (or "link" pragma using dsss/bud). So you're saying it could be considered "Derelict's fault" for not providing that pragma. On Windows, the equivalent libs (containing LoadLibraryA/FreeLibrary/GetProcAddress) seem to be linked by default, by someone in the toolchain. DMD or DSSS, I'm not sure which. So it seems reasonable that it should be there by default under Linux, too. > -[Unknown] > > > Bill Baxter wrote: >> Just wondering why I have to give dsss the -L-ldl flag manually when I compile a Derelict-using program under Linux. >> >> Seems like it shouldn't be neecessary for me to have to specify that. But who's to blame? >> * Is it DMD's fault for not including in the default link libs? >> * Is it DSSS's fault for not picking up that it's needed (or for not puttin it in the default list of flags?) >> * Is it Derelict's fault for somehow not telling DSSS that it wants to use libdl on Linux? >> >> Any of those seem possible. So anyone know the answer? >> >> Or is it just my fault for thinking I shouldn't have to stick a version(linux) block in my dsss.conf file? >> >> --bb |
April 12, 2008 Re: -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter Wrote: > Unknown W. Brackets wrote: I'm interested here in understanding another difference between Linux and Windows. Chris Miller used Entice Designer to construct a GUI with the following imports 1 /* 2 Generated by Entice Designer 3 Entice Designer written by Christopher E. Miller 4 www.dprogramming.com/entice.php 5 */ 6 7 import dwt.DWT; 8 import dwt.widgets.Display, dwt.widgets.Shell; 9 import dwt.widgets.Group, dwt.widgets.Text; 10 import dwt.widgets.Label, dwt.widgets.Combo; 11 import dwt.graphics.Color, dwt.graphics.Rectangle; 12 import dwt.widgets.MessageBox; 13 14 15 class MyShell 16 { 17 // Do not modify or move this block of variables. 18 //~Entice Designer variables begin here. 19 dwt.widgets.Shell.Shell shell; 20 dwt.widgets.Group.Group group1; 21 dwt.widgets.Text.Text text3; 22 dwt.widgets.Label.Label label5; 23 dwt.widgets.Text.Text Date; 24 dwt.widgets.Combo.Combo Payee; 25 dwt.widgets.Text.Text Code; 26 dwt.widgets.Text.Text ChequeNo; 27 dwt.widgets.Text.Text Details; 28 dwt.widgets.Button.Button OKButton; 29 dwt.widgets.Text.Text Credit; 30 dwt.widgets.Text.Text Debit; 31 dwt.widgets.Table.Table DataTable; 32 //~Entice Designer variables end here. Now he tells me that this compiles in windows as is . Notice he uses a Table . When I take the same program and compile it on Linux I must add " Import dwt.widgets.Table" or it will not compile. Now I am wondering if your problem with d l l ' s is similar ? Some built in assumptions that Linux does not have . |
April 12, 2008 Re: -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tower Ty | Tower Ty wrote:
> Bill Baxter Wrote:
>
>> Unknown W. Brackets wrote:
>
>
> I'm interested here in understanding another difference between Linux and Windows.
> Chris Miller used Entice Designer to construct a GUI with the following imports
>
> 1 /*
> 2 Generated by Entice Designer
> 3 Entice Designer written by Christopher E. Miller
> 4 www.dprogramming.com/entice.php
> 5 */
> 6
> 7 import dwt.DWT;
> 8 import dwt.widgets.Display, dwt.widgets.Shell;
> 9 import dwt.widgets.Group, dwt.widgets.Text;
> 10 import dwt.widgets.Label, dwt.widgets.Combo;
> 11 import dwt.graphics.Color, dwt.graphics.Rectangle;
> 12 import dwt.widgets.MessageBox;
> 13
> 14
> 15 class MyShell
> 16 {
> 17 // Do not modify or move this block of variables.
> 18 //~Entice Designer variables begin here.
> 19 dwt.widgets.Shell.Shell shell;
> 20 dwt.widgets.Group.Group group1;
> 21 dwt.widgets.Text.Text text3;
> 22 dwt.widgets.Label.Label label5;
> 23 dwt.widgets.Text.Text Date;
> 24 dwt.widgets.Combo.Combo Payee;
> 25 dwt.widgets.Text.Text Code;
> 26 dwt.widgets.Text.Text ChequeNo;
> 27 dwt.widgets.Text.Text Details;
> 28 dwt.widgets.Button.Button OKButton;
> 29 dwt.widgets.Text.Text Credit;
> 30 dwt.widgets.Text.Text Debit;
> 31 dwt.widgets.Table.Table DataTable;
> 32 //~Entice Designer variables end here.
>
>
> Now he tells me that this compiles in windows as is .
>
> Notice he uses a Table . When I take the same program and compile it on Linux I must add " Import dwt.widgets.Table" or it will not compile.
>
> Now I am wondering if your problem with d l l ' s is similar ? Some built in assumptions that Linux does not have .
I don't believe what Chris told you is true. I just used Entice designer to make a DWT gui on Windows yesterday, and it was missing many imports and wouldn't compile out of the box without adding them.
--bb
|
April 12, 2008 Re: -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote:
> Tower Ty wrote:
>> Bill Baxter Wrote:
>>
>>> Unknown W. Brackets wrote:
>>
>>
>> I'm interested here in understanding another difference between Linux and Windows.
>> Chris Miller used Entice Designer to construct a GUI with the following imports
>>
>> 1 /*
>> 2 Generated by Entice Designer
>> 3 Entice Designer written by Christopher E. Miller
>> 4 www.dprogramming.com/entice.php
>> 5 */
>> 6 7 import dwt.DWT;
>> 8 import dwt.widgets.Display, dwt.widgets.Shell;
>> 9 import dwt.widgets.Group, dwt.widgets.Text;
>> 10 import dwt.widgets.Label, dwt.widgets.Combo;
>> 11 import dwt.graphics.Color, dwt.graphics.Rectangle;
>> 12 import dwt.widgets.MessageBox;
>> 13 14 15 class MyShell
>> 16 {
>> 17 // Do not modify or move this block of variables.
>> 18 //~Entice Designer variables begin here.
>> 19 dwt.widgets.Shell.Shell shell;
>> 20 dwt.widgets.Group.Group group1;
>> 21 dwt.widgets.Text.Text text3;
>> 22 dwt.widgets.Label.Label label5;
>> 23 dwt.widgets.Text.Text Date;
>> 24 dwt.widgets.Combo.Combo Payee;
>> 25 dwt.widgets.Text.Text Code;
>> 26 dwt.widgets.Text.Text ChequeNo;
>> 27 dwt.widgets.Text.Text Details;
>> 28 dwt.widgets.Button.Button OKButton;
>> 29 dwt.widgets.Text.Text Credit;
>> 30 dwt.widgets.Text.Text Debit;
>> 31 dwt.widgets.Table.Table DataTable;
>> 32 //~Entice Designer variables end here.
>> Now he tells me that this compiles in windows as is .
>>
>> Notice he uses a Table . When I take the same program and compile it on Linux I must add " Import dwt.widgets.Table" or it will not compile.
>>
>> Now I am wondering if your problem with d l l ' s is similar ? Some built in assumptions that Linux does not have .
>
>
> I don't believe what Chris told you is true. I just used Entice designer to make a DWT gui on Windows yesterday, and it was missing many imports and wouldn't compile out of the box without adding them.
Well, ok, maybe "many" is a bit of an overstatement. But it did not compile out of the box without adding some additional imports.
--bb
|
April 12, 2008 Re: -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Yes, I'd think it's Derelict's fault personally. On Windows, LoadLibraryA is (as far as I know) in the same library as a bunch of other things you're going to need.
On Linux, it's separated into its own thing. It's potentially possible you might want to write a Linux executable that does not require libdl, specifically for a system which might not have it.
That said, it seems fairly unlikely. Surely you can change the dmd.conf file to automatically pass -L-ldl to dmd, solving your problem?
-[Unknown]
Bill Baxter wrote:
> Unknown W. Brackets wrote:
>> Isn't this what the "lib" pragma is for, if you don't want to have to pass it?
>
> I suppose so (or "link" pragma using dsss/bud). So you're saying it could be considered "Derelict's fault" for not providing that pragma.
>
> On Windows, the equivalent libs (containing LoadLibraryA/FreeLibrary/GetProcAddress) seem to be linked by default, by someone in the toolchain. DMD or DSSS, I'm not sure which.
>
> So it seems reasonable that it should be there by default under Linux, too.
>
>
>> -[Unknown]
>>
>>
>> Bill Baxter wrote:
>>> Just wondering why I have to give dsss the -L-ldl flag manually when I compile a Derelict-using program under Linux.
>>>
>>> Seems like it shouldn't be neecessary for me to have to specify that. But who's to blame?
>>> * Is it DMD's fault for not including in the default link libs?
>>> * Is it DSSS's fault for not picking up that it's needed (or for not puttin it in the default list of flags?)
>>> * Is it Derelict's fault for somehow not telling DSSS that it wants to use libdl on Linux?
>>>
>>> Any of those seem possible. So anyone know the answer?
>>>
>>> Or is it just my fault for thinking I shouldn't have to stick a version(linux) block in my dsss.conf file?
>>>
>>> --bb
|
April 12, 2008 Re: -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote: > Just wondering why I have to give dsss the -L-ldl flag manually when I compile a Derelict-using program under Linux. > > Seems like it shouldn't be neecessary for me to have to specify that. > But who's to blame? > * Is it DMD's fault for not including in the default link libs? > * Is it DSSS's fault for not picking up that it's needed (or for not > puttin it in the default list of flags?) > * Is it Derelict's fault for somehow not telling DSSS that it wants to > use libdl on Linux? > > Any of those seem possible. So anyone know the answer? > > Or is it just my fault for thinking I shouldn't have to stick a version(linux) block in my dsss.conf file? > > --bb It may be that it is derelict's fault for not working with the tools, but there is also the relevant bugzilla entries http://d.puremagic.com/issues/show_bug.cgi?id=1663 and http://d.puremagic.com/issues/show_bug.cgi?id=1690 pragma(lib) should be implemented on all platforms, or removed from the spec entirely. I'd certainly prefer the former, as this probably is the one thing that a build tool normally cannot do much beyond what the compiler already does by telling the linker about always needed libraries (like the runtime). -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango |
April 12, 2008 Re: -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars Ivar Igesund | I had no idea. I guess I should try to get my sneaker out of my mouth now...
I may see if I can find time to attach a patch in there (seems like something completely solvable using the frontend.)
-[Unknown]
Lars Ivar Igesund wrote:
> Bill Baxter wrote:
>
>> Just wondering why I have to give dsss the -L-ldl flag manually when I
>> compile a Derelict-using program under Linux.
>>
>> Seems like it shouldn't be neecessary for me to have to specify that.
>> But who's to blame?
>> * Is it DMD's fault for not including in the default link libs?
>> * Is it DSSS's fault for not picking up that it's needed (or for not
>> puttin it in the default list of flags?)
>> * Is it Derelict's fault for somehow not telling DSSS that it wants to
>> use libdl on Linux?
>>
>> Any of those seem possible. So anyone know the answer?
>>
>> Or is it just my fault for thinking I shouldn't have to stick a
>> version(linux) block in my dsss.conf file?
>>
>> --bb
>
> It may be that it is derelict's fault for not working with the tools, but
> there is also the relevant bugzilla entries
>
> http://d.puremagic.com/issues/show_bug.cgi?id=1663
>
> and
>
> http://d.puremagic.com/issues/show_bug.cgi?id=1690
>
> pragma(lib) should be implemented on all platforms, or removed from the spec
> entirely. I'd certainly prefer the former, as this probably is the one
> thing that a build tool normally cannot do much beyond what the compiler
> already does by telling the linker about always needed libraries (like the
> runtime).
>
|
April 13, 2008 Re: -L-ldl needed on Linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars Ivar Igesund | Lars Ivar Igesund wrote:
> Bill Baxter wrote:
>
>> Just wondering why I have to give dsss the -L-ldl flag manually when I
>> compile a Derelict-using program under Linux.
>>
>> Seems like it shouldn't be neecessary for me to have to specify that.
>> But who's to blame?
>> * Is it DMD's fault for not including in the default link libs?
>> * Is it DSSS's fault for not picking up that it's needed (or for not
>> puttin it in the default list of flags?)
>> * Is it Derelict's fault for somehow not telling DSSS that it wants to
>> use libdl on Linux?
>>
>> Any of those seem possible. So anyone know the answer?
>>
>> Or is it just my fault for thinking I shouldn't have to stick a
>> version(linux) block in my dsss.conf file?
>>
>> --bb
>
> It may be that it is derelict's fault for not working with the tools, but
> there is also the relevant bugzilla entries
>
> http://d.puremagic.com/issues/show_bug.cgi?id=1663
>
> and
>
> http://d.puremagic.com/issues/show_bug.cgi?id=1690
>
> pragma(lib) should be implemented on all platforms, or removed from the spec
> entirely.
That's certainly a problem.
However, Derelict supports DSSS, so that's not really an excuse for Derelict. It could use DSSS's pragma(link).
--bb
|
Copyright © 1999-2021 by the D Language Foundation