[Openmcl-devel] problems building interface databases on Debian multiarch

Faheem Mitha faheem at faheem.info
Sun Aug 5 18:18:37 PDT 2012


Hi,

I hit a bit of a snag with building the interface databases on Debian
unstable. Debian has switched to using multiarch, which puts headers
in different places than the traditional ones. Eg. <gnu/stubs.h> is
now in

/usr/include/i386-linux-gnu/gnu/stubs.h

instead of

/usr/include/gnu/stubs.h

The error log is given below.

At first I thought this would be a major problem, but then I realised
that one can probably just add the extra include paths to those that
ffigen searches, e.g. add the necessary include paths to

CFLAGS="-isystem ${FFIGEN_DIR}/include -isystem /usr/include -isystem  /usr/local/include -quiet -fffigen ${CFLAGS}"

in ffigen4/bin/h-to-ffi.sh. It seems that -isystem is the flag to use 
here.

Does this sound correct?  I'll try it anyway. but a confirmation would
be appreciated.

                                                        Regards, Faheem

######################################################################

# Build interface directories
export CCL_INTERFACE_DB=x86-headers; export
CURDIR=/«BUILDDIR»/ccl-1.8+svn15431; export CFLAGS="";
./debian/build_interface_headers.sh
+++ /usr/include/libelf.h
In file included from /usr/include/libelf.h:1:
/usr/include/libelf/libelf.h:26:23: error: sys/types.h: No such file or
directory
In file included from /usr/include/elf.h:24,
                  from /usr/include/libelf/sys_elf.h:70,
                  from /usr/include/libelf/libelf.h:31,
                  from /usr/include/libelf.h:1:
/usr/include/features.h:323:26: error: bits/predefs.h: No such file or
directory
/usr/include/features.h:356:25: error: sys/cdefs.h: No such file or directory
/usr/include/features.h:388:23: error: gnu/stubs.h: No such file or directory
In file included from /usr/include/elf.h:30,
                  from /usr/include/libelf/sys_elf.h:70,
                  from /usr/include/libelf/libelf.h:31,
                  from /usr/include/libelf.h:1:
/usr/include/stdint.h:27:24: error: bits/wchar.h: No such file or directory
/usr/include/stdint.h:28:27: error: bits/wordsize.h: No such file or directory
In file included from /usr/include/elf.h:30,
                  from /usr/include/libelf/sys_elf.h:70,
                  from /usr/include/libelf/libelf.h:31,
                  from /usr/include/libelf.h:1:
/usr/include/stdint.h:37: error: syntax error before 'typedef'
In file included from /usr/include/libelf.h:1:
/usr/include/libelf/libelf.h:55: error: syntax error before 'typedef'
/usr/include/libelf/libelf.h:140: error: parse error before 'time_t'
/usr/include/libelf/libelf.h:144: error: parse error before 'ar_size'
/usr/include/libelf/libelf.h:146: error: parse error before '}' token
/usr/include/libelf/libelf.h:164: error: parse error before 'off_t'
/usr/include/libelf/libelf.h:167: error: parse error before '}' token
/usr/include/libelf/libelf.h:179: error: parse error before '*' token
/usr/include/libelf/libelf.h:193: error: parse error before '*' token
/usr/include/libelf/libelf.h:195: error: parse error before 'elf_getbase'
/usr/include/libelf/libelf.h:196: error: parse error before '*' token
/usr/include/libelf/libelf.h:196: error: parse error before 'Elf_Data'
/usr/include/libelf/libelf.h:205: error: parse error before '*' token
/usr/include/libelf/libelf.h:212: error: parse error before '*' token
/usr/include/libelf/libelf.h:212: error: parse error before 'Elf_Data'
/usr/include/libelf/libelf.h:215: error: parse error before 'elf_update'
/usr/include/libelf/libelf.h:217: error: parse error before '*' token
/usr/include/libelf/libelf.h:217: error: parse error before '*' token
/usr/include/libelf/libelf.h:219: error: parse error before '*' token
/usr/include/libelf/libelf.h:219: error: parse error before '*' token
/usr/include/libelf/libelf.h:239: error: parse error before '*' token
/usr/include/libelf/libelf.h:239: error: parse error before '*' token
/usr/include/libelf/libelf.h:241: error: parse error before '*' token
/usr/include/libelf/libelf.h:241: error: parse error before '*' token
make: *** [binary-arch] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
────────────────────────────────────────────────────────────────────────────────
Build finished at 20120806-0238

Finished
────────

E: Build failure (dpkg-buildpackage died)

┌──────────────────────────────────────────────────────────────────────────────┐


More information about the Openmcl-devel mailing list