Thread overview
[dmd-internals] DMD Build Process + Ubuntu
Jan 02, 2011
David Simcha
Jan 02, 2011
Brad Roberts
Jan 02, 2011
David Simcha
Jan 02, 2011
Brad Roberts
Jan 03, 2011
David Simcha
Jan 03, 2011
Walter Bright
January 02, 2011
Error message I receive doing a make -flinux.mak on a Ubuntu 10.10 64-bit installation:

/usr/bin/ld: cannot find -lstdc++

This happens whether I build DMD as a 32- or 64-bit binary.  I know I managed to fix this somehow previously, probably by changing the makefile to point to a specific libstdc++.  However, I'm sure I have libstdc++ installed via Ubuntu's package manager (the default, not sure of the details), and the build process really needs to "just work" on standard installs of popular distros.

--David Simcha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20110102/73516aa1/attachment.html>
January 02, 2011
I suspect you're missing the 32bit multilib bits

apt-get install g++-multilib

That will likely pull in all the packages you need.

On 1/2/2011 1:06 PM, David Simcha wrote:
> Error message I receive doing a make -flinux.mak on a Ubuntu 10.10 64-bit installation:
> 
> /usr/bin/ld: cannot find -lstdc++
> 
> This happens whether I build DMD as a 32- or 64-bit binary.  I know I managed to fix this somehow previously, probably by changing the makefile to point to a specific libstdc++.  However, I'm sure I have libstdc++ installed via Ubuntu's package manager (the default, not sure of the details), and the build process really needs to "just work" on standard installs of popular distros.
> 
> --David Simcha
> 
> 
> 
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals

January 02, 2011
Nope.

1.  That package was already installed.

2.  I also installed it for a few other versions of GCC just to see if that helped.

3.  Using MODEL=-m64 should make multilib irrelevant.  The build fails regardless of which model I build with.

On 1/2/2011 4:15 PM, Brad Roberts wrote:
> I suspect you're missing the 32bit multilib bits
>
> apt-get install g++-multilib
>
> That will likely pull in all the packages you need.
>
> On 1/2/2011 1:06 PM, David Simcha wrote:
>> Error message I receive doing a make -flinux.mak on a Ubuntu 10.10 64-bit installation:
>>
>> /usr/bin/ld: cannot find -lstdc++
>>
>> This happens whether I build DMD as a 32- or 64-bit binary.  I know I managed to fix this somehow previously, probably by changing the makefile to point to a specific libstdc++.  However, I'm sure I have libstdc++ installed via Ubuntu's package manager (the default, not sure of the details), and the build process really needs to "just work" on standard installs of popular distros.
>>
>> --David Simcha
>>
>>
>>
>> _______________________________________________
>> dmd-internals mailing list
>> dmd-internals at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-internals
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>

January 02, 2011
Ok, if libstdc++ isn't being found, you're missing a key element of a working gcc c++ compiler somehow.

