# Error during make buildworld



## caesius (Feb 24, 2013)

I've not done a full rebuild for a while, and it now appears I am unable to.

Here is the tail of the log: http://pastebin.com/byxcWnZL

System:

```
FreeBSD blackbox.hansons 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1: Sun Nov 11 19:22:17 NZDT 2012     root@blackbox.hansons:/usr/obj/usr/src/sys/GENERIC  i386
```

My /etc/make.conf:

```
OVERRIDE_LINUX_BASE_PORT=f10
OVERRIDE_LINUX_NONBASE_PORTS=f10
WITHOUT_NOUVEAU=yes
# added by use.perl 2012-08-23 18:27:09
PERL_VERSION=5.14.2
WITH_PKGNG=yes
SRC_BASE=/usr/src/stable/9
```

My /etc/src.conf:

```
CC=clang
CXX=clang++
CPP=clang-cpp
```


----------



## wblock@ (Feb 24, 2013)

Why is the source directory /usr/src/stable/9?  In theory, the source directory should not matter.  In reality, it might.  Unless you have other versions of FreeBSD in /usr/src, the checkout should be just to /usr/src.

The first three lines of make.conf are obsolete.


----------



## fonz (Feb 24, 2013)

caesius said:
			
		

> ```
> SRC_BASE=/usr/src/stable/9
> [snip]
> CC=clang
> ```


We will of course try to help if we can, but the best place for -STABLE issues is probably the freebsd-stable mailing list. Of course some overlap exists, but many people on that list are not on these forums and vice versa.

On another note, FreeBSD 9 still uses gcc(1) as the default compiler. You are of course perfectly free to try building with clang(1) instead, but for the time being you can then expect the occasional issue to arise. Judging from your output, it appears that there's a linking problem, which could conceivably be caused by some kind of gcc-clang difference that hasn't been (fully) resolved yet.


----------



## caesius (Feb 24, 2013)

wblock@ said:
			
		

> Why is the source directory /usr/src/stable/9?  In theory, the source directory should not matter.  In reality, it might.  Unless you have other versions of FreeBSD in /usr/src, the checkout should be just to /usr/src.
> 
> The first three lines of make.conf are obsolete.



I have both STABLE and HEAD checked out. I use the latter to build Raspberry Pi images. But I will move this elsewhere and put my system's source at /usr/src just in case.

Thanks for the heads up about the obsolete lines though.



			
				fonz said:
			
		

> On another note, FreeBSD 9 still uses gcc(1) as the default compiler. You are of course perfectly free to try building with clang(1) instead, but for the time being you can then expect the occasional issue to arise. Judging from your output, it appears that there's a linking problem, which could conceivably be caused by some kind of gcc-clang difference that hasn't been (fully) resolved yet.



This error was the reason I tried building with clang. Before that, /etc/src.conf did not exist.


----------



## caesius (Mar 17, 2013)

I've moved the location of the source to the correct location, no difference.

http://pastebin.com/gHHQbKnB


----------



## wblock@ (Mar 17, 2013)

Please show the current /etc/make.conf.


----------



## caesius (Mar 17, 2013)

```
benjamin@blackbox> cat /etc/make.conf
WITHOUT_NOUVEAU=yes
# added by use.perl 2012-08-23 18:27:09
PERL_VERSION=5.14.2
WITH_PKGNG=yes
```

Someone on FreeNode suggested it could be a shell problem, and to try using tcsh  instead of zsh. I tried changing to tcsh before running


```
sudo make buildworld
```

but that failed with the same error.


----------



## wblock@ (Mar 17, 2013)

To eliminate as many variables as possible, move /usr/src elsewhere and check out a fresh copy.  Then don't use sudo, but log in as root or use [cmd=]su -[/cmd].


----------



## caesius (Mar 17, 2013)

I used su to change to root, then ran the same command again. Same problem.

I did a fresh checkout when I moved everything to /usr/src. So it is fresh. I will delete it, check it out again and rebuild it as root just to be sure.

Here is what I've done, for reference:


```
root@blackbox:/home/benjamin # mv /usr/src /usr/src_old
root@blackbox:/home/benjamin # svn co svn://svn.freebsd.org/base/stable/9 /usr/src
```


----------



## caesius (Mar 17, 2013)

Same problem...


----------



## kpa (Mar 17, 2013)

Have you cleared /usr/obj between the compiles?


----------



## caesius (Mar 17, 2013)

No, I have not. I assume this is simply deleting /usr/obj?


----------



## kpa (Mar 17, 2013)

I do just `# rm -rf /usr/obj/*`.


----------



## caesius (Mar 18, 2013)

Bugger. Same problem.


----------



## kpa (Mar 18, 2013)

You can try to build the world without boot blocks temporarily. When you have a working world and kernel installed turn the compilation of boot blocks back on again and install the new boot blocks and loader(8). This setting in src.conf(5) should do it:


```
WITHOUT_BOOT=1
```


----------

