Bug 10693 - make gnatlib_and_tools fails
Summary: make gnatlib_and_tools fails
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on: 5911
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-08 20:46 UTC by kredba
Modified: 2003-10-21 16:41 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-cygwin
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2003-06-27 02:50:13


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kredba 2003-05-08 20:46:00 UTC
I have bootstraped gcc-3.3-20030506.

Reading specs from /usr/local/gcc-3.3/linux/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3-20030506/configure --prefix=/usr/local/gcc-3.3/linux --enable-shared --enable-threads=posix --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java
Thread model: posix
gcc version 3.3 20030506 (prerelease)

I am building cross gcc to i686-pc-cygwin target. Binutils, system includes and libraries are properly installed.

../gcc-3.3-20030506/configure --prefix=/usr/local/gcc-3.3/xcygwin --target=i686-pc-cygwin --with-headers=/usr/local/gcc-3.3/xcygwin/i686-pc-cygwin/include --enable-languages=c,c++,f77,objc,ada

make
cd gcc
make gnatlib_and_tools

../../xgcc -B../../ -c -DCROSS_COMPILE -DIN_GCC   `echo -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  |sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`       -DCYGWIN_CROSS_DIR=\"/usr/local/gcc-3.3/xcygwin/i686-pc-cygwin\" -I. -I.. -I../.. -I/home/david/cygwin/gcc-3.3-20030506/gcc/ada -I/home/david/cygwin/gcc-3.3-20030506/gcc/ada/.. -I/home/david/cygwin/gcc-3.3-20030506/gcc/ada/../config -I/home/david/cygwin/gcc-3.3-20030506/gcc/ada/../../include b_gnatm.c
b_gnatm.c: In function `main':
b_gnatm.c:498: warning: unused variable `ensure_reference'
../../xgcc -B../../ -DCROSS_COMPILE -DIN_GCC   `echo -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  |sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`   -o ../../gnatmake b_gnatm.o ali.o ali-util.o alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o einfo.o elists.o errout.o fmap.o fname.o fname-uf.o fname-sf.o gnatmake.o gnatvsn.o hostparm.o krunch.o lib.o make.o makeusg.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o output.o prj.o prj-attr.o prj-com.o prj-dect.o prj-env.o prj-ext.o prj-nmsc.o prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o rident.o scans.o scn.o sdefault.o sfn_scan.o sinfo.o sinfo-cn.o sinput.o sinput-l.o sinput-p.o snames.o stand.o stringt.o style.o stylesw.o validsw.o switch.o switch-m.o switch-c.o table.o targparm.o tree_io.o types.o uintp.o uname.o urealp.o usage.o widechar.o \
      ../../prefix.o ../../version.o ../rts/libgnat.a  ../../../libiberty/libiberty.a
../rts/libgnat.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make[2]: *** [../../gnatmake] Error 1
make[2]: Leaving directory `/home/david/cygwin/obj/gcc/ada/tools'
make[1]: *** [gnattools1] Error 2
make[1]: Leaving directory `/home/david/cygwin/obj/gcc/ada'
make: *** [gnattools] Error 2

ranlib solves nothing.

Release:
3.3-20030506

Environment:
i686-pc-linux-gnu, bootstraped gcc-3.3-20030506

How-To-Repeat:
Build cross linux -> cygwin gcc with ada language support included and make gnatlib_and_tools.
Comment 1 Dara Hazeghi 2003-05-26 20:51:47 UTC
Hello,

can you confirm whether this problem is also in gcc 3.3 final? Thanks,

Dara
Comment 2 Andrew Pinski 2003-05-26 20:54:54 UTC
See Dara's question
Comment 3 kredba 2003-06-22 08:24:51 UTC
Subject: Re:  make gnatlib_and_tools fails

The problem is in gcc-3.3 final too.

I used bootstraped linux gcc-3.3 to build cross linux->cygwin gcc.

../gcc-3.3/configure --prefix=/usr/local/xcygwin --target=i686-pc-cygwin 
--with-gnu-as --with-gnu-ld --with-newlib --disable-nls 
--enable-sjlj-exceptions --enable-languages=c,c++,objc,f77,ada,java 
--with-headers=/usr/local/xcygwin/include --enable-libgcj


