Subject: pkg/18781: Cannot build pkgsrc gcc on Alpha
To: None <>
From: None <>
List: netbsd-bugs
Date: 10/22/2002 21:30:30
>Number:         18781
>Category:       pkg
>Synopsis:       A build of gcc fails due to issue with ld
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 22 18:36:00 PDT 2002
>Originator:     Kevin P. Neal
>Release:        NetBSD 1.6
System: NetBSD 1.6 NetBSD 1.6 (TOME-$Revision: 1.2 $) #0: Mon Oct 21 00:02:38 EDT 2002 alpha


A build of gcc in pkgsrc/lang/gcc fails. Seen during the build:

checking whether the C compiler (/local/pkgobj/lang/gcc/work/objdir/gcc/xgcc -B/local/pkgobj/lang/gcc/work/objdir/gcc/ -B/usr/pkg/gcc-2.95.3/alpha--netbsd/bin/ -O2 -mieee -I/usr/pkg/include ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
gmake[1]: Entering directory `/local/pkgobj/lang/gcc/work/objdir/alpha--netbsd/libio'

Seen in pkgobj/lang/gcc/work/objdir/alpha--netbsd/libiberty/config.log:

configure:1921: checking whether the C compiler (/local/pkgobj/lang/gcc/work/obj
dir/gcc/xgcc -B/local/pkgobj/lang/gcc/work/objdir/gcc/ -B/usr/pkg/gcc-2.95.3/alp
ha--netbsd/bin/ -O2 -mieee -I/usr/pkg/include ) works
configure:1937: /local/pkgobj/lang/gcc/work/objdir/gcc/xgcc -B/local/pkgobj/lang
/gcc/work/objdir/gcc/ -B/usr/pkg/gcc-2.95.3/alpha--netbsd/bin/ -o conftest -O2 -
mieee -I/usr/pkg/include   -I/usr/pkg/include  conftest.c  1>&5
/usr/bin/ld: unrecognised emulation mode: elf64alpha
Supported emulations: elf64alpha_nbsd
collect2: ld returned 1 exit status
configure: failed program was:

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



Well, I can't build Perl out of pkgsrc on my Alpha (a 164LX running
1.6). It looks like I need the pkgsrc gcc. So, I go to compile gcc
out of pkgsrc (the build of Perl didn't do it automatically). 

cd /usr/pkgsrc/lang/gcc ; make package

Time passes, bison gets installed, gcc goes back to building, then

gmake[2]: Entering directory `/local/pkgobj/lang/gcc/work/objdir/alpha--netbsd/libiberty'
gmake[2]: *** No targets specified and no makefile found.  Stop.
gmake[2]: Leaving directory `/local/pkgobj/lang/gcc/work/objdir/alpha--netbsd/libiberty'
gmake[1]: *** [../libiberty/libiberty.a] Error 2
gmake[1]: Leaving directory `/local/pkgobj/lang/gcc/work/objdir/alpha--netbsd/libstdc++'
gmake: *** [all-target-libstdc++] Error 2
*** Error code 2

make: stopped in /usr/pkgsrc/lang/gcc
*** Error code 1

make: stopped in /usr/pkgsrc/lang/gcc

Scroll back through my xterm and I eventually spot the problem. I don't
know the solution. 


Figure out why gcc wants ld to use elf64alpha instead of elf64alpha_nbsd?