This repository was archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
Error when trying to install on Graviton EC2 #122
Copy link
Copy link
Open
Description
HI,
I have a c7g EC2 running Linux. Postgres 15, Node 19. I keep getting this error when trying to install pg-native:
node_modules/.pnpm/libpq@1.8.12/node_modules/libpq: Running install script, failed in 3.5s
.../libpq@1.8.12/node_modules/libpq install$ node-gyp rebuild
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@9.3.1
│ gyp info using node@19.9.0 | linux | arm64
│ gyp info find Python using Python version 3.9.16 found at "/usr/bin/python3"
│ gyp info spawn /usr/bin/python3
│ gyp info spawn args [
│ gyp info spawn args '/home/ec2-user/.nvm/versions/node/v19.9.0/lib/node_modules/pnpm/dist/node_modul
│ gyp info spawn args 'binding.gyp',
│ gyp info spawn args '-f',
│ gyp info spawn args 'make',
│ gyp info spawn args '-I',
│ gyp info spawn args '/home/ec2-user/node_modules/.pnpm/libpq@1.8.12/node_modules/libpq/build/config.
│ gyp info spawn args '-I',
│ gyp info spawn args '/home/ec2-user/.nvm/versions/node/v19.9.0/lib/node_modules/pnpm/dist/node_modul
│ gyp info spawn args '-I',
│ gyp info spawn args '/home/ec2-user/.cache/node-gyp/19.9.0/include/node/common.gypi',
│ gyp info spawn args '-Dlibrary=shared_library',
│ gyp info spawn args '-Dvisibility=default',
│ gyp info spawn args '-Dnode_root_dir=/home/ec2-user/.cache/node-gyp/19.9.0',
│ gyp info spawn args '-Dnode_gyp_dir=/home/ec2-user/.nvm/versions/node/v19.9.0/lib/node_modules/pnpm/
│ gyp info spawn args '-Dnode_lib_file=/home/ec2-user/.cache/node-gyp/19.9.0/<(target_arch)/node.lib',
│ gyp info spawn args '-Dmodule_root_dir=/home/ec2-user/node_modules/.pnpm/libpq@1.8.12/node_modules/l
│ gyp info spawn args '-Dnode_engine=v8',
│ gyp info spawn args '--depth=.',
│ gyp info spawn args '--no-parallel',
│ gyp info spawn args '--generator-output',
│ gyp info spawn args 'build',
│ gyp info spawn args '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ make: Entering directory '/home/ec2-user/node_modules/.pnpm/libpq@1.8.12/node_modules/libpq/build'
│ CXX(target) Release/obj.target/addon/src/connection.o
│ CXX(target) Release/obj.target/addon/src/connect-async-worker.o
│ CXX(target) Release/obj.target/addon/src/addon.o
│ In file included from ../../../../nan@2.19.0/node_modules/nan/nan.h:62,
│ from ../src/addon.h:4,
│ from ../src/addon.cc:1:
│ /home/ec2-user/.cache/node-gyp/19.9.0/include/node/node.h:1169:7: warning: cast between incompatible f
│ 1169 | (node::addon_register_func) (regfunc), \
│ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ /home/ec2-user/.cache/node-gyp/19.9.0/include/node/node.h:1203:3: note: in expansion of macro ‘NODE_MO
│ 1203 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
│ | ^~~~~~~~~~~~~
│ ../src/addon.cc:76:1: note: in expansion of macro ‘NODE_MODULE’
│ 76 | NODE_MODULE(addon, InitAddon)
│ | ^~~~~~~~~~~
│ SOLINK_MODULE(target) Release/obj.target/addon.node
│ /usr/bin/ld: cannot open linker script file /builddir/build/BUILD/postgresql-15.0/.package_note-libpq-
│ collect2: error: ld returned 1 exit status
│ make: *** [addon.target.mk:160: Release/obj.target/addon.node] Error 1
│ make: Leaving directory '/home/ec2-user/node_modules/.pnpm/libpq@1.8.12/node_modules/libpq/build'
│ gyp ERR! build error
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack at ChildProcess.onExit (/home/ec2-user/.nvm/versions/node/v19.9.0/lib/node_modules/
│ gyp ERR! stack at ChildProcess.emit (node:events:513:28)
│ gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
│ gyp ERR! System Linux 6.1.79-99.164.amzn2023.aarch64
│ gyp ERR! command "/home/ec2-user/.nvm/versions/node/v19.9.0/bin/node" "/home/ec2-user/.nvm/versions/no
│ gyp ERR! cwd /home/ec2-user/node_modules/.pnpm/libpq@1.8.12/node_modules/libpq
│ gyp ERR! node -v v19.9.0
│ gyp ERR! node-gyp -v v9.3.1
│ gyp ERR! not ok
Other info:
PRODUCTION_INSTANCE ➜ ~ node -p process.versions.openssl
3.0.8+quic
PRODUCTION_INSTANCE ➜ ~ openssl version
OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)
PRODUCTION_INSTANCE ➜ ~ sudo yum install postgresql-devel
Last metadata expiration check: 10:52:45 ago on Fri Mar 22 03:47:08 2024.
Package libpq-devel-15.0-2.amzn2023.0.1.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
PRODUCTION_INSTANCE ➜ ~ pg_config
BINDIR = /usr/bin
DOCDIR = /usr/share/doc/pgsql
HTMLDIR = /usr/share/doc/pgsql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/pgsql
INCLUDEDIR-SERVER = /usr/include/pgsql/server
LIBDIR = /usr/lib64
PKGLIBDIR = /usr/lib64/pgsql
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/man
SHAREDIR = /usr/share/pgsql
SYSCONFDIR = /etc
PGXS = /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--build=aarch64-amazon-linux-gnu' '--host=aarch64-amazon-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-rpath' '--with-ldap' '--with-openssl' '--with-gssapi' '--enable-nls' '--without-readline' '--datadir=/usr/share/pgsql' 'build_alias=aarch64-amazon-linux-gnu' 'host_alias=aarch64-amazon-linux-gnu' 'CC=gcc' 'CFLAGS=-O2 -ftree-vectorize -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 -march=armv8.2-a+crypto -mtune=neoverse-n1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/postgresql-15.0/.package_note-libpq-15.0-2.amzn2023.0.1.aarch64.ld' 'CXX=g++' 'CXXFLAGS=-O2 -ftree-vectorize -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 -march=armv8.2-a+crypto -mtune=neoverse-n1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
CC = gcc
CPPFLAGS = -D_GNU_SOURCE
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -ftree-vectorize -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 -march=armv8.2-a+crypto -mtune=neoverse-n1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection
CFLAGS_SL = -fPIC
LDFLAGS = -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/postgresql-15.0/.package_note-libpq-15.0-2.amzn2023.0.1.aarch64.ld -Wl,--as-needed
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lssl -lcrypto -lgssapi_krb5 -lz -lm
VERSION = PostgreSQL 15.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels