You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the belated followup. For OS X, I can say that pg_repack works fine on 10.9 with Postgres built from Homebrew and from source. I haven't tried the Postgres.app you mention, but about the error you ran into:
ld: library not found for -lpgport
IIRC we do in fact need to be able to link with libpgport -- that error means ld either isn't looking in the right directories, or your Postgres.app somehow failed to provide the library. Can you try something like find / -type f -name 'libpgport.*' 2>/dev/null ? If you've got it, it'll just be a matter of coaxing ld to find it (DYLD_LIBRARY_PATH, or set up a symlink manually, etc.) If it's really missing, that might be an issue you'd have to take up with the Postgres.app folks.
For the missing libraries on Ubuntu, you could try just apt-getting the appropriate *-dev packages providing those libraries, e.g. I'd guess installing libkrb5-dev would make the complaint about /usr/bin/ld: cannot find -lkrb5 go away. Alternatively, you could add filter-out entries for those libraries to pg_repack's Makefiles (offhand, I doubt we need any of those you listed, we're just picking them up from the LIBS pg_config reports Postgres having been built against). See commit 9c8d519.
I have installed PostgreSQL.app and was attempting to build pg_repack but ran into this error:
gcc -mmacosx-version-min=10.7 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/Applications/Postgres.app/Contents/Versions/9.3/include -DREPACK_VERSION=1.2.0-beta1 -I. -I. -I/Applications/Postgres.app/Contents/Versions/9.3/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/9.3/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/9.3/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/9.3/include -c -o pg_repack.o pg_repack.c
gcc -mmacosx-version-min=10.7 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/Applications/Postgres.app/Contents/Versions/9.3/include -DREPACK_VERSION=1.2.0-beta1 -I. -I. -I/Applications/Postgres.app/Contents/Versions/9.3/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/9.3/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/9.3/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/9.3/include -c -o pgut/pgut.o pgut/pgut.c
gcc -mmacosx-version-min=10.7 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/Applications/Postgres.app/Contents/Versions/9.3/include -DREPACK_VERSION=1.2.0-beta1 -I. -I. -I/Applications/Postgres.app/Contents/Versions/9.3/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/9.3/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/9.3/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/9.3/include -c -o pgut/pgut-fe.o pgut/pgut-fe.c
gcc -mmacosx-version-min=10.7 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv pg_repack.o pgut/pgut.o pgut/pgut-fe.o -L/Applications/Postgres.app/Contents/Versions/9.3/lib -lpq -L/Applications/Postgres.app/Contents/Versions/9.3/lib -L/Applications/Postgres.app/Contents/Versions/9.3/lib -L/Applications/Postgres.app/Contents/Versions/9.3/lib -Wl,-dead_strip_dylibs -lpgport -lpgcommon -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_repack
ld: library not found for -lpgport
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [pg_repack] Error 1
make: *** [all] Error 2
Could somebody clarify what dependency needs to be met to be able to build this on OS X
Also, on ubuntu I get the following errors during make:
make[1]: Entering directory
/root/pg_repack-1.2.0-beta1/bin' gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fPIC -DLINUX_OOM_ADJ=0 -fPIC -DLINUX_OOM_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g pg_repack.o pgut/pgut.o pgut/pgut-fe.o -L/opt/postgresql-9.1/lib -lpq -L/opt/postgresql-9.1/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -Wl,--as-needed -L/usr/lib/x86_64-linux-gnu -Wl,--as-needed -Wl,-rpath,'/opt/postgresql-9.1/lib',--enable-new-dtags -lpgport -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -ledit -lcrypt -ldl -lm -o pg_repack /usr/bin/ld: cannot find -lkrb5 /usr/bin/ld: cannot find -lcom_err /usr/bin/ld: cannot find -lgssapi_krb5 /usr/bin/ld: cannot find -ledit collect2: ld returned 1 exit status make[1]: *** [pg_repack] Error 1 make[1]: Leaving directory
/root/pg_repack-1.2.0-beta1/bin'make: *** [all] Error 2
What are the prerequisites for pg_repack?
The text was updated successfully, but these errors were encountered: