# FreeBSD Stable Upgrade failed



## NuLL3rr0r (Sep 29, 2012)

Hi Folks,

I have 9.0-Release installed on my system:

```
FreeBSD 13x17.localhost 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29
 UTC 2012     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```

I decided to go to -STABLE branch for so many reasons. These are steps the I take:

[CMD=""]cd /usr/src/
cp /usr/share/examples/cvsup/stable-supfile ./src.sup

nano -w src.sup[/CMD]

Changes that I made in src.sup

```
*default host=ftp.FreeBSD.org
*default release=cvs tag=RELENG_9
```

[CMD=""]csup -L 2 src.sup

cd /usr/src/
make buildkernel -j5 KERNCONF=GENERIC[/CMD]

The last command fails with:

```
===> zlib (all)
cc -O2 -pipe -march=core2 -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   
-DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ 
-I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-
growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/GENERIC 
-mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-
tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-
arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-
include-dirs -fdiagnostics-show-option   -c /usr/src/sys/modules/zlib/../../net/zlib.c
ld  -d -warn-common -r -d -o zlib.ko.debug zlib.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk zlib.ko.debug  export_syms | xargs -J% objcopy % zlib.ko.debug
objcopy --only-keep-debug zlib.ko.debug zlib.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=zlib.ko.symbols zlib.ko.debug zlib.ko
1 error
*** Error code 2
1 error
*** Error code 2
1 error
```

I also tried

[CMD=""]make buildkernel KERNCONF=GENERIC[/CMD]

Which produces:

```
cc -c -x assembler-with-cpp -DLOCORE -O2 -frename-registers -pipe -fno-strict-
aliasing -march=core2 -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-
prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-
pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   
-nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -
DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param 
inline-unit-growth=100 --param large-function-growth=1000  -fno-omit-frame-pointer 
-mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-
tables -ffreestanding -fstack-protector  -Werror /usr/src/sys/amd64/acpica/acpi_switch.S
/usr/src/sys/amd64/acpica/acpi_switch.S: Assembler messages:
/usr/src/sys/amd64/acpica/acpi_switch.S:146: Error: no such instruction: `xsetbv'
/usr/src/sys/amd64/acpica/acpi_switch.S:147: Error: no such instruction: `xrstor (%rbx)'
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
```

Why I am not able to build the GENERIC-Kernel?


----------



## pkubaj (Sep 29, 2012)

You need to build world first.


----------



## wblock@ (Sep 29, 2012)

And please don't use ftp.freebsd.org as a CVS server.  It probably is one, but not by that name.  With CVS going away in a few months, now would be a good time to try svn.


----------



## NuLL3rr0r (Sep 29, 2012)

@pkubaj
Thanks that did the job. 
I was using this guide which was using the wrong order FreeBSD Stable Upgrade Procedure
I did it using the Handbook and it just went smooth Rebuilding â€œworldâ€

@wblock@
Yeah, you are right about ftp.freebsd.org.  And thanks I didn't knew FreeBSD migrated to SVN already. I thought it was scheduled for 10.0 since subversion is not part of the base system in 9.0. By the way SVN is my day to day tool and I'm going to checkout http://svn.freebsd.org/base/stable/9.


----------



## kpa (Sep 29, 2012)

The system sources have been primarily in SVN for a long time already. The deprecation of CVS is now happening because the ports tree was also moved to SVN recently.


----------



## NuLL3rr0r (Sep 29, 2012)

@kpa
Thanks for the information.


----------

