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

No such file or directory pgxs.mk #28

Open
ccsalway opened this issue Jan 25, 2024 · 4 comments
Open

No such file or directory pgxs.mk #28

ccsalway opened this issue Jan 25, 2024 · 4 comments

Comments

@ccsalway
Copy link

When I try to make this on a Rocky Linux 9.3 using postgres-16, I get

# PATH="/usr/pgsql-16/bin:$PATH" make USE_PGXS=1
"Platform is: linux"
Makefile:85: /usr/pgsql-16/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target '/usr/pgsql-16/lib/pgxs/src/makefiles/pgxs.mk'.  Stop.
@ccsalway
Copy link
Author

Assuming it's because I need the devel for postgresql, I get

# dnf install postgresql16-devel
Last metadata expiration check: 0:13:38 ago on Thu 25 Jan 2024 13:49:05 GMT.
Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides perl(IPC::Run) needed by postgresql16-devel-16.1-2PGDG.rhel9.x86_64 from pgdg16
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

@ccsalway
Copy link
Author

ccsalway commented Jan 25, 2024

I followed https://docs.fedoraproject.org/en-US/epel/ and enabled crb repo and then ran dnf install postgresql16-devel which got rid of the perl(IPC::Run) error..... but now when i run the compile, i get

# PATH="/usr/pgsql-16/bin:$PATH" make USE_PGXS=1
"Platform is: linux"
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -I. -I./ -I/usr/pgsql-16/include/server -I/usr/pgsql-16/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o system_stats.o system_stats.c
gcc: fatal error: cannot read spec file ‘/usr/lib/rpm/redhat/redhat-hardened-cc1’: No such file or directory
compilation terminated.
make: *** [<builtin>: system_stats.o] Error 1

@ccsalway
Copy link
Author

ccsalway commented Jan 25, 2024

Next I ran the following to squash the cannot read spec file error and then reran

dnf install redhat-rpm-config

at this point, ive lost the will to live!

@ccsalway
Copy link
Author

ccsalway commented Jan 25, 2024

Finally, I restart postgresql and run

postgres=# CREATE EXTENSION system_stats;
CREATE EXTENSION

and then grant the permission to the user

GRANT monitor_system_stats to admin;

What an arse!

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

No branches or pull requests

1 participant