Source: crawl
Version: 2:0.20.1-1
User: helm...@debian.org
Usertags: rebootstrap

crawl fails to cross build from source for wicked reasons. I tried to
figure it out, but now I give up and write down what I have. The first
attempt to build ends with:

|     * Need to build contribs: zlib lua/src sqlite
| make[2]: Entering directory '/<<PKGBUILDDIR>>/build-console/source'
| make[2]: *** contrib: No such file or directory.  Stop.
| make[2]: Leaving directory '/<<PKGBUILDDIR>>/build-console/source'
| Makefile:1574: recipe for target '.contrib-libs' failed
| make[1]: *** [.contrib-libs] Error 2
| make[1]: Leaving directory '/<<PKGBUILDDIR>>/build-console/source'
| debian/rules:61: recipe for target 'build-stamp' failed
| make: *** [build-stamp] Error 2
| dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2

It turns out that this is due to simple typo in source/Makefile. In the
"ifdef CROSSHOST" branch, it tries to check for pkg-config and does so
with "$($shell which ...)". The extra $ makes the test fail and causes
crawl to assume that pkg-config is unavailable. It then tries to build
lua, sqlite3 and zlib. s/\$shell/shell/ fixes this part.

Then crawl no longer tries to build lua and zlib, but still tries to
build sqlite3. For cross compilation it forces SQLITE_INCLUDE_DIR to
"/usr/$(ARCH)/include" and notes that this may be wrong. It then tries
to find "$(SQLITE_INCLUDE_DIR)/sqlite3.h and concludes absence of
sqlite3. An easy workaround is to pass SQLITE_INCLUDE_DIR=/usr/include
from debian/rules.

Now crawl builds for a while and fails in source/rltiles. Maybe someone
figures out how to continue from here.

Can you fix the "$shell" typo and SQLITE_INCLUDE_DIR nonetheless?

Helmut

Reply via email to