backend depends on libpgport but Make doesn't know

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: backend depends on libpgport but Make doesn't know
Date: 2015-06-19 15:52:55
Message-ID: 20150619155255.GM133018@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I think we're missing a dependency declaration from the backend to
libpgport in the makefiles somewhere. I just git updated on 9.1 on a
tree that was already built, ran make, and got this:

../../src/port/libpgport_srv.a(dirmod_srv.o): In function `rmtree':
/pgsql/source/REL9_1_STABLE/src/port/dirmod.c:546: undefined reference to `snprintf_throw_on_fail'
../../src/port/libpgport_srv.a(exec_srv.o): In function `pclose_check':
/pgsql/source/REL9_1_STABLE/src/port/exec.c:535: undefined reference to `snprintf_throw_on_fail'
../../src/port/libpgport_srv.a(exec_srv.o): In function `find_other_exec':
/pgsql/source/REL9_1_STABLE/src/port/exec.c:319: undefined reference to `snprintf_throw_on_fail'
/pgsql/source/REL9_1_STABLE/src/port/exec.c:325: undefined reference to `snprintf_throw_on_fail'
../../src/port/libpgport_srv.a(exec_srv.o): In function `pipe_read_line':
/pgsql/source/REL9_1_STABLE/src/port/exec.c:366: undefined reference to `fprintf_throw_on_fail'
../../src/port/libpgport_srv.a(exec_srv.o): In function `set_pglocale_pgservice':
/pgsql/source/REL9_1_STABLE/src/port/exec.c:609: undefined reference to `snprintf_throw_on_fail'
/pgsql/source/REL9_1_STABLE/src/port/exec.c:598: undefined reference to `snprintf_throw_on_fail'
collect2: error: ld returned 1 exit status
make[2]: *** [postgres] Error 1

The solution is obvious, just "make clean" on src/port -- or
alternatively as Tom says, just clean the build every time before git
pull'ing. But since most cases with --enable-depend actually work fine
without either of those things, it's annoying that this small part
doesn't.

Anybody has a clue how to fix this, so that libpgport is rebuilt when
its files have changed? I guess we would have to have the backend
depend on each individual file on src/port ...?

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Browse pgsql-hackers by date

  From Date Subject
Next Message Cédric Villemain 2015-06-19 16:00:39 Re: pg_receivexlog --create-slot-if-not-exists
Previous Message Robert Haas 2015-06-19 15:49:47 outstanding multixact bugs