Hi guys, This is what Gentoo generates:
[code] igor@IgorReinCloud ~/dbhandler/Debug/libpostgres $ make clean && make V=1 test -z "libpostgres.la" || rm -f libpostgres.la rm -f ./so_locations rm -rf .libs _libs rm -f *.o rm -f *.lo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/home/igor/dbhandler/libpostgres -I.. -D__WXGTK__ -I../../dbinterface `pg_config --includedir` -g -O0 -MT libpostgres_la-database_postgres.lo -MD -MP -MF .deps/libpostgres_la-database_postgres.Tpo -c -o libpostgres_la-database_postgres.lo `test -f 'database_postgres.cpp' || echo '/home/igor/dbhandler/libpostgres/'`database_postgres.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/home/igor/dbhandler/libpostgres -I.. -D__WXGTK__ -I../../dbinterface /usr/include/postgresql-14 -g -O0 -MT libpostgres_la-database_postgres.lo -MD -MP -MF .deps/libpostgres_la-database_postgres.Tpo -c /home/igor/dbhandler/libpostgres/database_postgres.cpp -fPIC -DPIC -o .libs/libpostgres_la-database_postgres.o g++: warning: /usr/include/postgresql-14: linker input file unused because linking not done libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/home/igor/dbhandler/libpostgres -I.. -D__WXGTK__ -I../../dbinterface /usr/include/postgresql-14 -g -O0 -MT libpostgres_la-database_postgres.lo -MD -MP -MF .deps/libpostgres_la-database_postgres.Tpo -c /home/igor/dbhandler/libpostgres/database_postgres.cpp -o libpostgres_la-database_postgres.o >/dev/null 2>&1 mv -f .deps/libpostgres_la-database_postgres.Tpo .deps/libpostgres_la-database_postgres.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/home/igor/dbhandler/libpostgres -I.. -D__WXGTK__ -I../../dbinterface `pg_config --includedir` -g -O0 -MT libpostgres_la-postgres.lo -MD -MP -MF .deps/libpostgres_la-postgres.Tpo -c -o libpostgres_la-postgres.lo `test -f 'postgres.cpp' || echo '/home/igor/dbhandler/libpostgres/'`postgres.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/home/igor/dbhandler/libpostgres -I.. -D__WXGTK__ -I../../dbinterface /usr/include/postgresql-14 -g -O0 -MT libpostgres_la-postgres.lo -MD -MP -MF .deps/libpostgres_la-postgres.Tpo -c /home/igor/dbhandler/libpostgres/postgres.cpp -fPIC -DPIC -o .libs/libpostgres_la-postgres.o g++: warning: /usr/include/postgresql-14: linker input file unused because linking not done libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/home/igor/dbhandler/libpostgres -I.. -D__WXGTK__ -I../../dbinterface /usr/include/postgresql-14 -g -O0 -MT libpostgres_la-postgres.lo -MD -MP -MF .deps/libpostgres_la-postgres.Tpo -c /home/igor/dbhandler/libpostgres/postgres.cpp -o libpostgres_la-postgres.o >/dev/null 2>&1 mv -f .deps/libpostgres_la-postgres.Tpo .deps/libpostgres_la-postgres.Plo /bin/sh ../libtool --tag=CXX --mode=link g++ -D__WXGTK__ -I../../dbinterface `pg_config --includedir` -g -O0 -L../dbinterface -ldbinterface `pg_config --libdir` -lpq -o libpostgres.la -rpath /usr/local/lib libpostgres_la-database_postgres.lo libpostgres_la-postgres.lo libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/crtbeginS.o .libs/libpostgres_la-database_postgres.o .libs/libpostgres_la-postgres.o -L../dbinterface -ldbinterface -lpq -L/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../lib64/crtn.o -g -O0 -Wl,-soname -Wl,libpostgres.so.0 -o .libs/libpostgres.so.0.0.0 libtool: link: (cd ".libs" && rm -f "libpostgres.so.0" && ln -s "libpostgres.so.0.0.0" "libpostgres.so.0") libtool: link: (cd ".libs" && rm -f "libpostgres.so" && ln -s "libpostgres.so.0.0.0" "libpostgres.so") libtool: link: ar cru .libs/libpostgres.a libpostgres_la-database_postgres.o libpostgres_la-postgres.o libtool: link: ranlib .libs/libpostgres.a libtool: link: ( cd ".libs" && rm -f "libpostgres.la" && ln -s "../libpostgres.la" "libpostgres.la" ) igor@IgorReinCloud ~/dbhandler/Debug/libpostgres $ [/code[ Thank you. On Mon, Jul 11, 2022 at 8:21 AM The Wanderer <wande...@fastmail.fm> wrote: > > On 2022-07-11 at 09:12, Greg Wooledge wrote: > > > On Mon, Jul 11, 2022 at 02:20:18PM +0200, Thomas Schmitt wrote: > > > >> Hi, > >> > >> i wrote: > > >>>> It appears that an argument -I is missing before > >>>> /usr/include/postgresql. > >> > >>> This is a very good theory. > >> > >> Together with Greg Wooledge's observation that "make"'s macro > >> definition does not interpret `...` as output of shell commands we > >> already have two reasons why that part of the Makefile should not > >> work. > >> > >> The riddle grows why it appears to work on Gentoo. > > > > You're misunderstanding my conclusions. The backticks *do* work in > > the end, since they're passed through to the shell, and the shell > > interprets them the way the OP seems to want. > > > > The missing -I is probably it. It's interesting that pkg-config > > --cflags and pg_config --includedir deviate in this way. > > Note that pg_config does also support a --cflags option (there doesn't > appear to be a man page, at least not in Debian under the obvious name, > but see 'pg_config --help'); however, it's documented as providing not > the flags necessary to compile programs against the installed PostgreSQL > but rather the "CFLAGS value used when [the installed version of] > PostgreSQL was built". > > In some cases those two things will be the same, but not necessarily in > all - and I fail to see how the latter is useful information to know, > except in a "trying to debug the installed PostgreSQL instance" sort of > scenario, which hardly seems like what pg_config would intuitively be > intended for. > > -- > The Wanderer > > The reasonable man adapts himself to the world; the unreasonable one > persists in trying to adapt the world to himself. Therefore all > progress depends on the unreasonable man. -- George Bernard Shaw >