Skip to content
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 install pg_repack-1.4.7 on centos and amazon linux #394

Open
shabeer22vsb opened this issue Apr 22, 2024 · 2 comments
Open

unable to install pg_repack-1.4.7 on centos and amazon linux #394

shabeer22vsb opened this issue Apr 22, 2024 · 2 comments

Comments

@shabeer22vsb
Copy link

Below are the commands
sudo yum install gcc postgresql-devel openssl-devel postgresql-static.x86_64 readline-devel lz4-devel -y
sudo wget https://api.pgxn.org/dist/pg_repack/1.4.7/pg_repack-1.4.7.zip
sudo unzip pg_repack-1.4.7.zip
cd pg_repack-1.4.7
sudo make install
cd bin
./pg_repack —version
which pg_repack

Error
pgut/pgut-fe.c: In function ‘get_username’:
pgut/pgut-fe.c:652:14: warning: implicit declaration of function ‘getpwuid’; did you mean ‘geteuid’? [-Wimplicit-function-declaration]
652 | pw = getpwuid(geteuid());
| ^~~~~~~~
| geteuid
pgut/pgut-fe.c:652:12: warning: assignment to ‘struct passwd *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
652 | pw = getpwuid(geteuid());
| ^
pgut/pgut-fe.c:653:23: error: invalid use of undefined type ‘struct passwd’
653 | ret = (pw ? pw->pw_name : NULL);
| ^~

@za-arthur
Copy link
Collaborator

za-arthur commented Apr 30, 2024

warning: implicit declaration of function ‘getpwuid’

It seems that Amazon Linux might not have getpwuid.

You can try to use the latest release 1.5.0. It seems usage of getpwuid by pg_repack was removed a while ago:
944dbf7#diff-abaa7893eaa68a091174eb232d49639709baeefee506db38f4870c0fe9a620bcL652

@Melkij
Copy link
Collaborator

Melkij commented May 4, 2024

Which version of postgresql-devel did yum install? It is not surprising that 1.4.7 will not be built on postgresql-15 and newer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants