Now I could compile pgvector.
Thx.
Original Message:
Sent: Fri June 06, 2025 08:49 AM
From: Ayappan P
Subject: Missing postgres.imp
All these symbols should be part of the postgres.imp file. Please recheck whether the file is proper and have these symbols.
------------------------------
Ayappan P
Original Message:
Sent: Fri June 06, 2025 06:19 AM
From: Emanuel Reisinger
Subject: Missing postgres.imp
Now, it seems any library or libraries are missing.
# export OBJECT_MODE=64
# make OPTFLAGS="-lm" AR="ar -X64"
/opt/freeware/lib64/postgresql/pgxs/src/makefiles/../../src/backend/port/aix/mkldexport.sh libvector.a vector.so >libvector.exp
/opt/freeware/bin/gcc -maix64 -O2 -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 -I/home/buildusr/rpmbuild/BUILD/postgresql-15.10/64bit/src/include -I/home/buildusr/rpmbuild/BUILD/postgresql-15.10/64bit/src/interfaces/ecpg/include -I/opt/freeware/include -I/usr/include -lm -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -o vector.so libvector.a -Wl,-bE:libvector.exp -L/opt/freeware/lib64 -L/opt/freeware/lib64 -L/usr/lib64 -L/opt/freeware/lib -L/usr/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -L/opt/freeware/lib -Wl,-blibpath:'/opt/freeware/lib64:/opt/freeware/lib64:/opt/freeware/lib64:/usr/lib64:/opt/freeware/lib:/usr/lib:/opt/freeware/lib:/usr/lib:/lib' -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:/opt/freeware/lib64/postgresql/postgres.imp
ld: 0711-317 ERROR: Undefined symbol: pg_number_of_ones
ld: 0711-317 ERROR: Undefined symbol: .pg_detoast_datum
ld: 0711-317 ERROR: Undefined symbol: .pnstrdup
ld: 0711-317 ERROR: Undefined symbol: .pq_getmsgint
ld: 0711-317 ERROR: Undefined symbol: .pq_begintypsend
ld: 0711-317 ERROR: Undefined symbol: .pq_endtypsend
ld: 0711-317 ERROR: Undefined symbol: .build_reloptions
ld: 0711-317 ERROR: Undefined symbol: .index_open
ld: 0711-317 ERROR: Undefined symbol: .list_sort
ld: 0711-317 ERROR: Undefined symbol: .list_delete_last
ld: 0711-317 ERROR: Undefined symbol: .index_getprocid
ld: 0711-317 ERROR: Undefined symbol: .index_getprocinfo
ld: 0711-317 ERROR: Undefined symbol: pg_global_prng_state
ld: 0711-317 ERROR: Undefined symbol: .pg_prng_double
ld: 0711-317 ERROR: Undefined symbol: .list_make1_impl
ld: 0711-317 ERROR: Undefined symbol: .index_close
ld: 0711-317 ERROR: Undefined symbol: .table_beginscan_parallel
ld: 0711-317 ERROR: Undefined symbol: .pgstat_progress_update_param
ld: 0711-317 ERROR: Undefined symbol: .pg_prng_uint32
ld: 0711-317 ERROR: Undefined symbol: maintenance_work_mem
ld: 0711-317 ERROR: Undefined symbol: .plan_create_index_workers
ld: 0711-317 ERROR: Undefined symbol: .index_form_tuple
ld: 0711-317 ERROR: Undefined symbol: .table_parallelscan_estimate
ld: 0711-317 ERROR: Undefined symbol: .table_parallelscan_initialize
ld: 0711-317 ERROR: Undefined symbol: .log_newpage_range
ld: 0711-317 ERROR: Undefined symbol: .pgstat_report_activity
ld: 0711-317 ERROR: Undefined symbol: .table_open
ld: 0711-317 ERROR: Undefined symbol: .table_close
ld: 0711-317 ERROR: Undefined symbol: .pq_getmsgfloat4
ld: 0711-317 ERROR: Undefined symbol: .pq_sendfloat4
ld: 0711-317 ERROR: Undefined symbol: .pg_qsort
ld: 0711-317 ERROR: Undefined symbol: .pg_ltoa
ld: 0711-317 ERROR: Undefined symbol: process_shared_preload_libraries_in_progress
ld: 0711-317 ERROR: Undefined symbol: max_parallel_maintenance_workers
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
make: *** [/opt/freeware/lib64/postgresql/pgxs/src/makefiles/../../src/Makefile.shlib:333: vector.so] Error 1
------------------------------
Emanuel Reisinger
Original Message:
Sent: Fri June 06, 2025 05:53 AM
From: Ayappan P
Subject: Missing postgres.imp
The error is because the .exp file is not having any symbols. Try the below steps.,
make clean
export OBJECT_MODE=64
make OPTFLAGS="-lm"
------------------------------
Ayappan P
Original Message:
Sent: Fri June 06, 2025 04:30 AM
From: Emanuel Reisinger
Subject: Missing postgres.imp
Maybe the following error is caused by postgres.imp or a problem in postgres packages?
pgvector# make OPTFLAGS="" AR="ar -X64"
rm -f libvector.a
ar -X64 crs libvector.a src/bitutils.o src/bitvec.o src/halfutils.o src/halfvec.o src/hnsw.o src/hnswbuild.o src/hnswinsert.o src/hnswscan.o src/hnswutils.o src/hnswvacuum.o src/ivfbuild.o src/ivfflat.o src/ivfinsert.o src/ivfkmeans.o src/ivfscan.o src/ivfutils.o src/ivfvacuum.o src/sparsevec.o src/vector.o
touch libvector.a
/opt/freeware/lib64/postgresql/pgxs/src/makefiles/../../src/backend/port/aix/mkldexport.sh libvector.a vector.so >libvector.exp
/opt/freeware/bin/gcc -maix64 -O2 -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 -I/home/buildusr/rpmbuild/BUILD/postgresql-15.10/64bit/src/include -I/home/buildusr/rpmbuild/BUILD/postgresql-15.10/64bit/src/interfaces/ecpg/include -I/opt/freeware/include -I/usr/include -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -o vector.so libvector.a -Wl,-bE:libvector.exp -L/opt/freeware/lib64 -L/opt/freeware/lib64 -L/usr/lib64 -L/opt/freeware/lib -L/usr/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -L/opt/freeware/lib -Wl,-blibpath:'/opt/freeware/lib64:/opt/freeware/lib64:/opt/freeware/lib64:/usr/lib64:/opt/freeware/lib:/usr/lib:/opt/freeware/lib:/usr/lib:/lib' -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:/opt/freeware/lib64/postgresql/postgres.imp
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
collect2: error: ld returned 8 exit status
make: *** [/opt/freeware/lib64/postgresql/pgxs/src/makefiles/../../src/Makefile.shlib:333: vector.so] Error 1
make: *** Deleting file 'vector.so'
------------------------------
Emanuel Reisinger
Original Message:
Sent: Fri June 06, 2025 03:13 AM
From: Ayappan P
Subject: Missing postgres.imp
Yes, looks like the import file is missed in the packaging. We will fix this.
For now, you can take the attached file here as postgres.imp
------------------------------
Ayappan P
Original Message:
Sent: Fri June 06, 2025 02:22 AM
From: Emanuel Reisinger
Subject: Missing postgres.imp
Hi,
I'm trying to build pgvector on AIX 7.2 and get following linkage error:
ld: 0706-003 Cannot find or read import file: /opt/freeware/lib64/postgresql/postgres.imp
ld:accessx(): No such file or directory
collect2: error: ld returned 255 exit status
# rpm -qa | grep postgres
postgresql15-libs-15.10-1.ppc
postgresql15-15.10-1.ppc
postgresql15-devel-15.10-1.ppc
postgresql15-server-15.10-1.ppc
Am I missing a package? Or, maybe is the postgres.imp missing in postgres15-devel package?
------------------------------
Emanuel Reisinger
------------------------------