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

Re: Does Debian supports backticks in the Makefile?



And hi i Debian afe  fiing he innclde line:

[code]
igor@debian:~/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/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H
-I. -I../../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 '../../libpostgres/'`database_postgres.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../libpostgres -I..
-D__WXGTK__ -I../../dbinterface /usr/include/postgresql -g -O0 -MT
libpostgres_la-database_postgres.lo -MD -MP -MF
.deps/libpostgres_la-database_postgres.Tpo -c
../../libpostgres/database_postgres.cpp  -fPIC -DPIC -o
.libs/libpostgres_la-database_postgres.o
../../libpostgres/database_postgres.cpp:22:10: fatal error:
libpq-fe.h: No such file or directory
   22 | #include <libpq-fe.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:507: libpostgres_la-database_postgres.lo] Error 1
igor@debian:~/dbhandler/Debug/libpostgres$

[/codee]

On Mon, Jul 11, 2022 at 8:21 AM The Wanderer <wanderer@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
>


Reply to: