Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Oct 2004 19:46:22 +0200
From:      Henrik W Lund <henrik.w.lund@broadpark.no>
To:        Chris Neustrup <druid45@idiom.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: gcc34
Message-ID:  <41700CEE.8070707@broadpark.no>
In-Reply-To: <417007E2.1010801@idiom.com>
References:  <417007E2.1010801@idiom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Chris Neustrup wrote:
> I am trying to upgrade from 5.2.1 to 5.3 current.  I am
> failing to build gcc34.  Here is a snip of the lang build:
> 
> /usr/ports/lang/gcc34/work/build/gcc/xgcc 
> -B/usr/ports/lang/gcc34/work/build/gcc/ ...
> `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
> ../.././..//gcc-3.4-20040827/libiberty/fibheap.c: In function 
> `fibheap_union':
> ../.././..//gcc-3.4-20040827/libiberty/fibheap.c:166: warning: implicit 
> declaration of function `free'
> ../.././..//gcc-3.4-20040827/libiberty/fibheap.c: In function 
> `fibheap_delete_node':
> ../.././..//gcc-3.4-20040827/libiberty/fibheap.c:285: error: `LONG_MIN' 
> undeclared (first use in this function)
> ../.././..//gcc-3.4-20040827/libiberty/fibheap.c:285: error: (Each 
> undeclared identifier is reported only once
> ../.././..//gcc-3.4-20040827/libiberty/fibheap.c:285: error: for each 
> function it appears in.)
> ../.././..//gcc-3.4-20040827/libiberty/fibheap.c: In function 
> `fibheap_consolidate':
> ../.././..//gcc-3.4-20040827/libiberty/fibheap.c:395: warning: implicit 
> declaration of function `memset'
> gmake[2]: *** [fibheap.o] Error 1
> gmake[2]: Leaving directory 
> `/usr/ports/lang/gcc34/work/build/i386-portbld-freebsd5.2.1/libiberty'
> gmake[1]: *** [all-target-libiberty] Error 2
> gmake[1]: Leaving directory `/usr/ports/lang/gcc34/work/build'
> gmake: *** [bootstrap-lean] Error 2
> *** Error code 2
> 
> Stop in /usr/ports/lang/gcc34.
> 
> 
> How can I fix this?
> 
> tia, cn.
Greetings!

Don't know how you can fix this, but you don't need to install gcc3.4 
from ports. Upgrading from 5.2.1 to 5.3 can be done in the make 
buildworld, make buildkernel, make installkernel, make installworld 
procedure outlined in the handbook. The buildworl target will populate 
/usr/obj with (among other things) the new gcc3.4 system compiler, and 
the buildkernel target will utilize this newly built gcc3.4 in /usr/obj.

It's the "old" way of doing this that will mess things up (as will all 
sorts of short cuts). As long as you follow the following proedure, 
you'll be fine:

cd /usr/src
make cleanworld
make buildworld
make buildkernel (KERNCONF=YOUR_CUSTOMIZED_KERNEL)
shutdown -r now
(boot into single user)
fsck -y
mount -u /
mount -a
adjkerntz -i
mergemaster -p (do *not* skip this one! 5.3 introduces some new system 
user accounts, be sure to get those merged into /etc/passwd and /etc/group)
cd /usr/src
make installkernel (KERNCONF=YOUR_CUSTOMIZED_KERNEL)
make installworld
shutdown -r now (and cross your fingers ;-) )

Others, possibly more qualified, may tell you that some of these steps 
are not neede, and they might be right. I did it this exact way, and it 
worked for me. :-D

-- 
Henrik W Lund



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41700CEE.8070707>