-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build on Amazon Linux (CentOS) - Missing lpgport/lpam #7
Comments
I believe this is the same problem for which in pg_reorg's makefile you can find the lines:
this approach obviously doesn't scale. Can anybody ask the -hackers ML or on IRC what's the right approach? |
Getting rid of the presumably unneeded linking-in of "-lpam" might help, but this error message:
seems important. I see this old complaint about RHEL -devel packaging not including libpgport: Unfortunately, I think we really need this library to be present, e.g. for get_parent_directory() in pgut.c. |
Hmm, I saw similar threads yes. I assume I can't find that library somewhere and just dump it on the server? :/ |
I've built pgport from source for my version so that's now available. The rest seems more like build flags just applicable to the original so it's compiling fine. Need to find a similar cluster to test against though. |
Thanks for following up. I started doing a bit of testing with CentOS, though the only CentOS instance I had handy was an ancient 4.5 x86_64 one. I was able to get pg_repack to build using the alternate PGDG RPMs, which apparently do include libpgport.a. I would like to see us be able to build against the default packages, though. I wonder whether the old .spec files under ./SPECS are expecting to be built against the default packages or the PGDG ones... |
That would be great. I've build it against two different clusters running On Wed, May 22, 2013 at 3:59 AM, Josh Kupershmidt
|
Per Issue #7 from armanddp, it seems the RHEL/CentOS packages of Postgres are built against libpam, which shows up in the LIBS reported by pg_config. We don't actually need to link in libpam for pg_repack, so manually remove it from our LIBS. This helps a little bit for building on RHEL/CentOS, though the issue of libpgport.a missing on that platform still looms.
I ran across this issue while working on packaging |
Hi Sam, |
The below command solved it for me. |
For anyone else that runs into issues, here was the complete solution for me to get pg_repack downloaded and installed on Amazon Linux:
|
Hi, I followed as you mentioned but throwing the same error. Below is the log, ``# make make[1]: Entering directory |
Solutions provided for old versions of AWS distro, PG, and pg_repack. Closing this since old AWS distro version not available anymore |
Hey,
I'm trying to build pg_repack on an Amazon Linux cluster running Postgres 9.2 but getting the following message about missing pgport/pam:
Both -devel and -contrib rpms are installed as well.
Any help would greatly be appreciated.
Armand
[ec2-user@ip-10-166-5-184 pg_repack-1.1.8]$ make
make[1]: Entering directory
/home/ec2-user/src/pg_repack-1.1.8/bin' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard pg_repack.o pgut/pgut.o pgut/pgut-fe.o -L/usr/lib64 -lpq -L/usr/lib64 -Wl,--as-needed -lpgport -lpam -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm -o pg_repack /usr/bin/ld: cannot find -lpgport /usr/bin/ld: cannot find -lpam collect2: ld returned 1 exit status make[1]: *** [pg_repack] Error 1 make[1]: Leaving directory
/home/ec2-user/src/pg_repack-1.1.8/bin'make: *** [all] Error 2
[ec2-user@ip-10-166-5-184 pg_repack-1.1.8]$ sudo yum list installed | grep postgres
Failed to set locale, defaulting to C
postgresql.noarch 9.2-1.19.amzn1 @amzn-main
postgresql-devel.noarch 9.2-1.19.amzn1 @amzn-updates
postgresql-server.noarch 9.2-1.19.amzn1 @amzn-main
postgresql-upgrade.noarch 9.2-1.19.amzn1 @amzn-main
postgresql9.x86_64 9.2.4-1.35.amzn1 @amzn-updates
postgresql9-contrib.x86_64 9.2.4-1.35.amzn1 @amzn-updates
postgresql9-devel.x86_64 9.2.4-1.35.amzn1 @amzn-updates
postgresql9-libs.x86_64 9.2.4-1.35.amzn1 @amzn-updates
postgresql9-server.x86_64 9.2.4-1.35.amzn1 @amzn-updates
postgresql9-upgrade.x86_64 9.2.4-1.35.amzn1 @amzn-updates
The text was updated successfully, but these errors were encountered: