Freetype port makefile is broken

Eygene A. Ryabinkin rea at rea.mbslab.kiae.ru
Tue Aug 17 21:48:24 PDT 2004


 Hello!
I've tried to build print/freetype port (Makefile version 1.32, FreeBSD
5.2-CURRENT) and it stopped uppon compilation of libttf.la, saying that
----------------
===>  Building for freetype-1.3.1_3
cd lib; gmake -f arch/unix/Makefile all
gmake[1]: Entering directory `/usr/ports/print/freetype/work/freetype-1.3.1/lib'
rm -f memory.c file.c mutex.c
ln -s /usr/ports/print/freetype/work/freetype-1.3.1/lib/arch/unix/../../ttmemory.c memory.c
ln -s /usr/ports/print/freetype/work/freetype-1.3.1/lib/arch/unix/../../arch/unix/ttmmap.c file.c
ln -s /usr/ports/print/freetype/work/freetype-1.3.1/lib/arch/unix/../../ttmutex.c mutex.c
gmake -f i386/Makefile LIB_FILES="freetype.lo ftxkern.lo ftxgasp.lo ftxpost.lo ftxcmap.lo ftxsbit.lo ftxwidth.lo ftxerr18.lo ftxgsub.lo ftxgpos.lo ftxgdef.lo ftxopen.lo" libttf.la
gmake[2]: Entering directory `/usr/ports/print/freetype/work/freetype-1.3.1/lib'gmake[2]: i386/Makefile: No such file or directory
gmake[2]: *** Нет правила для сборки цели `i386/Makefile'.  Останов.
gmake[2]: Leaving directory `/usr/ports/print/freetype/work/freetype-1.3.1/lib'
gmake[1]: *** [all] Ошибка 2
gmake[1]: Leaving directory `/usr/ports/print/freetype/work/freetype-1.3.1/lib'
gmake: *** [ttlib] Ошибка 2
*** Error code 2
----------------
Couple of minutes later I've discovered, that the problem lies in file
work/freetype-1.3.1/lib/arch/unix/Makefile: it defines the variable ARCH as
'arch/unix' and later uses it as a base for makefiles. But supposedly ARCH
was defined earlier as 'i386' (that is my native hadrware architecture).
Gmake uses that variable, thus incorrectly invokes command
--
gmake -f i386/Makefile LIB_FILES="freetype.lo ftxkern.lo ftxgasp.lo ftxpost.lo ftxcmap.lo ftxsbit.lo ftxwidth.lo ftxerr18.lo ftxgsub.lo ftxgpos.lo ftxgdef.lo ftxopen.lo" libttf.la
--
instead of correct one
--gmake -f arch/unix/Makefile LIB_FILES="freetype.lo ftxkern.lo ftxgasp.lo ftxpost.lo ftxcmap.lo ftxsbit.lo ftxwidth.lo ftxerr18.lo ftxgsub.lo ftxgpos.lo ftxgdef.lo ftxopen.lo" libttf.la
--
Since I wanted a quick solution, I've replaced 'ARCH' by 'ARCHt' everywhere in
that Makefile and the build suceeded. This is, of course, only dirty hack, not
proper solution. I don't know why gmake behaves that variables from environment
take precedence over Makefile variables, it's not the default behaviour, but
I hope I'll discover the reason a bit later.
 Thanks for audience,
	rea


More information about the freebsd-ports mailing list