October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | On 31/10/13 12:36, Steve Teale wrote:
> On Thursday, 31 October 2013 at 10:45:05 UTC, Joseph Rushton Wakeling wrote:
>> On 31/10/13 11:31, Steve Teale wrote:
>>> so possibly the MPFR install put it in the wrong place. I will look for it.
>>> Where is the right place?
>>
>> What OS are you running?
>
> Ubuntu 12.04
Ahh, OK. What GCC source are you attempting to build from? I think that 4.7 (which lacks multiarch support) is probably not worth building against any more. I did try building against 4.7 from the deb-src package, ages ago, but I don't think I ever got it working. I _did_ get it working from the source of the gcc-snapshot package, but I'd advise against that.
I've built successfully on a 12.04 install (a university cluster) using the 4.8.1 sources (haven't updated it recently as I've been running everything on my local machine), downloaded directly from gcc.gnu.org; now, of course, you'll want 4.8.2, which should also work fine.
Supposing that you're using $SOMEDIR/gdc to store everything, a rough description of the procedure would be:
* Clone GDC master into gdc/dev
* Unzip the GCC source into gdc, which will give you a subdirectory
called gcc-$VERSION (currently gcc-4.8.2)
* cd into gdc/dev and run ./setup-gcc.sh ../gcc-4.8.2
* cd back into gdc, create gdc/objdir, cd gdc/objdir
* Run configure and make.
Here's how I like to run configure for a release build:
../gcc-4.8.2/configure --enable-languages=d --disable-multilib --enable-multiarch --enable-checking=release --prefix=/opt/gdc
You can miss off the --enable-multiarch -- which will also probably speed up your build time.
With this you shouldn't need to custom-set CPATH or LPATH. Does it work for you?
Best wishes,
-- Joe
|
October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexandr Druzhinin | On 31/10/13 12:46, Alexandr Druzhinin wrote:
> Ubuntu 12.04 x86_64 user here, I build gdc 4.8.1 following instructions I link
> above without issues, so I don't know what to do - but I'm sure it's possible :)
>
> P.S. I have mpfr in /usr/lib/x86_64-linux-gnu/
In my case the 12.04 build platform was 64-bit Opteron, but I think that still counts as x86_64, no?
|
October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexandr Druzhinin | On Thursday, 31 October 2013 at 11:46:25 UTC, Alexandr Druzhinin wrote:
> 31.10.2013 18:36, Steve Teale пишет:
>> On Thursday, 31 October 2013 at 10:45:05 UTC, Joseph Rushton Wakeling
>> wrote:
>>> On 31/10/13 11:31, Steve Teale wrote:
>>>> so possibly the MPFR install put it in the wrong place. I will look
>>>> for it.
>>>> Where is the right place?
>>>
>>> What OS are you running?
>>
>> Ubuntu 12.04
>>
> Ubuntu 12.04 x86_64 user here, I build gdc 4.8.1 following instructions I link above without issues, so I don't know what to do - but I'm sure it's possible :)
>
> P.S. I have mpfr in /usr/lib/x86_64-linux-gnu/
My 12.04 is 32 bit. MPFR is in /usr/local/lib and /usr/local/include
$CPATH and $LIBRARY_PATH were initially empty, and the build failed as decribed. I set them to the paths above, and the build failed in the same way.
Make distclean in between, and deleted all the config.cache files.
|
October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joseph Rushton Wakeling | On Thursday, 31 October 2013 at 11:54:14 UTC, Joseph Rushton Wakeling wrote:
> On 31/10/13 12:46, Alexandr Druzhinin wrote:
>> Ubuntu 12.04 x86_64 user here, I build gdc 4.8.1 following instructions I link
>> above without issues, so I don't know what to do - but I'm sure it's possible :)
>>
>> P.S. I have mpfr in /usr/lib/x86_64-linux-gnu/
>
> In my case the 12.04 build platform was 64-bit Opteron, but I think that still counts as x86_64, no?
Yup.
|
October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joseph Rushton Wakeling | > > Supposing that you're using $SOMEDIR/gdc to store everything, a rough description of the procedure would be: > > * Clone GDC master into gdc/dev > > * Unzip the GCC source into gdc, which will give you a subdirectory > called gcc-$VERSION (currently gcc-4.8.2) > > * cd into gdc/dev and run ./setup-gcc.sh ../gcc-4.8.2 > > * cd back into gdc, create gdc/objdir, cd gdc/objdir > > * Run configure and make. > > Here's how I like to run configure for a release build: > > ../gcc-4.8.2/configure --enable-languages=d --disable-multilib --enable-multiarch --enable-checking=release --prefix=/opt/gdc > > You can miss off the --enable-multiarch -- which will also probably speed up your build time. > > With this you shouldn't need to custom-set CPATH or LPATH. Does it work for you? I'm using gcc 4.8.2 - procedure as you describe and as per gdcproject wiki This is on 32bit Ubuntu 12.04 Console output prior to the error is: ... make[2]: Entering directory `/home/steve/gdc/objdir/gcc' make[2]: Leaving directory `/home/steve/gdc/objdir/gcc' Checking multilib configuration for libgcc... Configuring in i686-pc-linux-gnu/libgcc configure: loading cache ./config.cache checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for --enable-version-specific-runtime-libs... no checking for a BSD-compatible install... /usr/bin/install -c checking for gawk... mawk checking for i686-pc-linux-gnu-ar... ar checking for i686-pc-linux-gnu-lipo... lipo checking for i686-pc-linux-gnu-nm... /home/steve/gdc/objdir/./gcc/nm checking for i686-pc-linux-gnu-ranlib... ranlib checking for i686-pc-linux-gnu-strip... strip checking whether ln -s works... yes checking for i686-pc-linux-gnu-gcc... /home/steve/gdc/objdir/./gcc/xgcc -B/home/steve/gdc/objdir/./gcc/ -B/opt/gdc/i686-pc-linux-gnu/bin/ -B/opt/gdc/i686-pc-linux-gnu/lib/ -isystem /opt/gdc/i686-pc-linux-gnu/include -isystem /opt/gdc/i686-pc-linux-gnu/sys-include checking for suffix of object files... configure: error: in `/home/steve/gdc/objdir/i686-pc-linux-gnu/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[1]: *** [configure-target-libgcc] Error 1 make[1]: Leaving directory `/home/steve/gdc/objdir' make: *** [all] Error 2 The config.log file from .../gdc/objdir/gcc has the following errors I marked with ****: xgcc: error: unrecognized command line option '-V' **** xgcc: fatal error: no input files compilation terminated. configure:3358: $? = 1 configure:3347: /home/steve/gdc/objdir/./gcc/xgcc -B/home/steve/gdc/objdir/./gcc/ -B/opt/gdc/i686-pc-linux-gnu/bin/ -B/opt/gdc/i686-pc-linux-gnu/lib/ -isystem /opt/gdc/i686-pc-linux-gnu/include -isystem /opt/gdc/i686-pc-linux-gnu/sys-include -qversion >&5 **** xgcc: error: unrecognized command line option '-qversion' **** xgcc: fatal error: no input files compilation terminated. configure:3358: $? = 1 configure:3374: /home/steve/gdc/objdir/./gcc/xgcc -B/home/steve/gdc/objdir/./gcc/ -B/opt/gdc/i686-pc-linux-gnu/bin/ -B/opt/gdc/i686-pc-linux-gnu/lib/ -isystem /opt/gdc/i686-pc-linux-gnu/include -isystem /opt/gdc/i686-pc-linux-gnu/sys-include -o conftest -g -O2 conftest.c >&5 **** /home/steve/gdc/objdir/./gcc/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory configure:3377: $? = 1 configure:3565: checking for suffix of object files configure:3587: /home/steve/gdc/objdir/./gcc/xgcc -B/home/steve/gdc/objdir/./gcc/ -B/opt/gdc/i686-pc-linux-gnu/bin/ -B/opt/gdc/i686-pc-linux-gnu/lib/ -isystem /opt/gdc/i686-pc-linux-gnu/include -isystem /opt/gdc/i686-pc-linux-gnu/sys-include -c -g -O2 conftest.c >&5 **** /home/steve/gdc/objdir/./gcc/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory configure:3591: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3605: error: in `/home/steve/gdc/objdir/i686-pc-linux-gnu/libgcc': configure:3608: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. There are xgcc errors, and a shared library for MPFR that can't be found. The offending file libmpfr.so.1 is in /usr/local/lib, and the corresponding header file in /usr/local/include Setting $LIBRARY_PATH and $CPATH to these values does not effect the outcome - they were initially blank - fails both ways. Where does the build process look for this. Stumbling blindly Steve |
October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | On 31/10/13 13:07, Steve Teale wrote:
> $CPATH and $LIBRARY_PATH were initially empty, and the build failed as decribed.
> I set them to the paths above, and the build failed in the same way.
Did you try my detailed list of instructions for building using GCC 4.8 sources?
|
October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joseph Rushton Wakeling | On Thursday, 31 October 2013 at 12:49:38 UTC, Joseph Rushton Wakeling wrote:
> On 31/10/13 13:07, Steve Teale wrote:
>> $CPATH and $LIBRARY_PATH were initially empty, and the build failed as decribed.
>> I set them to the paths above, and the build failed in the same way.
>
> Did you try my detailed list of instructions for building using GCC 4.8 sources?
Yes, for the Nth time just now. Failed as described. It recompiled a lot of C++ files that it had got past before, then failed in the same way.
|
October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | On 31/10/13 13:45, Steve Teale wrote:
> There are xgcc errors, and a shared library for MPFR that can't be found.
This is a guess, but ... as it looks like the build process might be being incorrectly configured, are there any warnings in the log about needing different versions of automake, etc. from what is actually installed?
I have some recollection of (at one time) getting messages telling me that I needed a certain version installed.
|
October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joseph Rushton Wakeling | Mea Culpa. In attempting to install the prerequisites libmpc-dev libmpfr-dev libgmp3-dev I ended up building from the source code for these projects. Later, back to square one, I simply installed them using apt-get. Then the build worked. Grovel, grovel, my apologies to those whose time I wasted ;=( Steve |
October 31, 2013 Re: Building GDC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | On 31/10/13 18:33, Steve Teale wrote:
> Mea Culpa.
Don't worry about it. It's always good to know how builds can go wrong for people, because that helps the next person who runs into difficulty. Glad you finally got it built! :-)
|
Copyright © 1999-2021 by the D Language Foundation