[PATCH] Add Makefile dep in bin/scripts for libpgport

Started by Phil Sorberalmost 13 years ago2 messages
#1Phil Sorber
phil@omniti.com
1 attachment(s)

I get the following error when I try to compile just a specific binary
in src/bin/scripts:

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard reindexdb.o common.o dumputils.o
kwlookup.o keywords.o -L../../../src/port -lpgport
-L../../../src/interfaces/libpq -lpq -L../../../src/port
-Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags
-lpgport -lz -lreadline -lcrypt -ldl -lm -o reindexdb
/usr/bin/ld: cannot find -lpgport
/usr/bin/ld: cannot find -lpgport
collect2: error: ld returned 1 exit status
make: *** [reindexdb] Error 1

It appears it is missing the libpgport dependency. Attached is a patch
to correct that. This is not normally a problem because when building
the whole tree libpgport is usually compiled already.

Attachments:

scripts_makefile_pgport_dep.diffapplication/octet-stream; name=scripts_makefile_pgport_dep.diffDownload
diff --git a/src/bin/scripts/Makefile b/src/bin/scripts/Makefile
new file mode 100644
index 26f6f8b..b9169aa
*** a/src/bin/scripts/Makefile
--- b/src/bin/scripts/Makefile
*************** all: $(PROGRAMS)
*** 25,39 ****
  %: %.o $(WIN32RES)
  	$(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
  
! createdb: createdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq
! createlang: createlang.o common.o print.o mbprint.o | submake-libpq
! createuser: createuser.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq
! dropdb: dropdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq
! droplang: droplang.o common.o print.o mbprint.o | submake-libpq
! dropuser: dropuser.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq
! clusterdb: clusterdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq
! vacuumdb: vacuumdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq
! reindexdb: reindexdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq
  pg_isready: pg_isready.o common.o | submake-libpq submake-libpgport
  
  dumputils.c keywords.c: % : $(top_srcdir)/src/bin/pg_dump/%
--- 25,39 ----
  %: %.o $(WIN32RES)
  	$(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
  
! createdb: createdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq submake-libpgport
! createlang: createlang.o common.o print.o mbprint.o | submake-libpq submake-libpgport
! createuser: createuser.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq submake-libpgport
! dropdb: dropdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq submake-libpgport
! droplang: droplang.o common.o print.o mbprint.o | submake-libpq submake-libpgport
! dropuser: dropuser.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq submake-libpgport
! clusterdb: clusterdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq submake-libpgport
! vacuumdb: vacuumdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq submake-libpgport
! reindexdb: reindexdb.o common.o dumputils.o kwlookup.o keywords.o | submake-libpq submake-libpgport
  pg_isready: pg_isready.o common.o | submake-libpq submake-libpgport
  
  dumputils.c keywords.c: % : $(top_srcdir)/src/bin/pg_dump/%
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Phil Sorber (#1)
Re: [PATCH] Add Makefile dep in bin/scripts for libpgport

On Wed, 2013-01-23 at 12:36 -0500, Phil Sorber wrote:

I get the following error when I try to compile just a specific binary
in src/bin/scripts:

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard reindexdb.o common.o dumputils.o
kwlookup.o keywords.o -L../../../src/port -lpgport
-L../../../src/interfaces/libpq -lpq -L../../../src/port
-Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags
-lpgport -lz -lreadline -lcrypt -ldl -lm -o reindexdb
/usr/bin/ld: cannot find -lpgport
/usr/bin/ld: cannot find -lpgport
collect2: error: ld returned 1 exit status
make: *** [reindexdb] Error 1

It appears it is missing the libpgport dependency. Attached is a patch
to correct that. This is not normally a problem because when building
the whole tree libpgport is usually compiled already.

Committed.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers