Upgrade problem

Dear forum. After a long time where I was on vacation, I am back on the forum. (The truth is that I missed you a lot!)

Here is my problem. I was on 9.2-RC3 and I wanted to see if 9.2-RELEASE is ready. Here is the mistake. Unfortunately I wrote freebsd-update -r 9.1-RELEASE upgrade. so I downgraded to 9.1-RELEASE-p6. When I understood my fault I tried to upgrade again to 9.2-RC3 but the system refuses.
Code:
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
I also tried to make buildworld
Code:
[ember@Unix /usr/home/ember]$ cd /usr/src/  
[ember@Unix /usr/src]$ sudo make buildworld
Password:

--------------------------------------------------------------
>>> Building an up-to-date make(1)
--------------------------------------------------------------
"/usr/share/mk/bsd.own.mk", line 661: Could not find bsd.compiler.mk
"/usr/share/mk/bsd.own.mk", line 670: Malformed conditional (${COMPILER_FEATURES:Mc++11})
"/usr/share/mk/bsd.own.mk", line 695: if-less endif
"/usr/share/mk/bsd.sys.mk", line 11: Could not find bsd.compiler.mk
"/usr/share/mk/bsd.sys.mk", line 49: Malformed conditional (!defined(NO_WCAST_ALIGN) && (${COMPILER_TYPE} != "clang"  || !defined(NO_WCAST_ALIGN.clang)))
"/usr/share/mk/bsd.sys.mk", line 66: Malformed conditional (${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD))
"/usr/share/mk/bsd.sys.mk", line 84: if-less endif
"/usr/share/mk/bsd.sys.mk", line 104: Malformed conditional (defined(NO_WFORMAT) || (${COMPILER_TYPE} == "clang" && defined(NO_WFORMAT.clang)))
"/usr/share/mk/bsd.sys.mk", line 106: if-less endif
"/usr/share/mk/bsd.sys.mk", line 107: if-less endif
"/usr/share/mk/bsd.sys.mk", line 113: Malformed conditional (${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD))
"/usr/share/mk/bsd.sys.mk", line 118: if-less endif
make: fatal errors encountered -- cannot continue
*** [make] Error code 1

Stop in /usr/src.
*** [upgrade_checks] Error code 1

Stop in /usr/src.

I am stuck and I cannot update to the newest version.
 
Hi @sk8harddiefast,

According to the announcement of FreeBSD 9.2-RC3, the correct syntax to be used is as following:
Code:
# freebsd-update upgrade -r 9.2-RC3

Also, you can use the canonical way to update from source:
Code:
# mv /usr/src /usr/src.old 
# svn checkout https://svn0.us-west.freebsd.org/base/releng/9.2/ /usr/src

IMHO, it's preferible wait to the FreeBSD 9.2-RELEASE that it should be released around 14 September 2013. Read the release schedule for more details.
 
Last edited by a moderator:
Ι don't disagree but my system now is not working properly. Even the ps command is not working. I can't wait a half month with an almost crashed system.
 
Did you also downgrade the kernel? You can run into lots of problems if your kernel and userland don't match.
 
I'd try the source route, fetch a fresh copy of the source tree and try to build that. You may need to boot to single user mode to build it correctly though.
 
I am using SVN now. I've been fetching all sources for 1:30 hour now. After that how can I upgrade to 9.2-RC3 again? I used SVN only one time in the past (there was cvsup if I am not wrong) and I don't remember at all.
 
sk8harddiefast said:
After that how can I upgrade to 9.2-RC3 again? I used svn only one time in the past (The was cvsup if I am not wrong) and I don't remember at all.
As long as you end up with a -RELEASE version with a GENERIC kernel, freebsd-update shouldn't have a problem with it.
 
sk8harddiefast said:
Ιt is still downloading! How big is the source tree?
I'm slightly rounding up here, but compressed (as found on install media) we're talking close to 100 MB, uncompressed it's approaching 800 MB.
 
It has been downloading since the morning and now it's 21:30 at night! It's on releng and has a long way to go. Is this right?
 
sk8harddiefast said:
It has been downloading since the morning and now it's 21:30 at night! It's on releng and has a long way to go. Is this right?
That depends, but probably not. How much has been downloaded so far (use e.g. du) and which server/mirror are you downloading from?
 
