Subject: Re: gcc3-c++ doesn't build on Red Hat 7.3
To: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
From: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
List: tech-pkg
Date: 02/14/2004 15:52:12
Ognyan Kulev wrote:
> So reading http://mail-index.netbsd.org/tech-pkg/2004/01/06/0004.html , 
> I understand that I should "nuke" /usr/pkg and start again.  I'll do it 
> and report again later.

# rm -fr /usr/pkg
# rm -rf /var/db/pkg
# cd bootstrap-pkgsrc
# ./bootstrap
# cd /usr/pkgsrc
# cvs update
# cd pkgtools/digest
# bmake install             (BTW digest was already present)
# cd ../../lang/gcc3-c
# bmake install
# cd ../../devel/cpuflags
# bmake install
# cd ../binutils
# bmake install

And the same result:

----------------------------------------------------------------
checking whether the C compiler ( 
/usr/pkgsrc/lang/gcc3-c++/work/gcc-3.3.2/gcc/xgcc 
-B/usr/pkgsrc/lang/gcc3-c++/work/gcc-3.3.2/gcc/ 
-B/usr/pkg/gcc3/i386-pc-linux/bin/ -B/usr/pkg/gcc3/i386-pc-linux/lib/ 
-isystem /usr/pkg/gcc3/i386-pc-linux/include -O2 -O2 -pipe 
-I/usr/pkg/include ) works... no
configure: error: installation or configuration problem: C compiler 
cannot create executables.
make: *** [configure-target-libiberty] Error 1
*** Error code 2
 

Stop.
bmake: stopped in /usr/pkgsrc/lang/gcc3-c++
*** Error code 1
 

Stop.
bmake: stopped in /usr/pkgsrc/lang/gcc3-c++
----------------------------------------------------------------

The end of ./work/gcc-3.3.2/i386-pc-linux/libiberty/config.log is:

----------------------------------------------------------------
configure:2392: checking whether the C compiler ( 
/usr/pkgsrc/lang/gcc3-c++/work/gcc-3.3.2/gcc/xgcc 
-B/usr/pkgsrc/lang/gcc3-c++/work/gcc-3.3.2/gcc/ 
-B/usr/pkg/gcc3/i386-pc-linux/bin/ -B/usr/pkg/gcc3/i386-pc-linux/lib/ 
-isystem /usr/pkg/gcc3/i386-pc-linux/include -O2 -O2 -pipe 
-I/usr/pkg/include ) works
configure:2408:  /usr/pkgsrc/lang/gcc3-c++/work/gcc-3.3.2/gcc/xgcc 
-B/usr/pkgsrc/lang/gcc3-c++/work/gcc-3.3.2/gcc/ 
-B/usr/pkg/gcc3/i386-pc-linux/bin/ -B/usr/pkg/gcc3/i386-pc-linux/lib/ 
-isystem /usr/pkg/gcc3/i386-pc-linux/include -o conftest -O2 -O2 -pipe 
-I/usr/pkg/include   -I/usr/pkg/include  conftest.c  1>&5
/usr/pkg/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
configure: failed program was:
 

#line 2403 "configure"
#include "confdefs.h"
 

main(){return(0);}
----------------------------------------------------------------

Again, gcc3-c is solely in /usr/pkg/gcc3/{bin,include,...}, and is not 
linked from /usr/pkg/{bin,...}.  I added PATH=/usr/pkg/gcc3/bin:$PATH, 
but this doesn't help.

Here is /etc/mk.conf:

----------------------------------------------------------------
# Example /etc/mk.conf file produced by bootstrap-pkgsrc
# Mon Sep 29 20:37:04 GMT 2003

.ifdef BSD_PKG_MK       # begin pkgsrc settings

PKG_DBDIR=/var/db/pkg
LOCALBASE=/usr/pkg
X11BASE=${LOCALBASE}
ZOULARISBASE=/usr/pkg
FETCH_CMD=/usr/pkg/bin/ftp
PAX=/usr/pkg/bin/pax
ACCEPTABLE_LICENSES+=fee-based-commercial-use unrar-license

PKG_INSTALLATION_PREFS= pkgviews overwrite

.sinclude "/usr/pkg/gcc3/mk/c.mk"
.sinclude "/usr/pkg/share/mk/cpuflags.mk"
COPTS+=-pipe
CFLAGS+=-pipe

.endif                  # end pkgsrc settings
----------------------------------------------------------------

So, what else can be done?

Regards,
ogi