Bug 192449 - lang/python27 fails to build on FreeBSD 11
Summary: lang/python27 fails to build on FreeBSD 11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-06 19:27 UTC by cipher_nl
Modified: 2014-10-04 07:12 UTC (History)
3 users (show)

See Also:


Attachments
Complete build log of lang/python (82.00 KB, application/x-xz)
2014-08-06 22:33 UTC, cipher_nl
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description cipher_nl 2014-08-06 19:27:29 UTC
Building lang/python27 appears to be broken on FreeBSD 11. On a freshly checked out 'head' and newly downloaded portstree:

***
===>  Installing for python27-2.7.8_2
===>  Checking if lang/python27 already installed
pkg-static: Major version upgrade detected.  Running "pkg-static install -f pkg" recommended
===>   Registering installation for python27-2.7.8_2 as automatic
pkg-static: Major version upgrade detected.  Running "pkg-static install -f pkg" recommended
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/IN.py): No such file or directory
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/IN.pyo): No such file or directory
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/IN.pyc): No such file or directory
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/regen): No such file or directory
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/): No such file or directory
*** Error code 74

Stop.
make[3]: stopped in /usr/ports/lang/python27
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/lang/python27
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/python2
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/python
***
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-06 21:02:10 UTC
over to group maintainer
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-08-06 22:20:39 UTC
We cannot reproduce this issue locally, can you please provide:

- A complete build log as an attachment
- FreeBSD version information (uname -a output)
Comment 3 cipher_nl 2014-08-06 22:33:21 UTC
Created attachment 145431 [details]
Complete build log of lang/python
Comment 4 cipher_nl 2014-08-06 22:35:49 UTC
uname environment is:
FreeBSD build_4_python_11_0-002 10.0-STABLE FreeBSD 10.0-STABLE #0: Sun Apr 20 21:20:08 UTC 2014     jason@zfsguru:/usr/obj/tmpfs/2-source/sys/NEWCONS-OFED-POLLING-ALTQ  amd64

Build is executed inside pristine jail environment, which is created from a freshly built 'make installworld' 'make installkernel' and 'make distribution'.

The kernel is one where some additional stuff is added to the GENERIC kernel, like OFED Infiniband, AltQ and Device Polling. Additionally, debugging options are stripped from the kernel configuration. Otherwise it is a GENERIC-like kernel, and no sourcecode patches are applied either to the /usr/src or portstree.

Please let me know if you require anything else to diagnose this issue. Thanks!
Comment 5 cipher_nl 2014-08-06 22:37:47 UTC
Just realising this... but could the fact that the host environment is running 10-STABLE be the cause? The jail world environment is 11-CURRENT, while the environment outside of the jail is running 10-STABLE. Perhaps this is why you cannot reproduce the build? Is a build failure like this to be expected in such a case?
Comment 6 Marcus von Appen freebsd_committer freebsd_triage 2014-08-07 05:52:44 UTC
Yes, this could be the cause, since uname and friends are picked for determining e.g. the os release.

You can try to set those explicitly in /etc/make.conf. Maybe setting them solves the problem for you (it does for me in a 9x jail on a 10 host):

UNAME_r=11.0-STABLE
UNAME_v=FreeBSD 11.0-STABLE
OSVERSION=11[12345]

Set OSVERSION to the value shown in /usr/include/sys/param.h, __FreeBSD_version (of your jail).
Comment 7 cipher_nl 2014-08-07 07:45:20 UTC
Thanks for the pointer.

I scripted the retrieval of the information like this:
MAKECONF_OSVERSION=`/bin/cat /usr/include/sys/param.h | grep "^#define __FreeBSD_version" | cut -d\  -f 3 | cut -f 1`
MAKECONF_UNAME_R=`/bin/cat /usr/src/release/doc/share/xml/release.ent | grep "release.branch" | cut -d\" -f 2`
MAKECONF_UNAME_V=`/bin/cat /usr/src/release/doc/share/xml/release.ent | grep "release.branch" | cut -d\" -f 2`
echo >> /etc/make.conf
echo -n "${MAKECONF_UNAME_R}" >> /etc/make.conf
echo -n "${MAKECONF_UNAME_V}" >> /etc/make.conf
echo -n "${MAKECONF_OSVERSION}" >> /etc/make.conf

