NetBSD / pkgsrc

Automatic conversion of the NetBSD pkgsrc CVS module, use with care
https://www.pkgsrc.org
310 stars 164 forks source link

Building py-libxml2 fails (Ubuntu 22.04, unprivileged pkgsrc), because of the use of wrong headers (?) #150

Open algor512 opened 2 months ago

algor512 commented 2 months ago

On Ubuntu 22.04, the installation crashes when the libxml2-dev package is installed. Removing it makes the installation succeed. I noticed that in the former case the compilation log contains the following lines:

cc -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -fPIC -D_REENTRANT=1 -I/usr/include/libxml2 -I/home/algor/tmp_pkg/include/python3.12 -c libxml.c -o build/temp.linux-x86_64-cpython-312/libxml.o
cc -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -fPIC -D_REENTRANT=1 -I/usr/include/libxml2 -I/home/algor/tmp_pkg/include/python3.12 -c libxml2-py.c -o build/temp.linux-x86_64-cpython-312/libxml2-py.o

While in the latter case it contains

cc -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -fPIC -D_REENTRANT=1 -I/home/algor/tmp_pkg/include/libxml2 -I/home/algor/tmp_pkg/include/python3.12 -c libxml.c -o build/temp.linux-x86_64-cpython-312/libxml.o
cc -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -fPIC -D_REENTRANT=1 -I/home/algor/tmp_pkg/include/libxml2 -I/home/algor/tmp_pkg/include/python3.12 -c libxml2-py.c -o build/temp.linux-x86_64-cpython-312/libxml2-py.o

As you can see, in the former case it contains -I/usr/include/libxml2 and it presumabely makes it fail. I have the line PREFER_PKGSRC=yes in my mk.conf.

sskras commented 2 months ago

@algor512, which commit is that, please?

algor512 commented 2 months ago

@sskras sorry, I forgot to indicate that: I use the current trunk, so the commit c8e90121ca7b250d38fe34530797c4ac45d1dc14.