# UNAME_r and OSVERSION  do not agree on major version number



## laurentius (Dec 2, 2014)

Hello all,

I am getting the following error message in the jail while trying to do the following:

```
root@dev-www-test:php-composer# make config
"/usr/ports/Mk/bsd.port.mk", line 1229: UNAME_r (10.0-RELEASE-p7) and OSVERSION (902001) do not agree on major version number.
```

Below is the version of FreeBSD that is installed on host and jail:

```
FreeBSD dev-www-test 10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #0: Tue Jul  8 06:37:44 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```

I googled the above message, but still couldn't find the solution on how to fix it.

If anybody has experienced it before and would like to share it, I appreciate that.

Thanks!
-Laurentius


----------



## wblock@ (Dec 2, 2014)

See if the jail agrees that it is running FreeBSD 9:
`make -C /usr/ports -V OSVERSION`

If that still says 902001, look for that variable being manually set somewhere, maybe in /etc/make.conf.  Or it is possible that it really does have a FreeBSD 9 world installed in the jail.


----------



## laurentius (Dec 2, 2014)

Setting OSVERSION in /etc/make.conf fixed the issue.

Using this link, https://www.freebsd.org/doc/en/books/porters-handbook/book.html#versions it helps me to find the OSVERSION number.

Thanks a lot for your help.


----------



## wblock@ (Dec 2, 2014)

No, do not set OSVERSION, it is supposed to be determined by the system.  If it is coming up wrong, setting it will only hide the problem.


----------



## laurentius (Dec 2, 2014)

I see. In that case, doing `make -C /usr/ports -V OSVERSION` still returns 902001.

I don't see any variable manually set in /etc/make.conf, except the one that I just added.

If the jail is FreeBSD 9, how can I fix it? Or do you have any other info that you can share?

Thanks!
-Laurentius


----------



## wblock@ (Dec 2, 2014)

Was the host upgraded from FreeBSD 9 to FreeBSD 10?  That would explain this.

In that case, yes, the jail needs to be upgraded.  After a source upgrade (`make buildworld installworld` and then mergemaster(8)) or binary upgrade with freebsd-update(8), then all the ports in the jail must be rebuilt, or reinstalled from packages.


----------



## bsdnet (Jan 11, 2015)

In Thread 49222, when I run `sh release.sh` on 10.1-RELEASE, also met similar issue. But I had never download 11.0-CURRENT source. Is this because release.sh  will get latest source(11.0-CURRENT) in
a chroot(8) environment, which is out of sync with local /usr/ports?

Thanks


----------

