1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unable to make buildworld: undefined reference to `arc4random_uniform'

Discussion in 'Installing and Upgrading FreeBSD' started by Sephiroth, Aug 1, 2010.

  1. Sephiroth

    Sephiroth New Member

    Messages:
    22
    Thanks Received:
    0
    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:

    Code:
    ...
    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?
     
  2. fronclynne

    fronclynne New Member

    Messages:
    1,297
    Thanks Received:
    167
    You may as well run a separate csup to be sure. You can check with grep REVISION /usr/src/sys/conf/newvers.sh.

    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.
     
  3. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,724
    Thanks Received:
    2,137
    Up to you. See freebsd-update.conf(5) and /etc/freebsd-update.conf.
     
  4. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,523
    Thanks Received:
    2,351
    Is there anything in /etc/make.conf and/or /etc/src.conf?
     
  5. Sephiroth

    Sephiroth New Member

    Messages:
    22
    Thanks Received:
    0
    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.