>From my 64bit dev box:
$ ls -1 /var/lib/dpkg/info/*++*.list /var/lib/dpkg/info/g++-4.4.list /var/lib/dpkg/info/g++-4.4-multilib.list /var/lib/dpkg/info/g++-4.5.list /var/lib/dpkg/info/g++-4.5-multilib.list /var/lib/dpkg/info/g++.list /var/lib/dpkg/info/g++-multilib.list /var/lib/dpkg/info/lib32stdc++6.list /var/lib/dpkg/info/libstdc++6-4.4-dev.list /var/lib/dpkg/info/libstdc++6-4.5-dev.list /var/lib/dpkg/info/libstdc++6.list

My next guess is that you're missing a libstdc++ -dev package.  But if that was the case, you ought to have had much larger problems building due to a lack of c++ header files.

In case it's not clear, dmd does 'just build' for me running unbuntu maverick on an x86-64 bit box.  No hacks to any parts of the dmd makefile or souce code required.  Just a working c++ compiler.

On 1/2/2011 1:28 PM, David Simcha wrote:
> Nope.
> 
> 1.  That package was already installed.
> 
> 2.  I also installed it for a few other versions of GCC just to see if that helped.
> 
> 3.  Using MODEL=-m64 should make multilib irrelevant.  The build fails regardless of which model I build with.
> 
> On 1/2/2011 4:15 PM, Brad Roberts wrote:
>> I suspect you're missing the 32bit multilib bits
>>
>> apt-get install g++-multilib
>>
>> That will likely pull in all the packages you need.
>>
>> On 1/2/2011 1:06 PM, David Simcha wrote:
>>> Error message I receive doing a make -flinux.mak on a Ubuntu 10.10 64-bit installation:
>>>
>>> /usr/bin/ld: cannot find -lstdc++
>>>
>>> This happens whether I build DMD as a 32- or 64-bit binary.  I know I managed to fix this somehow previously, probably by changing the makefile to point to a specific libstdc++.  However, I'm sure I have libstdc++ installed via Ubuntu's package manager (the default, not sure of the details), and the build process really needs to "just work" on standard installs of popular distros.
>>>
>>> --David Simcha
>>>

January 02, 2011
Ok, I figured it out.  I had gcc pointing to a different installation than g++ because I've been messing around trying to compile gdc. Ideally, all instances of "gcc" in linux.mak should be replaced with "g++" for consistency.

On 1/2/2011 4:59 PM, Brad Roberts wrote:
> Ok, if libstdc++ isn't being found, you're missing a key element of a working gcc c++ compiler somehow.
>
> > From my 64bit dev box:
> $ ls -1 /var/lib/dpkg/info/*++*.list /var/lib/dpkg/info/g++-4.4.list /var/lib/dpkg/info/g++-4.4-multilib.list /var/lib/dpkg/info/g++-4.5.list /var/lib/dpkg/info/g++-4.5-multilib.list /var/lib/dpkg/info/g++.list /var/lib/dpkg/info/g++-multilib.list /var/lib/dpkg/info/lib32stdc++6.list /var/lib/dpkg/info/libstdc++6-4.4-dev.list /var/lib/dpkg/info/libstdc++6-4.5-dev.list /var/lib/dpkg/info/libstdc++6.list
>
> My next guess is that you're missing a libstdc++ -dev package.  But if that was the case, you ought to have had much larger problems building due to a lack of c++ header files.
>
> In case it's not clear, dmd does 'just build' for me running unbuntu maverick on an x86-64 bit box.  No hacks to any parts of the dmd makefile or souce code required.  Just a working c++ compiler.
>
> On 1/2/2011 1:28 PM, David Simcha wrote:
>> Nope.
>>
>> 1.  That package was already installed.
>>
>> 2.  I also installed it for a few other versions of GCC just to see if that helped.
>>
>> 3.  Using MODEL=-m64 should make multilib irrelevant.  The build fails regardless of which model I build with.
>>
>> On 1/2/2011 4:15 PM, Brad Roberts wrote:
>>> I suspect you're missing the 32bit multilib bits
>>>
>>> apt-get install g++-multilib
>>>
>>> That will likely pull in all the packages you need.
>>>
>>> On 1/2/2011 1:06 PM, David Simcha wrote:
>>>> Error message I receive doing a make -flinux.mak on a Ubuntu 10.10 64-bit installation:
>>>>
>>>> /usr/bin/ld: cannot find -lstdc++
>>>>
>>>> This happens whether I build DMD as a 32- or 64-bit binary.  I know I managed to fix this somehow previously, probably by changing the makefile to point to a specific libstdc++.  However, I'm sure I have libstdc++ installed via Ubuntu's package manager (the default, not sure of the details), and the build process really needs to "just work" on standard installs of popular distros.
>>>>
>>>> --David Simcha
>>>>
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>

January 02, 2011

David Simcha wrote:
>  Ideally, all instances of "gcc" in linux.mak should be replaced with
> "g++" for consistency.
>


will do.