sk8harddiefast said:
In fact downloads all this http://svnweb.freebsd.org/base/ as I understood right. Is all this needed?

No. That directory holds all the branches. All the source for -CURRENT, -STABLE, -RELEASE, all versions. Plus other stuff.

Stop the current download and check out just what you want, probably stable/9:

rm -rf /usr/src
svn checkout [url=https://svn0.eu.FreeBSD.org/base/stable/9]https://svn0.eu.FreeBSD.org/base/stable/9[/url] /usr/src
 
Ok. Everything downloaded perfect. My /usr/src has only the /stable/9 But: sudo make buildworld

Code:
--------------------------------------------------------------
>>> Building an up-to-date make(1)
--------------------------------------------------------------
"/usr/share/mk/bsd.own.mk", line 661: Could not find bsd.compiler.mk
"/usr/share/mk/bsd.own.mk", line 670: Malformed conditional (${COMPILER_FEATURES:Mc++11})
"/usr/share/mk/bsd.own.mk", line 695: if-less endif
"/usr/share/mk/bsd.sys.mk", line 11: Could not find bsd.compiler.mk
"/usr/share/mk/bsd.sys.mk", line 49: Malformed conditional (!defined(NO_WCAST_ALIGN) && (${COMPILER_TYPE} != "clang"  || !defined(NO_WCAST_ALIGN.clang)))
"/usr/share/mk/bsd.sys.mk", line 66: Malformed conditional (${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD))
"/usr/share/mk/bsd.sys.mk", line 84: if-less endif
"/usr/share/mk/bsd.sys.mk", line 104: Malformed conditional (defined(NO_WFORMAT) || (${COMPILER_TYPE} == "clang" && defined(NO_WFORMAT.clang)))
"/usr/share/mk/bsd.sys.mk", line 106: if-less endif
"/usr/share/mk/bsd.sys.mk", line 107: if-less endif
"/usr/share/mk/bsd.sys.mk", line 113: Malformed conditional (${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD))
"/usr/share/mk/bsd.sys.mk", line 118: if-less endif
make: fatal errors encountered -- cannot continue
*** [make] Error code 1

Stop in /usr/src.
*** [upgrade_checks] Error code 1

Stop in /usr/src.

:q
 
There should not be a stable/9 directory in /usr/src.

The compile problem is... I don't know. Files missing, broken binary, something. If it were me and no backup was available, I might boot from an install CD of the right version and copy binaries and files from the install CD onto the disk, but that really is brute-force and could make things worse if not done very carefully.
 
Don't overlook what @wblock@ said .. make sure /usr/src actually contains what it should contain (the root of the source tree). A quick check for the existence of files like COPYRIGHT, MAINTAINERS, and UPDATING should tell you that you have the right files there.
 
Last edited by a moderator:
The compile problem is... I don't know. Files missing, broken binary, something. If it were me and no backup was available, I might boot from an install CD of the right version and copy binaries and files from the install CD onto the disk, but that really is brute-force and could make things worse if not done very carefully.
Another plan because this sounds very dangerous?
Do you have some peculiar sudo setup? Try logging on as root with su(1) and try again.
Same results.
 
I think yes. I can't paste everything because it's huge but the UPDATING file is telling at the end:
Code:
$FreeBSD: stable/9/UPDATING 254707 2013-08-23 14:24:46Z avg $
and my /usr/src include:
Code:
.svn		                       bin			libexec
COPYRIGHT		       cddl			release
LOCKS			       contrib		rescue
MAINTAINERS		       crypto		sbin
Makefile		               etc			secure
Makefile.inc1		       games		share
Makefile.mips		       gnu			sys
ObsoleteFiles.inc	include			        tools 
README			       kerberos5		usr.bin
UPDATING		               lib			usr.sbin

I don't overlook @wblock@ of course. I just was eating and I reply quickly.
 
Last edited by a moderator:
A little progress. make buildkernel and make installkernel worked just fine. My uname -a now says:
Code:
FreeBSD Unix 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #1 r255261: Thu Sep  5 23:23:03 EEST 2013     ember@Unix:/usr/obj/usr/src/sys/GENERIC  amd64
But make buildworld still gives me the same error. I checked on /usr/share/mk and bsd.compiler.mk is missing.
 
Back
Top