'make buildworld' error

Hello,

I am running
Code:
9.1-RELEASE-p10 FreeBSD 9.1-RELEASE-p10
I am trying to set up a jail. The handbook instructs to carry out a make buildworld
This is the error I encounter when I issue the buildworld command:
Code:
===> kerberos5/tools (obj,depend,all)
===> kerberos5/tools/make-print-version (obj)
===> kerberos5/tools/make-roken (obj)
===> kerberos5/tools/asn1_compile (obj)
===> kerberos5/tools/slc (obj)
===> kerberos5/tools/make-print-version (depend)
make: don't know how to make make-print-version.c. Stop
*** [depend] Error code 2

Stop in /usr/src/kerberos5/tools.
*** [build-tools] Error code 1

Stop in /usr/src.
*** [_build-tools] Error code 1

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

Stop in /usr/src.
What can I do to resolve this? Is there some dependent package that is missing? I am not really sure, any help will be appreciated.
I have been recommended to use ezjail instead of using the jails system directly. I have no problem with this but I think that ezjail may have to go through some of the same process to build the userland programs and I could arrive at the same issue. So, it would be a good idea to resolve the problem.

Thanks,
Manas
 
worldi said:
Did you clean up /usr/obj/ before the buildworld?

Code:
# cd /usr/obj
# rm -rf *

I attempted the buildworld again after clearing out /usr/obj/ but the error persists.

/usr/src # make buildworld
Code:
...
===> kerberos5/tools (obj,depend,all)
===> kerberos5/tools/make-print-version (obj)
===> kerberos5/tools/make-roken (obj)
===> kerberos5/tools/asn1_compile (obj)
===> kerberos5/tools/slc (obj)
===> kerberos5/tools/make-print-version (depend)
make: don't know how to make make-print-version.c. Stop
*** [depend] Error code 2

Stop in /usr/src/kerberos5/tools.
*** [build-tools] Error code 1

Stop in /usr/src.
*** [_build-tools] Error code 1

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

Stop in /usr/src.