(Libgcj has one problem too, I must report it :

/home/dave/cross-cygwin/gcc-build/gcc/xgcc -shared-libgcc 
-B/home/dave/cross-cygwin/gcc-build/gcc/ -nostdinc++ 
-L/home/dave/cross-cygwin/gcc-build/i686-pc-cygwin/libstdc++-v3/src 
-L/home/dave/cross-cygwin/gcc-build/i686-pc-cygwin/libstdc++-v3/src/.libs 
-B/usr/local/xcygwin/i686-pc-cygwin/bin/ 
-B/usr/local/xcygwin/i686-pc-cygwin/lib/ -isystem 
/usr/local/xcygwin/i686-pc-cygwin/include -DHAVE_CONFIG_H -I. 
-I../../../gcc-3.3/libjava -I./include -I./gcj 
-I../../../gcc-3.3/libjava -Iinclude -I../../../gcc-3.3/libjava/include 
-I../../../gcc-3.3/libjava/../boehm-gc/include -DSILENT=1 -DNO_SIGNALS=1 
-DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1 
-DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1 
-DNO_SIGSET=1 -DNO_DEBUGGING=1 
-I../../../gcc-3.3/libjava/.././libjava/../gcc 
-I../../../gcc-3.3/libjava/../zlib 
-I../../../gcc-3.3/libjava/../libffi/include -I../libffi/include 
-fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum 
-D__NO_MATH_INLINES -ffloat-store -I/usr/X11R6/include -W -Wall 
-D_GNU_SOURCE -DPREFIX=\"/usr/local/xcygwin\" -g -O2 -MD -MT 
java/net/natInetAddress.lo -MF java/net/natInetAddress.pp -c 
../../../gcc-3.3/libjava/java/net/natInetAddress.cc -o 
java/net/natInetAddress.o
../../../gcc-3.3/libjava/java/net/natInetAddress.cc:59: error: 
declaration of C
    function `int gethostname(char*, int)' conflicts with
    /usr/local/xcygwin/i686-pc-cygwin/include/sys/unistd.h:168: error: 
previous
       declaration `int gethostname(char*, unsigned int)' here
       make[2]: *** [java/net/natInetAddress.lo] Error 1
       make[2]: Leaving directory 
`/home/dave/cross-cygwin/gcc-build/i686-pc-cygwin/libjava'
       make[1]: *** [all-recursive] Error 1
)

After cd gcc and make gnatlib_and_tools I got :

../../xgcc -B../../ -c -DCROSS_COMPILE -DIN_GCC   `echo -g -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional 
-pedantic -Wno-long-long  |sed -e 's/-pedantic//g' -e 
's/-Wtraditional//g'` 
-DCYGWIN_CROSS_DIR=\"/usr/local/xcygwin/i686-pc-cygwin\" -I. -I.. 
-I../.. -I/home/dave/cross-cygwin/gcc-3.3/gcc/ada 
-I/home/dave/cross-cygwin/gcc-3.3/gcc/ada/.. 
-I/home/dave/cross-cygwin/gcc-3.3/gcc/ada/../config 
-I/home/dave/cross-cygwin/gcc-3.3/gcc/ada/../../include b_gnatm.c
b_gnatm.c: In function `main':
b_gnatm.c:498: warning: unused variable `ensure_reference'
../../xgcc -B../../ -DCROSS_COMPILE -DIN_GCC   `echo -g -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional 
-pedantic -Wno-long-long  |sed -e 's/-pedantic//g' -e 
's/-Wtraditional//g'`   -o ../../gnatmake b_gnatm.o ali.o ali-util.o 
alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o einfo.o 
elists.o errout.o fmap.o fname.o fname-uf.o fname-sf.o gnatmake.o 
gnatvsn.o hostparm.o krunch.o lib.o make.o makeusg.o mlib.o mlib-fil.o 
mlib-prj.o mlib-tgt.o mlib-utl.o namet.o nlists.o opt.o osint.o 
osint-m.o output.o prj.o prj-attr.o prj-com.o prj-dect.o prj-env.o 
prj-ext.o prj-nmsc.o prj-pars.o prj-part.o prj-proc.o prj-strt.o 
prj-tree.o prj-util.o rident.o scans.o scn.o sdefault.o sfn_scan.o 
sinfo.o sinfo-cn.o sinput.o sinput-l.o sinput-p.o snames.o stand.o 
stringt.o style.o stylesw.o validsw.o switch.o switch-m.o switch-c.o 
table.o targparm.o tree_io.o types.o uintp.o uname.o urealp.o usage.o 
widechar.o \
       ../../prefix.o ../../version.o ../rts/libgnat.a 
../../../libiberty/libiberty.a
../rts/libgnat.a: could not read symbols: Archive has no index; run 
ranlib to add one
collect2: ld returned 1 exit status
make[2]: *** [../../gnatmake] Error 1
make[2]: Leaving directory `/home/dave/cross-cygwin/gcc-build/gcc/ada/tools'
make[1]: *** [gnattools1] Error 2
make[1]: Leaving directory `/home/dave/cross-cygwin/gcc-build/gcc/ada'
make: *** [gnattools] Error 2


Regards,

David


dhazeghi@yahoo.com napsal(a):
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10693
> 
> 
> 
> ------- Additional Comments From dhazeghi@yahoo.com  2003-05-26 20:51 -------
> Hello,
> 
> can you confirm whether this problem is also in gcc 3.3 final? Thanks,
> 
> Dara
> 
> 
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> 


Comment 4 Andrew Pinski 2003-06-27 02:50:13 UTC
The submitter confirmed that the problem still exists in 3.3 release.
The libjava is a known problem and I think is filed under a different PR.
Comment 5 Andrew Pinski 2003-07-19 17:40:29 UTC
I have the same problem with ranlib not being run after installing gnat.
Comment 6 Andrew Pinski 2003-07-19 17:43:59 UTC
Most likely will be fixed when PR 5911 is fixed.
Comment 7 Arnaud Charlet 2003-10-21 12:28:41 UTC
The gnatlib_and_tools target is equivalent to make gnatlib gnattools
The gnattools target is only suitable for native builds.
For cross builds, you need to use cross-gnattools (and ada.all.cross)
target instead, e.g:

make gnatlib cross-gnattools ada.all.cross

So there is no bug per se.
I agree that some clean up could be useful, such as the one
suggested under PR 5911, but these two issues are different so I
am closing this PR.

Arno
Comment 8 Joseph S. Myers 2003-10-21 16:24:41 UTC
Subject: Re:  make gnatlib_and_tools fails

On Tue, 21 Oct 2003, charlet at gcc dot gnu dot org wrote:

> The gnatlib_and_tools target is equivalent to make gnatlib gnattools
> The gnattools target is only suitable for native builds.
> For cross builds, you need to use cross-gnattools (and ada.all.cross)
> target instead, e.g:
> 
> make gnatlib cross-gnattools ada.all.cross
> 
> So there is no bug per se.

The use of gnatlib_and_tools by the reporter would appear to be in
accordance with the documentation (gcc/doc/install.texi) which has no
mention of the cross-gnattools target.  You should consider being an Ada
maintainer to include maintaining the Ada-specific parts of the
installation documentation, and update and improve those as you see fit.

Of course, fixing bug 5910 so that toplevel "make" / "make bootstrap"  
(according to whether or not a cross compiler) builds the Ada library and 
tools would render that issue obsolete.

Comment 9 Arnaud Charlet 2003-10-21 16:41:51 UTC
> The use of gnatlib_and_tools by the reporter would appear to be in
> accordance with the documentation (gcc/doc/install.texi) which has no
> mention of the cross-gnattools target.  You should consider being an Ada

Actually no, the documentation is wrong and incomplete. However
it mentions explicitely that this works for building a *native*
compiler.

It indeed has no instruction for building a cross compiler.

> maintainer to include maintaining the Ada-specific parts of the
> installation documentation, and update and improve those as you see fit.

Right, this is part of the future improvements.

> Of course, fixing bug 5910 so that toplevel "make" / "make bootstrap"
> (according to whether or not a cross compiler) builds the Ada library and
> tools would render that issue obsolete.

Of course, see my message on this PR, and feel free to help there.

Arno