Re: Does Debian supports backticks in the Makefile?
On Mon, Jul 11, 2022 at 08:55:20AM -0500, Igor Korot wrote:
> This is what Gentoo generates:
> /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
OK. I see that you have the same "I forgot -I" bug in your Makefile.
> 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
And there's the expanded command. As you can see, it is wrong.
> g++: warning: /usr/include/postgresql-14: linker input file unused
> because linking not done
And you got a warning for the wrongness.
So, you are wondering why it actually compiled correctly. Best guess:
on Gentoo, you have the libpq-fe.h file in a different directory, which
is in the C++ compiler's search list. Maybe there's a symlink. In any
case, the -I/usr/include/postgresql-14 argument isn't needed on Gentoo.
If you really want to dig into it, start with something like
"locate libpq-fe.h" and see all of the places it appears. Then see what
directories are in the compiler's search list, etc.
Reply to: