# Upgrading -CURRENT with buildworld



## adamk (Aug 12, 2010)

I've been having this problem trying to buildworld for the last 48 hours or so.  I'm attaching the error since it's too long to include in a post directly.

I didn't see the problem on freebsd-current, so I'm curious if anyone knows what's going on?


----------



## fronclynne (Aug 13, 2010)

All of your header files are missing?  I would guess that you caught a cvsup server in the midst of an update, or that you have something awry with your refuse files or some such.

Have you tried another server?


----------



## DutchDaemon (Aug 13, 2010)

Looks like you have an incomplete source tree. Make sure you get a proper one, either using freebsd-update(8) or csup(8). For the record: freebsd-update can *get* the source tree, but it doesn't *use* it for upgrading your operating system.


----------



## camelia (Aug 13, 2010)

This was discussed on current@ maillist, keyword - bsdgrep.


----------



## adamk (Aug 13, 2010)

fronclynne & DutchDaemon,

I've been using csup to get the source on two different machines, each using a different server.  I've updated between each attempted build, and even wiped the source tree on each machine at least once.

camelia,

Thanks, I'll take a look.  I pulled up the archives for August and just did a find for "bsdgrep" but neither of the threads with 'bsdgrep' in the subject seem to match the problem I'm having.  If I actually try to use the search function on the archive, I get an Internal Server Error.


----------



## camelia (Aug 13, 2010)

*Yawn*, BSD grep fixes, fixed in r210479.


----------



## adamk (Aug 13, 2010)

Interesting.  A patch to fix it was available as of July 25th.  Assuming it hadn't been patched yet (since it fails to build) I downloaded the patch went to apply it, only to have patch tell me 
	
	



```
Reversed (or previously applied) patch detected!  Assume -R? [y]
```

Which still leaves me wondering what's going on here 

Adam


----------



## camelia (Aug 13, 2010)

Install grep *before* building world, it's not a part of bootstrap-tools. The failing target is *depend* while grep binary is only available after *all* is built. That's why even though kdump(1) is built after grep it still fails.


----------



## adamk (Aug 13, 2010)

Thanks.  I'll take your concern over my choice of branch under advisement...  And then likely ignore it since I've been running -CURRENT and reporting problems for much longer than I care to remember sometimes.

Adam


----------



## Crabb (Aug 15, 2010)

Try to delete files /usr/src and change the mirror of cvsup (example .de), and download new sources


```
# rm -rf /usr/src && cp /usr/share/examples/cvsup/standard-supfile /root/ && sed -ie 's/CHANGE_THIS/cvsup.de/g' /root/standard-supfile
```

if you are using Freebsd 8.0 RELEASE


```
sed -ie 's/RELENG_8_0/./g' /root/standard-supfile
```

if you are using FreeBSD 8.1 RELEASE


```
sed -ie 's/RELENG_8_1/./g' /root/standard-supfile
```

Download soruces

```
csup -g -L 2 /root/standard-supfile
```

Compiling world 


```
cd /usr/src && make buildworld
```

Compiling kernel and install kernel

```
cd /usr/src && make buildkernel && make installkernel
```

Want compile your kernel


```
#mkdir /root/kernels/ && cd /usr/src/sys/$ARCH/conf/ && cp GENERIC /root/kernels
```

Change the name

```
mv GENERIC <change_name>
```

Edit the kernel configuration with a text editor (ee,vi...etc)

```
ee  /root/kernels/KERNEL_NEWNAME
```

Create a symbolik link since /usr/src/sys/$ARCH/conf


```
ln -s /root/kernels/KERNEL_NEWNAME
```

Compiling your kernel and install


```
make buildkernel KERNCONF=KERNEL_NEWNAME && make install kernel && 
reboot
```

*Edited, but, pases for pases*


----------



## adamk (Aug 15, 2010)

No need to do any of that...  camelia suggestion worked out fine.

Adam


----------

