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

Put the source code into the contrib directory and use "make". Compile failed #157

Open
Leo-XM-Zeng opened this issue Feb 2, 2024 · 1 comment

Comments

@Leo-XM-Zeng
Copy link

[postgres@halo-centos-8-release contrib]$ ls
adminpack     bloom        citext             dict_int       fuzzystrmatch    intagg        jsonb_plpython  Makefile      passwordcheck   pg_freespacemap     pgstattuple    postgres_fdw  spi            tcn              unaccent
amcheck       bool_plperl  contrib-global.mk  dict_xsyn      hstore           intarray      lo              oid2name      pg_buffercache  pg_prewarm          pg_surgery     README        sslinfo        test_decoding    uuid-ossp
auth_delay    btree_gin    cube               earthdistance  hstore_plperl    isn           ltree           old_snapshot  pg_bulkload     pgrowlocks          pg_trgm        seg           start-scripts  tsm_system_rows  vacuumlo
auto_explain  btree_gist   dblink             file_fdw       hstore_plpython  jsonb_plperl  ltree_plpython  pageinspect   pgcrypto        pg_stat_statements  pg_visibility  sepgsql       tablefunc      tsm_system_time  xml2
[postgres@halo-centos-8-release contrib]$ cd pg_bulkload/
[postgres@halo-centos-8-release pg_bulkload]$ ls
bin  COPYRIGHT  docs  include  lib  Makefile  msvc  README.md  SPECS  util
[postgres@halo-centos-8-release pg_bulkload]$ make 
make -C ../../src/backend generated-headers
make[1]: Entering directory '/var/lib/pgsql/14code/postgres/src/backend'
make -C catalog distprep generated-header-symlinks
make[2]: Entering directory '/var/lib/pgsql/14code/postgres/src/backend/catalog'
make[2]: Nothing to be done for 'distprep'.
make[2]: Nothing to be done for 'generated-header-symlinks'.
make[2]: Leaving directory '/var/lib/pgsql/14code/postgres/src/backend/catalog'
make -C utils distprep generated-header-symlinks
make[2]: Entering directory '/var/lib/pgsql/14code/postgres/src/backend/utils'
make[2]: Nothing to be done for 'distprep'.
make[2]: Nothing to be done for 'generated-header-symlinks'.
make[2]: Leaving directory '/var/lib/pgsql/14code/postgres/src/backend/utils'
make[1]: Leaving directory '/var/lib/pgsql/14code/postgres/src/backend'
make[1]: Entering directory '/var/lib/pgsql/14code/postgres/contrib/pg_bulkload/bin'
gcc -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 -g -O0 -I../include -I../../../src/interfaces/libpq -I. -I. -I../../../src/include  -D_GNU_SOURCE -I/usr/include/libxml2   -c -o pg_bulkload.o pg_bulkload.c -MMD -MP -MF .deps/pg_bulkload.Po
gcc -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 -g -O0 -I../include -I../../../src/interfaces/libpq -I. -I. -I../../../src/include  -D_GNU_SOURCE -I/usr/include/libxml2   -c -o recovery.o recovery.c -MMD -MP -MF .deps/recovery.Po
gcc -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 -g -O0 -I../include -I../../../src/interfaces/libpq -I. -I. -I../../../src/include  -D_GNU_SOURCE -I/usr/include/libxml2   -c -o pgut/pgut.o pgut/pgut.c -MMD -MP -MF .deps/pgut.Po
gcc -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 -g -O0 -I../include -I../../../src/interfaces/libpq -I. -I. -I../../../src/include  -D_GNU_SOURCE -I/usr/include/libxml2   -c -o pgut/pgut-fe.o pgut/pgut-fe.c -MMD -MP -MF .deps/pgut-fe.Po
gcc -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 -g -O0 -I../include -I../../../src/interfaces/libpq -I. -I. -I../../../src/include  -D_GNU_SOURCE -I/usr/include/libxml2   -c -o pgut/pgut-list.o pgut/pgut-list.c -MMD -MP -MF .deps/pgut-list.Po
make[1]: --pkglibdir: Command not found
gcc -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 -g -O0 pg_bulkload.o recovery.o pgut/pgut.o pgut/pgut-fe.o pgut/pgut-list.o  -L../../../src/port -L../../../src/common   -Wl,--as-needed -Wl,-rpath,'/var/lib/pgsql/postgresql_14/lib',--enable-new-dtags -Wl,--build-id  -L../../../src/interfaces/libpq -lpq -L -lpgcommon -lpgport -lz -lreadline -lpthread -lrt -ldl -lm -o pg_bulkload
pgut/pgut.o: In function `pgut_init':
/var/lib/pgsql/14code/postgres/contrib/pg_bulkload/bin/pgut/pgut.c:79: undefined reference to `set_pglocale_pgservice'
pgut/pgut.o: In function `prompt_for_password':
/var/lib/pgsql/14code/postgres/contrib/pg_bulkload/bin/pgut/pgut.c:395: undefined reference to `simple_prompt'
pgut/pgut-list.o: In function `new_list':
/var/lib/pgsql/14code/postgres/contrib/pg_bulkload/bin/pgut/pgut-list.c:114: undefined reference to `palloc'
pgut/pgut-list.o: In function `enlarge_list':
/var/lib/pgsql/14code/postgres/contrib/pg_bulkload/bin/pgut/pgut-list.c:174: undefined reference to `repalloc'
pgut/pgut-list.o: In function `list_free_private':
/var/lib/pgsql/14code/postgres/contrib/pg_bulkload/bin/pgut/pgut-list.c:1565: undefined reference to `pfree'
/var/lib/pgsql/14code/postgres/contrib/pg_bulkload/bin/pgut/pgut-list.c:1568: undefined reference to `pfree'
/var/lib/pgsql/14code/postgres/contrib/pg_bulkload/bin/pgut/pgut-list.c:1569: undefined reference to `pfree'
collect2: error: ld returned 1 exit status
make[1]: *** [../../../src/makefiles/pgxs.mk:475: pg_bulkload] Error 1
make[1]: Leaving directory '/var/lib/pgsql/14code/postgres/contrib/pg_bulkload/bin'
make: *** [Makefile:27: all] Error 2
[postgres@halo-centos-8-release pg_bulkload]$ 

pg_bulkload Version

* master

PostgreSQl Version

[postgres@halo-centos-8-release pg_bulkload]$ psql
psql (14.10)
Type "help" for help.

postgres=# 

OS Version (uname -a)

[postgres@halo-centos-8-release pg_bulkload]$ uname -a
Linux halo-centos-8-release 4.18.0-305.3.1.el8.x86_64 #1 SMP Tue Jun 1 16:14:33 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
@Leo-XM-Zeng
Copy link
Author

#158

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