Hello, I checked out the latest revision of luaTeX and it works fine, both on darwin and on linux. There is only a minor flaw in the building process, namely the Makefile doesn't find makecpool in the build/ subdirectory, and rightly so, because it hasn't been copied by the build.sh script. It's really only a matter of adding, for example, these two lines to build.sh, build.sh.linux, etc. just before making the binaries: # make the binaries cp -i ../src/texk/web2c/luatexdir/makecpool texk/web2c/luatexdir chmod 755 texk/web2c/luatexdir/makecpool I have no doubt there are fancier ways to do it from the Makefiles directly but I don't know them. Apart from that, the binaries work as excepted and they don't need the pool file anymore! It's a great progress but I don't know how it works. Arthur
Arthur Reutenauer wrote:
Hello,
I checked out the latest revision of luaTeX and it works fine, both on darwin and on linux. There is only a minor flaw in the building process,
Good to know.
namely the Makefile doesn't find makecpool in the build/ subdirectory,
That's odd (because it works fine here). But there is a major change from previous versions: the perl script in 'src' is no longer used. A C binary is compiled instead, inside build's luatexdir. Maybe your system got confused (see below)? Best, Taco Immediately after the compile of luatex3.c, I get: test -d luatexdir || mkdir luatexdir grep '^@d luatex_version_string==' ../../../src/texk/web2c/luatexdir/luatex.web \ | sed "s/^.*'-//;s/'.*$//" \ >luatexdir/luatex.version test -d luatexdir || mkdir luatexdir sed -e s/LUATEX-VERSION/`cat luatexdir/luatex.version`/ \ ../../../src/texk/web2c/luatexdir/luatexextra.in >luatexdir/luatexextra.h test -d luatexdir || mkdir luatexdir sed s/TEX-OR-MF-OR-MP/luatex/ ../../../src/texk/web2c/lib/texmfmp.c >luatexextra.c gcc -DHAVE_CONFIG_H -I. -I../../../src/texk/web2c -I.. -I../../../src/texk/web2c/.. -I../../libs/obsdcompat -I../../libs/obsdcompat/.. -I../../../src/texk/web2c/../../libs/obsdcompat -I../../../src/texk/web2c/../../libs/obsdcompat/.. -g -O2 -c luatexextra.c -o luatexextra.o cd luatexdir && make CC='gcc' CFLAGS='-g -O2 ' LDFLAGS='' makecpool make[1]: Entering directory `/home/taco/luatex/luatex/build/texk/web2c/luatexdir' gcc -DHAVE_CONFIG_H -I. -I../../../../src/texk/web2c/luatexdir -I.. -I../../../../src/texk/web2c/luatexdir/../.. -I.. -I../../../../src/texk/web2c/luatexdir/.. -I../.. -I../../../../src/texk/web2c/luatexdir/../.. -I../../../libs/md5 -I../../../../src/texk/web2c/luatexdir/../../../libs/md5 -I../../../libs/libpng -I../../../../src/texk/web2c/luatexdir/../../../libs/libpng -I../../../libs/zlib -I../../../../src/texk/web2c/luatexdir/../../../libs/zlib -I../../../libs/obsdcompat -I../../../libs/obsdcompat/.. -I../../../../src/texk/web2c/luatexdir/../../../libs/obsdcompat -I../../../../src/texk/web2c/luatexdir/../../../libs/obsdcompat/.. -DpdfTeX -g -O2 -c ../../../../src/texk/web2c/luatexdir/makecpool.c -o makecpool.o gcc -o makecpool makecpool.o make[1]: Leaving directory `/home/taco/luatex/luatex/build/texk/web2c/luatexdir' ./luatexdir/makecpool luatex.pool luatexdir/ptexlib.h > loadpool.c gcc -DHAVE_CONFIG_H -I. -I../../../src/texk/web2c -I.. -I../../../src/texk/web2c/.. -I../../libs/obsdcompat -I../../libs/obsdcompat/.. -I../../../src/texk/web2c/../../libs/obsdcompat -I../../../src/texk/web2c/../../libs/obsdcompat/.. -g -O2 -c loadpool.c -o loadpool.o
namely the Makefile doesn't find makecpool in the build/ subdirectory,
That's odd (because it works fine here).
I got it! The reason for the system to be confused is indeed the change from the Perl script to the C binary; the bug happens in build/texk/web2c (just after making luatexextra.o, it doesn't go "cd luatexdir && make CC='gcc' CFLAGS='-g -O2 ' LDFLAGS='' makecpool"): At this point, the Makefile looks for a luatexdir/makecpool dependency, and apparently it's happy if it can find $(srcdir)/luatexdir/makecpool (with srcdir=../../../src/texk/web2c set during the configuration process). Of course it's wrong, since this makecpool is the Perl script in the src directory, and not the compiled C binary. But the Makefile doesn't care, it assumes the dependency requirements for loadpool.c are met, and it tries to make loadpool.c with luatexdir/makecpool (that is, in the *build* directory); which of course fails, since luatexdir/makecpool doesn't exist. I found out this error only happens if there is no luatexdir/makecpool present in the build directory (which is the case when one builds from a fresh checkout). If there is an out-of-date luatexdir/makecpool, this one is taken in account when looking for dependencies, so it works when the build directly is updated, and it should explain why you don't have this error. You really should try it, because it looks quite independent from the machine: go to build/texk/web2c and try these two lines rm luatexdir/makecpool && make luatexdir/makecpool => I get "make: `../../../src/texk/web2c/luatexdir/makecpool' is up to date." touch luatexdir/makecpool && make luatexdir/makecpool => I get "make: `luatexdir/makecpool' is up to date." Of course in the latter case, luatexdir/makecpool is not up to date, it's just a phoney file, but it proves that make does not always look for dependencies where we expect it to do. Unfortunately I have no idea how to solve this particular problem because I find no place in the Makefile where this "fall-back" dependency directory is defined; I can understand that this sort of black magic by GNU make is sometimes called for, but in our case it's simply annoying. Maybe it would be best to just remove the Perl script which is now useless (of course if make cannot find $(srcdir)/luatexdir/makecpool either, it simply builds the target the way it should). I hope it's clear enough. Yours, Arthur
Arthur Reutenauer wrote:
namely the Makefile doesn't find makecpool in the build/ subdirectory,
That's odd (because it works fine here).
(long explanation snipped for now) I see. This could be a bug/difference in make executables, because my 'make' does not seem to have that problem. Anyway, as you say, there is a simple and efficient fix: delete the perl file! (which is what I've done in the repository) Thanks for checking this, Taco
I see. This could be a bug/difference in make executables, because my 'make' does not seem to have that problem.
Thank you for checking. It's odd, though, since it happens for me on two completely unrelated machines (running Mac OS X and Linux, respectively), and in both cases I use GNU make. Anyway, with the Perl script removed in the repository it compiles all right, thanks.
I can understand that this sort of black magic by GNU make is sometimes called for,
OK, I get it now. Actually it's really an important feature of GNU make (documented in section 4.5 of the info file: Rules > Directory Search), which I think can be of interest, so I will explain it: when looking for prerequisites, GNU make can be specified a list of directories to search in addition to the current directory; for example, assume we're building luatex in build/texk/web2c: actually there are no source files there, everything is in ../../../src/texk/web2c, and GNU make knows about it if we set the variable VPATH, which is taken care of by the configure script. So, if the Makefile can find prerequisites there and if they're up to date, it's happy and it builds the target. So in my case, when building loadpool.c, make was looking for luatexdir/makecpool, found ../../../src/texk/web2c/luatexdir/makecpool (the Perl script), assumed it was up to date (since it was freshly checked out and just as old as the C program in the same directory), and then tried to output loadpool.c by running ./luatexdir/makecpool which was absent. Of course, in a working directory with the right timestamps, the C program would be 24 hours old while the Perl script would date back to six months, so the Makefile would decide that luatexdir/makecpool had to be rebuilt. Anyway, it's settled now, and sorry for the noise. Arthur
participants (2)
-
Arthur Reutenauer
-
Taco Hoekwater