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

Re: Does Debian supports backticks in the Makefile?



On 7/11/22 10:24, Greg Wooledge wrote:
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.

.
As a reminder, locate's database might be stale, so it is probably a good idea to sudo updatedb before running locate, assuring then that it has an uptodate
database.  I think it does a weekly update, but if Igor is installing stuff
from the error messages, that is probably something he should be doing after
installing something missing.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>


Reply to: