pg_duckdb icon indicating copy to clipboard operation
pg_duckdb copied to clipboard

Makefile Error when building pg_duckdb locally

Open LeqitSebi opened this issue 8 months ago • 4 comments

What happens?

Machine is running rhel9 and I'm trying to build the pg_duckdb extension locally from source but get an error during the make command:

/usr/bin/install -c -m 644 .//pg_duckdb.control '/home/username/projects/postgresql17-pg_duckdb/BUILDROOT/postgresql17-pg_d
uckdb-0.0.1-4.g35026b3.el9.x86_64/usr/pgsql-17/share/extension/'
Putting child 0x563c6f6cfc50 (install) PID 1987557 on the chain.
Live child 0x563c6f6cfc50 (install) PID 1987557
Reaping winning child 0x563c6f6cfc50 PID 1987557
/usr/bin/install -c -m 644 .//pg_duckdb.control .//sql/pg_duckdb--0.1.0--0.2.0.sql .//sql/pg_duckdb--0.1.0.sql .//sql/pg_duck
db--0.2.0--0.3.0.sql  '/home/username/projects/postgresql17-pg_duckdb/BUILDROOT/postgresql17-pg_duckdb-0.0.1-4.g35026b3.el9
.x86_64/usr/pgsql-17/share/extension/'
Live child 0x563c6f6cfc50 (install) PID 1987558
Reaping winning child 0x563c6f6cfc50 PID 1987558
/usr/bin/mkdir -p '/home/username/projects/postgresql17-pg_duckdb/BUILDROOT/postgresql17-pg_duckdb-0.0.1-4.g35026b3.el9.x86
_64/usr/pgsql-17/lib/bitcode/pg_duckdb'
Live child 0x563c6f6cfc50 (install) PID 1987559
Reaping winning child 0x563c6f6cfc50 PID 1987559
# ! IMPORTANT LINES !
/usr/bin/mkdir -p
Live child 0x563c6f6cfc50 (install) PID 1987560
/usr/bin/mkdir: missing operand
# ! END OF IMPORTANT LINES
Try '/usr/bin/mkdir --help' for more information.
Reaping losing child 0x563c6f6cfc50 PID 1987560
make: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/pgxs.mk:246: install] Error 1
Removing child 0x563c6f6cfc50 PID 1987560 from chain.

To Reproduce

export PATH=$PATH:/usr/pgsql-$PGVERSION/bin/

/bin/make

OS:

Linux RHEL 9

pg_duckdb Version (if built from source use commit hash):

v0.3.1

Postgres Version (if built from source use commit hash):

pg16, pg17

Hardware:

No response

Full Name:

Sebastian Slanitsch

Affiliation:

BMLV

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • [x] Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • [x] Yes, I have

LeqitSebi avatar Apr 11 '25 15:04 LeqitSebi

Based on this:

/usr/bin/mkdir -p
...
/usr/bin/mkdir: missing operand

Either your system (or the shell you are using) has a version of mkdir that does not have the -p option, or for some reason the argument to the mkdir call is missing its directory.

I don't see us debugging this further but if you can determine a root cause or fix, please let us know.

wuputah avatar Apr 11 '25 17:04 wuputah

The problem seems to be that the mkdir -p command does not contain a directory name, so something weird is going on. How did you install Postgres on RHEL9?

JelteF avatar Apr 14 '25 08:04 JelteF

I installed postgres via the official rpm on my rhel9 machine. Every mkdir -p has a value for the directory it should create except for this one. I tried to go through the Makefile and find out which variable this is but can't figure it out, even after days of searching.

LeqitSebi avatar Apr 14 '25 08:04 LeqitSebi

I expect it's one where there's mkdir -p $(SOME_VAR) and SOME_VAR is empty at runtime.

JelteF avatar Apr 14 '25 14:04 JelteF