The result is the following being added to /etc/make.conf prior to building:

UNAME_r=11-CURRENT
UNAME_v=11-CURRENT
OSVERSION=1100028

However, i still get the same build failure. It still fails with:

pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/IN.py): No such file or directory
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/IN.pyo): No such file or directory
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/IN.pyc): No such file or directory
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/regen): No such file or directory
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/plat-freebsd11/): No such file or directory
*** Error code 74

Interestingly, initially i set OSVERSION to the SVN revision, which started with a '2'. This changed the failure in python27, saying "freebsd2" instead of "freebsd11". So it does appear that the setting is used. But perhaps there is an additional problem why python27 is not compiling.

Is there any more diagnosis that can be done? Thanks for the help!
Comment 8 cipher_nl 2014-08-07 07:48:21 UTC
There is a small error in my previous comment for generating the uname/OSVERSION stuff. The '-n' parameter in the echo command should be omitted. This should be correct:

MAKECONF_OSVERSION=`/bin/cat /usr/include/sys/param.h | grep "^#define __FreeBSD_version" | cut -d\  -f 3 | cut -f 1`
MAKECONF_UNAME_R=`/bin/cat /usr/src/release/doc/share/xml/release.ent | grep "release.branch" | cut -d\" -f 2`
MAKECONF_UNAME_V=`/bin/cat /usr/src/release/doc/share/xml/release.ent | grep "release.branch" | cut -d\" -f 2`
echo >> /etc/make.conf
echo "${MAKECONF_UNAME_R}" >> /etc/make.conf
echo "${MAKECONF_UNAME_V}" >> /etc/make.conf
echo "${MAKECONF_OSVERSION}" >> /etc/make.conf
Comment 9 Antoine Brodin freebsd_committer freebsd_triage 2014-08-07 07:54:17 UTC
Hi,

Here is what I put in my head jails,  in etc/login.conf:

default:\
        :passwd_format=sha512:\
        :copyright=/etc/COPYRIGHT:\
        :welcome=/etc/motd:\
        :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,UNAME_r=11.0-CURRENT,UNAME_v=FreeBSD 11.0-CURRENT,OSVERSION=1100028:\
...

and then I regenerate etc/login.conf.db:

cap_mkdb /path/to/jail/etc/login.conf
Comment 10 Eir Nym 2014-09-02 21:33:32 UTC
I haven't found these variables documented anywhere relevant to port building and creating jails.

I guess that generating these variables for etc/login.conf will be better, but scripted variant should be documented too.
Comment 11 Eir Nym 2014-09-02 21:38:40 UTC
corrected script.

MAKECONF_OSVERSION=`/bin/cat /usr/include/sys/param.h | grep "^#define __FreeBSD_version" | cut -d\  -f 3 | cut -f 1`
MAKECONF_UNAME_R=`/bin/cat /usr/src/release/doc/share/xml/release.ent | grep "release.branch" | cut -d\" -f 2`
MAKECONF_UNAME_V=`/bin/cat /usr/src/release/doc/share/xml/release.ent | grep "release.branch" | cut -d\" -f 2`
echo >> /etc/make.conf
echo "UNAME_R=\"${MAKECONF_UNAME_R}\"" >> /etc/make.conf
echo "UNAME_V=\"${MAKECONF_UNAME_V}\"" >> /etc/make.conf
echo "OSVERSION=\"${MAKECONF_OSVERSION}\"" >> /etc/make.conf
Comment 12 Marcus von Appen freebsd_committer freebsd_triage 2014-10-04 07:12:41 UTC
The issue should be fixed (mostly) with ports 369644. Please reopen the issue, if there are still problems with your jail.