View mode: basic / threaded / horizontal-split · Log in · Help
March 11, 2010
Re: any tool to at least partially convert C++ to D (htod for source
> >>>>
> >>> I also had done a fair amount of work, and foundered on the inability to
> >>> dynamically load anything without it being a big deal.
> >>>
> >>> Like you say, it has been brought up many many times. Everyone says yes,
> >>> this is a real show-stopper, then the thread dies down and so on.
> >>>
> >>> Steve
> >>
> >> What are the exact problems that people have with shared libraries on
> >> linux? I've made a few dynamic libraries on Mac OS X of which only one
> >> didn't work (I have no idea why). Among the working libraries were DWT
> >> and Tango.
> >
> > DMD on Linux does not support the creation of shared libraries.
> 
> Is that the runtime or the compiler? What about GDC, too old?

>AFAIK, it is the linker; something about Linux/Unix ELF object file formats perhaps .. though I'm
>out of my depth now.  Maybe others can explain better.

>I've never used GDC so cannot say what the issues might be there.

>Think this thread needs a new subject line to raise the visibility of the issue.  Granted
>though that Walter has acknowledged the issue (at long last).

>Understandably Walter has lots on his plate; what can be done to help out?

I work on making shared libraries work on Linux. IMO, -fPIC does not quite do what
it has to do (ie does not make EBX PIC register). I let Walter know; waiting on reply
from him (I do not want to change compiler code without his blessing).

Igor
March 11, 2010
Re: any tool to at least partially convert C++ to D (htod for source
On 3/11/10 14:12, Justin Johansson wrote:
> Jacob Carlborg Wrote:
>
>> On 3/10/10 22:59, Justin Johansson wrote:
>>> Jacob Carlborg Wrote:
>>>
>>>> On 3/10/10 16:33, Steve Teale wrote:
>>>>>>
>>>>>> The #1 show-stopper for me was lack of shared object (.so) support under
>>>>>> Linux; virtually mandated by my audience (Apache/LAMP).  (A workaround
>>>>>> like FastCGI is simply not appealing to customers.)  This topic
>>>>>> discussed many times before on this NG.
>>>>>>
>>>>>>
>>>>> I also had done a fair amount of work, and foundered on the inability to
>>>>> dynamically load anything without it being a big deal.
>>>>>
>>>>> Like you say, it has been brought up many many times. Everyone says yes,
>>>>> this is a real show-stopper, then the thread dies down and so on.
>>>>>
>>>>> Steve
>>>>
>>>> What are the exact problems that people have with shared libraries on
>>>> linux? I've made a few dynamic libraries on Mac OS X of which only one
>>>> didn't work (I have no idea why). Among the working libraries were DWT
>>>> and Tango.
>>>
>>> DMD on Linux does not support the creation of shared libraries.
>>
>> Is that the runtime or the compiler? What about GDC, too old?
>
> AFAIK, it is the linker; something about Linux/Unix ELF object file formats perhaps .. though I'm
> out of my depth now.  Maybe others can explain better.
>
> I've never used GDC so cannot say what the issues might be there.
>
> Think this thread needs a new subject line to raise the visibility of the issue.  Granted
> though that Walter has acknowledged the issue (at long last).
>
> Understandably Walter has lots on his plate; what can be done to help out?
>
> Cheers, Justin

I think what we can do to help is to track down exactly what the 
problems are and make sure Walter knows about them. If possible we could 
also try to fix them.

The problems I have are:

Undefined symbols:
__deh_beg
__deh_end
__Dmain
__minfo_beg
__minfo_end
March 11, 2010
Re: any tool to at least partially convert C++ to D (htod for source
On 3/11/10 22:34, Jacob Carlborg wrote:
> On 3/11/10 14:12, Justin Johansson wrote:
>> Jacob Carlborg Wrote:
>>
>>> On 3/10/10 22:59, Justin Johansson wrote:
>>>> Jacob Carlborg Wrote:
>>>>
>>>>> On 3/10/10 16:33, Steve Teale wrote:
>>>>>>>
>>>>>>> The #1 show-stopper for me was lack of shared object (.so)
>>>>>>> support under
>>>>>>> Linux; virtually mandated by my audience (Apache/LAMP). (A
>>>>>>> workaround
>>>>>>> like FastCGI is simply not appealing to customers.) This topic
>>>>>>> discussed many times before on this NG.
>>>>>>>
>>>>>>>
>>>>>> I also had done a fair amount of work, and foundered on the
>>>>>> inability to
>>>>>> dynamically load anything without it being a big deal.
>>>>>>
>>>>>> Like you say, it has been brought up many many times. Everyone
>>>>>> says yes,
>>>>>> this is a real show-stopper, then the thread dies down and so on.
>>>>>>
>>>>>> Steve
>>>>>
>>>>> What are the exact problems that people have with shared libraries on
>>>>> linux? I've made a few dynamic libraries on Mac OS X of which only one
>>>>> didn't work (I have no idea why). Among the working libraries were DWT
>>>>> and Tango.
>>>>
>>>> DMD on Linux does not support the creation of shared libraries.
>>>
>>> Is that the runtime or the compiler? What about GDC, too old?
>>
>> AFAIK, it is the linker; something about Linux/Unix ELF object file
>> formats perhaps .. though I'm
>> out of my depth now. Maybe others can explain better.
>>
>> I've never used GDC so cannot say what the issues might be there.
>>
>> Think this thread needs a new subject line to raise the visibility of
>> the issue. Granted
>> though that Walter has acknowledged the issue (at long last).
>>
>> Understandably Walter has lots on his plate; what can be done to help
>> out?
>>
>> Cheers, Justin
>
> I think what we can do to help is to track down exactly what the
> problems are and make sure Walter knows about them. If possible we could
> also try to fix them.
>
> The problems I have are:
>
> Undefined symbols:
> __deh_beg
> __deh_end
> __Dmain
> __minfo_beg
> __minfo_end

Just after I wrote the above I tried to add the symbols as weak symbols 
like this:

void* _deh_beg __attribute__ ((weak));
void* _deh_end __attribute__ ((weak));
void* _Dmain __attribute__ ((weak));
void* _minfo_beg __attribute__ ((weak));
void* _minfo_end __attribute__ ((weak));

Phobos then compiled and I tried a "hello world" application and it it 
worked. I don't know if there are some other parts that don't work.
March 11, 2010
Re: any tool to at least partially convert C++ to D (htod for source
>I think what we can do to help is to track down exactly what the 
>problems are and make sure Walter knows about them. If possible we could 
>also try to fix them.
>The problems I have are:
>Undefined symbols:
>__deh_beg
>__deh_end
>__Dmain
>__minfo_beg
>__minfo_end

Undefined symbols is not the fundumental problem, it is possible to make them
seen as defined. I was able to make shared runtime library as .so.
The problem is that the very first library funciton call from Dmain is not going to work,
because EBX is not PIC register.
March 11, 2010
Re: any tool to at least partially convert C++ to D (htod for source
On 3/11/10 22:52, Igor Lesik wrote:
>> I think what we can do to help is to track down exactly what the
>> problems are and make sure Walter knows about them. If possible we could
>> also try to fix them.
>> The problems I have are:
>> Undefined symbols:
>> __deh_beg
>> __deh_end
>> __Dmain
>> __minfo_beg
>> __minfo_end
>
> Undefined symbols is not the fundumental problem, it is possible to make them
> seen as defined. I was able to make shared runtime library as .so.
> The problem is that the very first library funciton call from Dmain is not going to work,
> because EBX is not PIC register.

I found out how to solved the undefined symbols problem, see my other 
post where I replied to myself. A "hello world" application worked for 
me, I guess it might have something to do with that the code is PIC as 
default on Mac OS X.
Next ›   Last »
2 3 4 5 6
Top | Discussion index | About this forum | D home