# building world 8.2 release



## barp (Sep 14, 2012)

Hi. I have a 8.2 kernel on my system:

```
hw.machine: amd64
hw.model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
hw.ncpu: 8
hw.machine_arch: amd64
```
I then installed the new kernel 10.0 from the head revision.I had the procedures in the makefile

```
buildworld
buildkernel
installkernel
installworld
```
The new kernel works fine but when I reboot my old kernel. I can not ssh to the machine and also when I looked at the machine from console, I see that I can not run commands for example ifconfig. So I think of it is about the new world, is it?

So I think that I have to build the 8.2 release world and, when I need to use the old kernel, I must install the 8.2 world and use it. It it true? So I get the 8.2 release and started to build the world and then the error comes

```
/src/lib/libc/net/nsparser.y: In function '_nsaddsrctomap':
/src/lib/libc/net/nsparser.y:169: warning: implicit declaration of function 'free'
In file included from nsparser.c:398:
/src/lib/libc/../../include/stdlib.h: At top level:
/src/lib/libc/../../include/stdlib.h:93: warning: conflicting types for 'free'
/src/lib/libc/net/nsparser.y:169: warning: previous implicit declaration of 'free' was here
```
What can be done in this situation?


----------



## kpa (Sep 14, 2012)

Upgrade to a version that is two major versions ahead of the present system is not supported. The correct way would have been 8.2-RELEASE -> 9.0-RELEASE or 9-STABLE -> HEAD. Time to restore(8) a backup if you have one.


----------



## mamalos (Sep 14, 2012)

barp said:
			
		

> The new kernel works fine but when I reboot my old kernel. I can



What do you mean by that? Once you installed the new kernel as well as the new world (which you state at your original post), the new world is aware of its kernel and everything works fine. If you try to run an older kernel with the new world (especially if they have a difference of two major versions), it is highly unlikely that your *new* world will run with your *old* kernel. Use your *new* kernel with your *new* world and everything will work as expected.

On the other hand, I may have totally misunderstood what you're saying...

Nevertheless, you can build a FreeBSD 8.2 world with the same architecture as your own machine (GENERIC kernel, and no optimizations), install it in some external disk, boot with a bootable media, mount your original disk, move everything you need to some sensible location, and extract the 8.2 world on your initial partition(s).


----------



## SirDice (Sep 14, 2012)

If you want to be able to switch between 8.x and -CURRENT have a look at sysutils/beadm.

[thread=31662]HOWTO: FreeBSD ZFS Madness[/thread]


----------



## barp (Sep 14, 2012)

mamalos said:
			
		

> What do you mean by that? Once you installed the new kernel as well as the new world (which you state at your original post), the new world is aware of its kernel and everything works fine. If you try to run an older kernel with the new world (especially if they have a difference of two major versions), it is highly unlikely that your *new* world will run with your *old* kernel. Use your *new* kernel with your *new* world and everything will work as expected.
> 
> On the other hand, I may have totally misunderstood what you're saying...
> 
> Nevertheless, you can build a FreeBSD 8.2 world with the same architecture as your own machine (GENERIC kernel, and no optimizations), install it in some external disk, boot with a bootable media, mount your original disk, move everything you need to some sensible location, and extract the 8.2 world on your initial partition(s).



Yes mamalos you are right that new kernel works with new world and old kernel does not work with new world.So in order to use old kernel, i need the old world.This is what I am trying and asking. So, I co the old source 8.2.0 release.And i try to build the 8.2.0 world in order to run with 8.2.0 kernel.But when I am building the 8.2.0 world, the error comes in my question.That is nsparser.y related error in my first message. I looked at the nsparser.y and i saw that it does not include <stdlid.h>, and then i looked at the source of the 10.0.0(the new kernel i use) in the nsparser.y and i saw that it includes <stdlib.h>, so , the nsparse.y is different in 8.2.0 release and 10.0.0 source. So i added the <stdlib> to the nsparse.y and it did not gave the error.I passed that but another error
"bin/expr/expr.y:72: warning: previous declaration of 'yyparse' was here" comes this time.

So i thought this, the source of the working version 10.0.0 and 8.2.0 has some differences.

It is exactly is that, i builded the 10.0.0 world and kernel without errors but the 8.2.0 version gives the errors above, in the build world phase.

A question comes to my mind.I builded the never version world(10.0.0) on the old kernel and it worked fine. but when i am trying to build the older version in the never version it gives error.but it must be source code related


----------



## SirDice (Sep 14, 2012)

Remove the source and check out a fresh 8.3 source (8.2 is end-of-life, don't use it). 

Make sure to:

```
cd /usr/src && make clean
```
before starting the build.

There may have been some leftovers from the 10.0 build that are interfering.


----------



## barp (Sep 14, 2012)

SirDice said:
			
		

> Remove the source and check out a fresh 8.3 source (8.2 is end-of-life, don't use it).
> 
> Make sure to:
> 
> ...



Thanks SirDice I am rebuilding and waiting what to happen


----------



## barp (Sep 14, 2012)

SirDice said:
			
		

> Remove the source and check out a fresh 8.3 source (8.2 is end-of-life, don't use it).
> 
> Make sure to:
> 
> ...



SirDice it will be better me to make summary.

My 10.0 source code is located at /usr/src and I built the world, kernel, install world and kernel from here.

And then as you said, I checked out the 8.3 source to /data/8.3.0

and in /data/8.3.0, for the 8.3 world, I had the commands

```
MAKEOBJDIRPREFIX=/usr/obj78.3-world/
export MAKEOBJDIRPREFIX
make clean;
```
But in the middle of the process it stopped, it gives me the warning

```
/ was  not properly dismounted
```


----------