Additionally, the kernel source was downloaded using the instructions in this thread
svn checkout [url=https://svn0.us-west.freebsd.org/base/release/9.1.0/]https://svn0.us-west.freebsd.org/base/release/9.1.0/[/url] /usr/src
 
Did you delete /usr/src before doing the checkout? Old files left in there will cause problems.

Also, why check out 9.1 rather than a current version?
 
wblock@ said:
Did you delete /usr/src before doing the checkout? Old files left in there will cause problems.

Also, why check out 9.1 rather than a current version?

Deleting /usr/src and checking out the source seems to have fixed the issue. Thanks @wblock@
I checked out 9.1 as that was the version running on the system.
I am going to upgrade to 9.2-RELEASE, check out the source and then run make buildworld again.
I was under the impression that 9.2 differs from 9.1 in terms of features but not security patches. Is it recommended to upgrade 9.1 systems to 9.2?
 
Last edited by a moderator:
manas said:
I am going to upgrade to 9.2-RELEASE, check out the source and then run make buildworld again.

Wait, that's more work than necessary. If you check out 9.2, then do the buildworld, kernel, installworld, and a couple of other minor steps, it will be upgraded to 9.2.
 
manas said:
Additionally, the kernel source was downloaded using the instructions in this thread
svn checkout [url=https://svn0.us-west.freebsd.org/base/release/9.1.0/]https://svn0.us-west.freebsd.org/base/release/9.1.0/[/url] /usr/src

That's not the kernel source, that's the source for the entire OS. You're using the wrong URL. The end should be /base/releng/9.1.
 
wblock@ said:
manas said:
I am going to upgrade to 9.2-RELEASE, check out the source and then run make buildworld again.

Wait, that's more work than necessary. If you check out 9.2, then do the buildworld, kernel, installworld, and a couple of other minor steps, it will be upgraded to 9.2.

I used freebsd-update to upgrade the system to 9.2-RELEASE. make buildworld was completing successfully prior to the upgrade.

SirDice said:
manas said:
Additionally, the kernel source was downloaded using the instructions in this thread
svn checkout [url=https://svn0.us-west.freebsd.org/base/release/9.1.0/]https://svn0.us-west.freebsd.org/base/release/9.1.0/[/url] /usr/src

That's not the kernel source, that's the source for the entire OS. You're using the wrong URL. The end should be /base/releng/9.1.

Right, do I need the kernel source or the source for the whole OS when my end goal is to set up a jail? (and is either one exclusive of the other? if I get source for entire OS, do I also have kernel source?)
I did misread the instructions which made me think I should retrieve from /base/release/9.2.0
 
manas said:
Right, do I need the kernel source or the source for the whole OS when my end goal is to set up a jail?
For a jail you need the complete OS, commonly referred to as "world". A jail runs on the host's kernel, it doesn't have one itself.

(and is either one exclusive of the other? if I get source for entire OS, do I also have kernel source?)
Getting "world" gets everything, including the kernel sources. The kernel source doesn't include "world". If I remember correctly by default freebsd-update(8) only fetches the kernel source. It can be made to get the complete world but only for RELEASE versions. For -STABLE or -CURRENT you have to use svn or svnlite to get it.

I did misread the instructions which made me think I should retrieve from /base/release/9.2.0
For 9.2-RELEASE it would be /base/releng/9.2, /base/release/9.2.0 is kept for posterity's sake. It never changes so it never gets security updates either.
 
SirDice said:
For 9.2-RELEASE it would be /base/releng/9.2, /base/release/9.2.0 is kept for posterity's sake. It never changes so it never gets security updates either.

If you are familiar with version control terminology the releng paths in the SVN repository are "branches" and the release paths are "tags". In SVN there is no technical distinction between the two but their usage by convention is that branches are where the commits go and tags are just readonly snapshots from certain points of time.

The standard layout of an SVN repository is like what the ports(7) tree uses and you see the head, branches and tags subdirectories on the top level:

Code:
freebsd10 ~ % svnlite list https://svn0.eu.freebsd.org/ports
branches/
head/
svnadmin/
tags/
freebsd10 ~ %

The base repository deviates from this convention and it doesn't have those branches and tags subdirectories. I'm not sure why it was done like that. Maybe it is because the system sources are not branched like what is usually done which is to keep the latest stable version of the software under head and put the experimental stuff in a branch and later merge that experimental branch back to head. FreeBSD does kind of the reverse and branches the various stable branches off head and those stable branches are never merged back to head.
 
kpa said:
If you are familiar with version control terminology the releng paths in the SVN repository are "branches" and the release paths are "tags".
Well, I have some CVS experience but that was pretty much limited to tags only. We never used branches. And the first time I used SVN was to get the FreeBSD sources ;)

The base repository deviates from this convention and it doesn't have those branches and tags subdirectories. I'm not sure why it was done like that. Maybe it is because the system sources are not branched like what is usually done which is to keep the latest stable version of the software under head and put the experimental stuff in a branch and later merge that experimental branch back to head. FreeBSD does kind of the reverse and branches the various stable branches off head and those stable branches are never merged back to head.
For me this makes more sense, at least for the way FreeBSD keeps track of the various versions and their fixes. I guess it's done because there are usually 2 or 3 different stable versions, not just one. As of now there's 8-STABLE, 9-STABLE and 10-STABLE with 8 soon to be phased out. But all have to be kept separate.
 
I removed /usr/src after the update to 9.2-RELEASE then checked out the code in /releng/9.2 then ran make kernel-toolchain & make buildworld both of which completed without errors. I am now ready to set up my first FreeBSD jail. Thanks for the help.
 
manas said:
checked out the code in /releng/9.2 then ran make kernel-toolchain & make buildworld both of which completed without errors.
You can skip building the kernel-toolchain target. It's not needed. You pretty much only use that target if you're compiling for another architecture like ARM.
 
SirDice said:
manas said:
checked out the code in /releng/9.2 then ran make kernel-toolchain & make buildworld both of which completed without errors.
You can skip building the kernel-toolchain target. It's not needed. You pretty much only use that target if you're compiling for another architecture like ARM.

From what I remember the kernel-toolchain target is included in the buildworld target.
 
kpa said:
From what I remember the kernel-toolchain target is included in the buildworld target.
You may be right. I only ever used it when building a kernel without building world first.
 
Thank you for the responses.

I have created a jail and logged in to it through ezjail.
My end goal for this jail is to have it contacted by the host only, it will not have access to the wider internet.

To install programs through the ports system however, the jailed environment will have to connect to the internet temporarily.
I aim to do this through pf, by configuring it to NAT for traffic from 192.168.0.1 to any external address.
To accomplish this, I have added the following line:
/etc/rc.conf
Code:
ifconfig_em0_alias0="inet 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"
and the following lines:
/etc/pf.conf
Code:
ext_if="em0"

nat on $ext_if inet from 192.168.0.0/24 to any -> ($ext_if)
The resolv.conf file on the jail contains Google's public DNS servers.

I am running into a problem: network connection is not reliable. Dig queries succeed but only occasionally, the same goes for ssh connections. When I try to install ports, no connection to download the files succeeds. I think I am doing something incorrectly but I am not sure what it is.
Please help.

************************************************************************************************************************
I have got internet connectivity in the jail.
I had to clone the loopback interface in /etc/rc.conf with the private IP address 192.168.0.1.
Then, I added a line to /etc/pf.conf to redirect all traffic from the jail IP address to the public IP address.
 
Back
Top