# Unable to make buildworld: undefined reference to `arc4random_uniform'



## Sephiroth (Aug 1, 2010)

I just upgraded to FreeBSD 8 from 7.2, and things went basically smoothly. I ran freebsd-update; I'm currently rebuilding all the installed ports with portupgrade -af, things are going well. However, I have several service jails on this machine, configured according to the handbook (http://www.freebsd.org/doc/handbook/jails-application.html), and I need to upgrade them as well. Step one is to go to /usr/src and make buildworld and then make installworld to my shared jail environment. However, I am unable to do this; I get this error during buildworld:


```
...
cc -O2 -pipe   -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/games/fortune/strfile/strfile.c
cc -O2 -pipe   -I/usr/obj/usr/src/tmp/legacy/usr/include  -static -L/usr/obj/usr/src/tmp/legacy/usr/lib -o strfile strfile.o -legacy
strfile.o(.text+0x895): In function `main':
: undefined reference to `arc4random_uniform'
*** Error code 1

Stop in /usr/src/games/fortune/strfile.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
```
I have been googling for a long time about this, and have found lots of copies of another person running into this, but no answers.

I updated my source tree with csup; I used the standard-supfile from the examples with a nearby mirror; I get the same error, same place. Can anybody help me out with this? It seems like this should just work, I haven't modified anything and I'm running the generic kernel. Thanks for any help!

PS: Does freebsd-update update the source tree automatically, or do I need to run the seperate csup to do that?


----------



## fronclynne (Aug 2, 2010)

You may as well run a separate csup to be sure.  You can check with [cmd=""]grep REVISION /usr/src/sys/conf/newvers.sh[/cmd].

I cannae say what your problem is exactly, but you can (probably) work around it by defining "WITHOUT_GAMES=" in your src.conf(5).  Unless you really need games in your jails.


----------



## DutchDaemon (Aug 2, 2010)

Sephiroth said:
			
		

> PS: Does freebsd-update update the source tree automatically, or do I need to run the seperate csup to do that?



Up to you. See freebsd-update.conf(5) and /etc/freebsd-update.conf.


----------



## SirDice (Aug 2, 2010)

Is there anything in /etc/make.conf and/or /etc/src.conf?


----------



## Sephiroth (Aug 3, 2010)

I did managed to get Buildworld to work, after I did an upgrade via freebsd-update from 8.0 to 8.1 It must have caught whatever was screwed up. Thanks for your time... now I'm trying to upgrade the jails again and running into problems. I'm going to post a new thread about that.


----------

