Daily Ports+ #7: fontforge error2008年02月01日 19時39分42秒

Sometimes, ports+ fails because original distributer has problems. Some of them doesn't fail while using portupgrade. I do not know the exact differences but it fails on ports+. I suspect that recursive "Make" is related.

# ports+ /var/db/pkg/fontforge-20080109_1
...
mkdir /usr/local/libdata/pkgconfig
install  -o root -g wheel -m 444 fontforge.pc /usr/local/libdata/pkgconfig
mkdir -p /usr/local/include/fontforge
install  -o root -g wheel -m 444 ./inc/*.h /usr/local/include/fontforge
( for file in ./fontforge/*.h ; do if grep GGadget $file >/dev/null 2>&1 ; then
echo pointless >/dev/null ; else install  -o root -g wheel -m 444 $file /usr/loc
al/include/fontforge ; fi ; done )
( cd po ; make install )
make: don't know how to make w. Stop
gmake[1]: *** [install_po] Error 2
gmake[1]: Leaving directory `/ports/tmp/usr/ports/print/fontforge/work/fontforge
-20080109'
*** Error code 2

Stop in /usr/ports/print/fontforge.
*** Error code 1

Stop in /usr/ports/print/fontforge.
gmake: *** [/var/db/pkg/fontforge-20080109_2] Error 1

This time, "make" failed because it doesn't know how to make target "w" according to "make: don't know how to make w. Stop." This is GNU make calling BSD make passing incompatible flags.

Based on the error output, the error comes from the fontforge distribution. So, I take a look.


# vi /ports/tmp/usr/ports/print/fontforge/work/fontforge-20080109/Makefile

install_po:
        ( cd po ; make install )

In their make file, they call "make" hard corded. Interestingly, they use "${MAKE}" in many other places. Anyway, when calling make recursively, "${MAKE}" needs to be used such that child processes are called with the same "make" as their parent. For instance, "make" on FreeBSD is BSD make and fontforge is expecting GNU make. That is the cause of the failure.

For instance, adding "printenv" to the make file displayed that "-w" was passed to BSD make.


# vi /ports/tmp/usr/ports/print/fontforge/work/fontforge-20080109/Makefile

install_po:
        ( cd po ; printenv; make install ) 
# ports+ /var/db/pkg/fontforge-20080109_1 | grep FLAGS
MFLAGS=-w

On GNU make, -w option is to "Print a message containing the working directory before and after other processing." On the other hand, BSD make does not have this option and treat this as if they were a target.

This misuse of recursive make needs to be reported back to the fontforge developers.

Previous.