# Upgrade from FreeBSD 9.2-PRERELEASE #0 r254629 to 9.2-RELEASE from source failed



## zodias (Nov 5, 2013)

Hi,

Several tries failed to upgrade from FreeBSD 9.2-PRERELEASE #0 r254629 to FreeBSD 9.2-RELEASE from source. The result is the same for downloaded sources from FTP and SVN.

Here is what the console shows:


```
===> lib/clang/libllvmx86disassembler (all)
===> lib/clang/libllvmx86info (all)
===> lib/clang/libllvmx86instprinter (all)
===> lib/clang/libllvmx86utils (all)
===> lib/clang/include (all)
1 error
*** [everything] Error code 2
1 error
*** [buildworld] Error code 2
1 error
```

With `freebsd-update` upgrade pass.

I did everything as I usually do for upgrade from source and fulfilled all guidelines from FreeBSD Handbook.

What could be the reason for such a failure?


----------



## Morte (Nov 5, 2013)

While not a solution for your problem, if you don't require clang, put 
	
	



```
WITHOUT_CLANG=1
```
 in /etc/src.conf and see if that sidesteps the problem.  Also make sure /usr/obj is empty before buildworld starts.


----------



## ShelLuser (Nov 5, 2013)

Do you use either src.conf or make.conf and if so what's in them?

It would also be interesting to know when this particular error occurs (are you building the world or the kernel or..)?

Personally I advice against trying to disallow the usage of clang because as of version 9.2 this is the preferred method. Also keep in mind that the build process starts by creating the tools required for building (to be put in /usr/obj) and then uses those tools to actually build whatever you're after (the world or the kernel).

So apart from my previous two questions I'd also suggest to clean out /usr/obj just in case (the process cleans this out itself as well, but doesn't completely wipe it as far as I know).

Hope this can help too.


----------



## wblock@ (Nov 5, 2013)

ShelLuser said:
			
		

> Personally I advice against trying to disallow the usage of clang because as of version 9.2 this is the preferred method.



Not as far as I know, that will be on FreeBSD 10.

But I agree about not disabling things that are mysteriously broken.  Fix what broke them rather than just going around, or the cause will pop up elsewhere.


----------



## zodias (Nov 6, 2013)

On the Desktop PC I don't use /etc/src.conf and /etc/make.conf is empty.

On the production machines I have 

```
WITHOUT_X11=yes
DEFAULT_VERSIONS= ruby=1.9
```
in /etc/make.conf.

Also /usr/obj is cleaned before build.


Failure happens during `#make -j6 buildworld`.


----------



## da1 (Nov 6, 2013)

Try without the `-j`.


----------



## zodias (Nov 7, 2013)

Now the error is different:


```
cc -O2 -pipe  -DDES -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign  -o ed buf.o cbc.o glbl.o io.o main.o re.o sub.o undo.o -lcrypto
gzip -cn /usr/src/bin/ed/ed.1 > ed.1.gz
===> bin/expr (all)
cc -O2 -pipe  -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c expr.c
cc1: warnings being treated as errors
expr.c:812: warning: redundant redeclaration of 'yyparse'
/usr/src/bin/expr/expr.y:77: warning: previous declaration of 'yyparse' was here
*** [expr.o] Error code 1

Stop in /usr/src/bin/expr.
*** [all] Error code 1

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

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

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

Stop in /usr/src.
```


----------



## da1 (Nov 7, 2013)

Can it be the hardware? Can you compile the same code on another PC to test?


----------



## zodias (Nov 7, 2013)

The hardware is just fine. I tried on different machines - CPUs AMD (Athlon I) and Intel (Core2Duo, i5, E8440, E3 - Xeon), MB (Assus, Gigabyte, Supermicro). The common thing is the ZFS, but I don't think it is a file system issue.

Perhaps I shall try with upper source revision first and the to the 9.2-RELEASE.

Clean install is a painful option.

Any other ideas?


----------



## trh411 (Nov 7, 2013)

You mentioned that you wiped /usr/obj before you started your build. Have you tried wiping /usr/src before pulling in the new source from svn? If you are overlaying /usr/src, there might be something residual in there that is causing your issue.

I'm just thinking of things I might try .... when all else has failed.


----------



## jalla (Nov 7, 2013)

expr is a known problem in certain PRERELASEs. You need to build a new yacc first, ref http://lists.freebsd.org/pipermail/freebsd-stable/2013-August/074952.html


----------



## zodias (Nov 8, 2013)

trh411 said:
			
		

> You mentioned that you wiped /usr/obj before you started your build. Have you tried wiping /usr/src before pulling in the new source from svn? If you are overlaying /usr/src, there might be something residual in there that is causing your issue.
> 
> I'm just thinking of things I might try .... when all else has failed.



Yes, I always clean.


----------



## zodias (Nov 8, 2013)

jalla said:
			
		

> expr is a known problem in certain PRERELASEs. You need to build a new yacc first, ref http://lists.freebsd.org/pipermail/freebsd-stable/2013-August/074952.html



It works.

Thank you once again!


----------

