tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-libxml2 fails to build on Linux



Hi!

With an up-to-date pkgsrc, I am trying to build py-libxml2 on Linux (Fedora 39), and it fails miserably:

cc -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/usr/pkg/include -D_XOPEN_SOURCE_EXTENDED=1 -I/usr/pkg/include/ncurses -I/usr/pkg/include/db4 -O2 -I/usr/include -I/usr/pkg/include -D_XOPEN_SOURCE_EXTENDED=1 -I/usr/pkg/include/ncurses -I/usr/pkg/include/db4 -O2 -I/usr/include -I/usr/pkg/include -D_XOPEN_SOURCE_EXTENDED=1 -I/usr/pkg/include/ncurses -I/usr/pkg/include/db4 -O2 -I/usr/include -I/usr/pkg/include/python3.11 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/python3.11 -I/usr/pkg/include -fPIC -D_REENTRANT=1 -I/usr/include/libxml2 -I/usr/pkg/include/python3.11 -c libxml2-py.c -o build/temp.linux-aarch64-cpython-311/libxml2-py.o
libxml2-py.c:206:1: error: unknown type name 'XML_POP_WARNINGS'
  206 | XML_POP_WARNINGS
      | ^~~~~~~~~~~~~~~~
libxml2-py.c:210:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
  210 | PyObject *
      |          ^
libxml2-py.c:334:1: error: unknown type name 'XML_POP_WARNINGS'
  334 | XML_POP_WARNINGS
      | ^~~~~~~~~~~~~~~~
libxml2-py.c:338:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
  338 | PyObject *
      |          ^

And many more errors.

Looking at that compiler command line, it is definitely not using buildlink, and notably it lists /usr/include before /usr/pkg/include. I assume this means it is trying to compile against the libxml in Fedora base, which is at a different version.

FWIW, the libxml2 version in Fedora is libxml2-2.10.4-3.fc39.aarch64, whereas the pkgsrc one is 2.12.4.

Unfortunately, I know very little about python/C builds, anyone has a hint for me?

--
Benny


Home | Main Index | Thread Index | Old Index