Freebsd Ports - Environmental variables
I’m a big fan of the FreeBSD port system. But the last few weeks
I had problems updating my freebsd ports.
A growing number of ports were giving the following error: “cc: /sbin:/bin:/…:/root/bin: No such file or directory”
A full sample:
cc: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin: No such file or directory
gmake[2]: *** [liblqr-1.la] Error 1
gmake[2]: Leaving directory `/usr/ports/graphics/liblqr-1/work/liblqr-1-0.4.1/lqr’
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/graphics/liblqr-1/work/liblqr-1-0.4.1′
gmake: *** [all] Error 2
*** Error code 1
After a lof of debugging and digging deeply in the /work directories of the broken ports. I found out
that libtool was generating a ‘wrong’ cc command. The part -L /sbin:/bin/usr/bin … etc was wrong. The path seperator ‘:’ should not be used. I thought libtool was broken. (Rule X pragmatic programmer: “SELECT Isn’t broken” ;-) )
After dinging deeply in this script I saw the $path variable was placed in this command…
After typing ’set’ to see all environment variables I found out I defined a custom $path variable.
Probably by a typing mistake. Because the real environment variable for path is PATH (uppercase…)
After remove this variable ‘path’ (”unset path” in bash), all my problems were gone…. Yess !
So some words of wisdom: NEVER define an environment variable ‘path’ on freebsd !! (And be VERY careful with your other environment variables!)
Comments(0)