2008/7/31 Stuart Henderson <[EMAIL PROTECTED]>: > On 2008/07/31 10:59, Andreas Kahari wrote: >> Hi list, >> >> I noticed that the devel/nspr port (CURRENT) requires root to build. >> It won't build with SUDO=sudo. Also, it installs header files readable >> only by root and the wheel group, which means that ports depending on >> it also needs to build as root (SUDO=sudo won't work). > > Please send a log, I build as non-root and never noticed this. > I do use SUDO=sudo -E though. > >
Here's a build log: $ grep SUDO /etc/mk.conf SUDO="sudo -E" $ make package Locking nss-3.12 (security/nss) from package ===> Checking files for nss-3.12 `/usr/ports/distfiles/nss-3.12.tar.gz' is up to date. >> (SHA256) nss-3.12.tar.gz: OK ===> Verifying update for gmake-* in devel/gmake Locking gmake-3.81p0 (devel/gmake) from subupdate Unlocking gmake-3.81p0 from subupdate ===> Returning to build of nss-3.12 ===> nss-3.12 depends on: gmake-* - found ===> Verifying update for nspr->=4.7 in devel/nspr Locking nspr-4.7.1 (devel/nspr) from subupdate Unlocking nspr-4.7.1 from subupdate ===> Returning to build of nss-3.12 ===> nss-3.12 depends on: nspr->=4.7 - found ===> Verifying update for sqlite3->=3.5 in databases/sqlite3 Locking sqlite-3.5.9 (databases/sqlite3) from subupdate Unlocking sqlite-3.5.9 from subupdate ===> Returning to build of nss-3.12 ===> nss-3.12 depends on: sqlite3->=3.5 - found ===> Verifying specs: nspr4.>=20 plc4.>=20 plds4.>=20 sqlite3.>=10.0 nspr4.>=20 plc4.>=20 plds4.>=20 sqlite3.>=10.0 c pthread z c pthread z ===> found nspr4.20.0 plc4.20.0 plds4.20.0 sqlite3.11.0 c.47.0 pthread.11.0 z.4.1 ===> Extracting for nss-3.12 ===> Patching for nss-3.12 ===> Configuring for nss-3.12 ===> Building for nss-3.12 cd ../coreconf ; gmake gmake[1]: Entering directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/coreconf' cd nsinstall; gmake export gmake[2]: Entering directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/coreconf/nsinstall' gmake[2]: Nothing to be done for `export'. gmake[2]: Leaving directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/coreconf/nsinstall' cd nsinstall; gmake libs gmake[2]: Entering directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/coreconf/nsinstall' cc -o OpenBSD4.4_OPT.OBJ/nsinstall.o -c -fPIC -DPIC -Di386 -ansi -Wall -Wno-switch -pipe -DOPENBSD -DXP_UNIX -UDEBUG -DNDEBUG -pthread -DNSS_ENABLE_ECC -DUSE_UTIL_DIRECTLY -I/usr/local/include/nspr -I../../../dist/OpenBSD4.4_OPT.OBJ/include -I../../../dist/public/coreconf -I../../../dist/private/coreconf -I/usr/local/include -O2 -pipe nsinstall.c cc -o OpenBSD4.4_OPT.OBJ/pathsub.o -c -fPIC -DPIC -Di386 -ansi -Wall -Wno-switch -pipe -DOPENBSD -DXP_UNIX -UDEBUG -DNDEBUG -pthread -DNSS_ENABLE_ECC -DUSE_UTIL_DIRECTLY -I/usr/local/include/nspr -I../../../dist/OpenBSD4.4_OPT.OBJ/include -I../../../dist/public/coreconf -I../../../dist/private/coreconf -I/usr/local/include -O2 -pipe pathsub.c cc -o OpenBSD4.4_OPT.OBJ/nsinstall -fPIC -DPIC -Di386 -ansi -Wall -Wno-switch -pipe -DOPENBSD -DXP_UNIX -UDEBUG -DNDEBUG -pthread -DNSS_ENABLE_ECC -DUSE_UTIL_DIRECTLY -I/usr/local/include/nspr -I../../../dist/OpenBSD4.4_OPT.OBJ/include -I../../../dist/public/coreconf -I../../../dist/private/coreconf -I/usr/local/include -O2 -pipe OpenBSD4.4_OPT.OBJ/nsinstall.o OpenBSD4.4_OPT.OBJ/pathsub.o OpenBSD4.4_OPT.OBJ/nsinstall.o(.text+0xb4b): In function `.L61': : warning: strcpy() is almost always misused, please use strlcpy() OpenBSD4.4_OPT.OBJ/nsinstall.o(.text+0x6b0): In function `.L61': : warning: sprintf() is often misused, please use snprintf() true -m 775 OpenBSD4.4_OPT.OBJ/nsinstall ../../../dist/OpenBSD4.4_OPT.OBJ/bin gmake[2]: Leaving directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/coreconf/nsinstall' gmake[1]: Leaving directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/coreconf' cd ../dbm ; gmake export libs gmake[1]: Entering directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm' cd include; gmake export gmake[2]: Entering directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm/include' Creating ../../../dist/public/dbm ../../coreconf/nsinstall/OpenBSD4.4_OPT.OBJ/nsinstall -R -m 444 ../../../dbm/include/cdefs.h ../../../dbm/include/mcom_db.h ../../../dbm/include/ncompat.h ../../../dbm/include/winfile.h ../../../dist/public/dbm gmake[2]: Leaving directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm/include' cd src; gmake export gmake[2]: Entering directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm/src' gmake[2]: Nothing to be done for `export'. gmake[2]: Leaving directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm/src' cd include; gmake libs gmake[2]: Entering directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm/include' gmake[2]: Nothing to be done for `libs'. gmake[2]: Leaving directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm/include' cd src; gmake libs gmake[2]: Entering directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm/src' cc -o OpenBSD4.4_OPT.OBJ/db.o -c -fPIC -DPIC -Di386 -ansi -Wall -Wno-switch -pipe -DOPENBSD -DXP_UNIX -UDEBUG -DNDEBUG -pthread -DNSS_ENABLE_ECC -DUSE_UTIL_DIRECTLY -DSTDC_HEADERS -DHAVE_STRERROR -DHAVE_SNPRINTF -DMEMMOVE -D__DBINTERFACE_PRIVATE -I/usr/local/include/nspr -I../../../dist/OpenBSD4.4_OPT.OBJ/include -I../../../dist/public/dbm -I../../../dist/private/dbm -I../../../dbm/include -I/usr/local/include -O2 -pipe ../../../dbm/src/db.c In file included from ../../../dbm/src/db.c:52: ../../../dist/public/dbm/mcom_db.h:46:21: prtypes.h: No such file or directory In file included from ../../../dbm/src/db.c:52: ../../../dist/public/dbm/mcom_db.h:239: error: syntax error before "pgno_t" ../../../dist/public/dbm/mcom_db.h:239: warning: type defaults to `int' in declaration of `pgno_t' ../../../dist/public/dbm/mcom_db.h:239: warning: data definition has no type or storage class ../../../dist/public/dbm/mcom_db.h:243: error: syntax error before "indx_t" ../../../dist/public/dbm/mcom_db.h:243: warning: type defaults to `int' in declaration of `indx_t' ../../../dist/public/dbm/mcom_db.h:243: warning: data definition has no type or storage class ../../../dist/public/dbm/mcom_db.h:245: error: syntax error before "recno_t" ../../../dist/public/dbm/mcom_db.h:245: warning: type defaults to `int' in declaration of `recno_t' ../../../dist/public/dbm/mcom_db.h:245: warning: data definition has no type or storage class ../../../dist/public/dbm/mcom_db.h:312: error: syntax error before "uint32" ../../../dist/public/dbm/mcom_db.h:333: error: syntax error before "uint32" ../../../dist/public/dbm/mcom_db.h:343: error: syntax error before "uint32" ../../../dist/public/dbm/mcom_db.h:348: error: syntax error before "uint8" ../../../dist/public/dbm/mcom_db.h:406: error: syntax error before "PR_EXTERN" ../../../dist/public/dbm/mcom_db.h:408: error: syntax error before "dbopen" ../../../dist/public/dbm/mcom_db.h:408: warning: type defaults to `int' in declaration of `dbopen' ../../../dist/public/dbm/mcom_db.h:408: warning: data definition has no type or storage class ../../../dbm/src/db.c:55: error: syntax error before "int" ../../../dbm/src/db.c:74: error: syntax error before "dbopen" ../../../dbm/src/db.c:75: warning: return type defaults to `int' ../../../dbm/src/db.c: In function `dbopen': ../../../dbm/src/db.c:112: warning: return makes integer from pointer without a cast gmake[2]: *** [OpenBSD4.4_OPT.OBJ/db.o] Error 1 gmake[2]: Leaving directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm/src' gmake[1]: *** [libs] Error 2 gmake[1]: Leaving directory `/usr/obj/ports/nss-3.12/nss-3.12/mozilla/security/dbm' gmake: *** [build_dbm] Error 2 *** Error code 2 Stop in /usr/ports/security/nss (line 2164 of /usr/ports/infrastructure/mk/bsd.port.mk). *** Error code 1 Stop in /usr/ports/security/nss (line 1422 of /usr/ports/infrastructure/mk/bsd.port.mk). *** Error code 1 Stop in /usr/ports/security/nss (line 1962 of /usr/ports/infrastructure/mk/bsd.port.mk). Unlocking nss-3.12 from package *** Error code 1 Stop in /usr/ports/security/nss (line 1942 of /usr/ports/infrastructure/mk/bsd.port.mk). $ $ $ ls -l /usr/local/include/nspr/prtypes.h -rw-r----- 1 root wheel 19966 Apr 5 2006 /usr/local/include/nspr/prtypes.h $ Building with "sudo make package" works. Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK