This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

possible solution for libiconv bootstrap problem



I have been fighting bootstrapping gcc with an existing tree of gnu
software. It basically is the can't find libiconv problem. 

I found in the docs the following:

 --with-libiconv-prefix=dir 

This appears to be a method to get past the libiconv problem.

I added this switch to my configure and indeed the Make process got much
further through the process.

When it gets to the point of running xgcc for the first time it can not find
libintl as shown below. This is because the libintl is also in the specified
dir. I thought the above iconv switch would make it find that.

./xgcc -B./
-B/proj/wdt/gnu_sun5.1/gcc-3.2.1/sparc-sun-solaris2.5.1/bin/ -isystem
/proj/wdt/gnu_sun5.1/gcc-3.2.1/sparc-sun-solaris2.5.1/include -isystem
/proj/wdt/gnu_sun5.1/gcc-3.2.1/sparc-sun-solaris2.5.1/sys-include
-dumpspecs > tmp-specs 


ld.so.1: ./xgcc: fatal: libintl.so.2: open failed: No such file or directory
Killed
gmake[2]: *** [specs] Error 137
gmake[2]: Leaving directory `/proj/wdtold/warrend/gnusrc/gcc-everything-3.2.1/gcc-3.2.1_sun5.1/gcc'
gmake[1]: *** [stage1_build] Error 2


The problem here is that the xgcc is compiled/linked with the -Ldir but when
it is linked it does not use a -Rdir to let the linked programs know where
the library is when they run. 

The key is that the  --with-libiconv-prefix=dir information has to be fed
down to each level by some method.

I modified the gcc/configure script as follows and was able to build the
complete package with no problems. Now there may be side affects I am not
aware of with this method.



diff configure configure.~1~
4639c4639
<       if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib -R$dir/lib"; fi
---
>       if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
6036c6036
<       if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib -R$dir/lib"; fi
---
>       if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi


Using this

setenv GCCVER      "gcc-3.3-20030508"
setenv SOURCE      "/proj/wdtold/warrend/gnusrc"
setenv DEST        "/proj/wdt/gnu_sun5.8"
setenv NEWBINBIN   "$DEST/binutils/bin"
setenv NEWGCCBIN   "$DEST/$GCCVER/bin"

cd $SOURCE/$GCCVER/${GCCVER}_sun5.8
mkdir -p $DEST/$GCCVER

../$GCCVER/configure \
--prefix=$DEST/$GCCVER \
--with-local-prefix=$DEST/$GCCVER \
--with-gnu-ld \
--with-ld=$NEWBINBIN/gld \
--with-gnu-nm \
--with-nm=$NEWBINBIN/gnm \
--with-gnu-as \
--with-as=$NEWBINBIN/gas \
--enable-threads=posix \
--enable-shared \
--enable-languages=all \
--with-libiconv-prefix=/proj/wdt/sun5.8

touch ../$GCCVER/gcc/ada/treeprs.ads
touch ../$GCCVER/gcc/ada/[es]info.h
touch ../$GCCVER/gcc/ada/nmake.ad[bs]

make bootstrap
cd gcc
make gnatlib_and_tools
cd ..
make install


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]