Fix build errors of in-tree build#182
Open
bigplaice wants to merge 1 commit into
Open
Conversation
When build pg_bulkload in contrib directory of PG source code, there are building errors: make[1]: --pkglibdir: No such file or directory 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 -g -O0 -g pg_bulkload.o recovery.o pgut/pgut.o pgut/pgut-fe.o pgut/pgut-list.o -L../../../src/port -L../../../src/common -Wl,-rpath,'$ORIGIN/../lib:$ORIGIN/..' -Wl,--as-needed -Wl,--build-id -L../../../src/interfaces/libpq -lpq -L -lpgcommon -lpgport -lpam -lssl -lcrypto -lz -ledit -lm -o pg_bulkload /usr/bin/ld: pgut/pgut.o: in function `pgut_init': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut.c:79:(.text+0x4a): undefined reference to `set_pglocale_pgservice' /usr/bin/ld: pgut/pgut.o: in function `prompt_for_password': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut.c:395:(.text+0x8ce): undefined reference to `simple_prompt' /usr/bin/ld: pgut/pgut-list.o: in function `new_list': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:114:(.text+0x1eb): undefined reference to `palloc' /usr/bin/ld: pgut/pgut-list.o: in function `enlarge_list': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:174:(.text+0x2f9): undefined reference to `repalloc' /usr/bin/ld: pgut/pgut-list.o: in function `list_free_private': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:1565:(.text+0x2bf9): undefined reference to `pfree' /usr/bin/ld: /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:1568:(.text+0x2c2e): undefined reference to `pfree' /usr/bin/ld: /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:1569:(.text+0x2c3a): undefined reference to `pfree' This is caused by the change introduced by ticket ossc-db#97. On my Ubuntu platform(24.04.1 LTS), it will cause build errors. As both "pg_config --libdir" and "pg_config --pkglibdir" in new Ubuntu get same result, the workaround of ticket ossc-db#97 is not necessary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When build pg_bulkload in contrib directory of PG source code, there are building errors:
make[1]: --pkglibdir: No such file or directory
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 -g -O0 -g pg_bulkload.o recovery.o pgut/pgut.o pgut/pgut-fe.o pgut/pgut-list.o -L../../../src/port -L../../../src/common -Wl,-rpath,'$ORIGIN/../lib:$ORIGIN/..' -Wl,--as-needed -Wl,--build-id -L../../../src/interfaces/libpq -lpq -L -lpgcommon -lpgport -lpam -lssl -lcrypto -lz -ledit -lm -o pg_bulkload
/usr/bin/ld: pgut/pgut.o: in function
pgut_init': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut.c:79:(.text+0x4a): undefined reference toset_pglocale_pgservice'/usr/bin/ld: pgut/pgut.o: in function
prompt_for_password': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut.c:395:(.text+0x8ce): undefined reference tosimple_prompt'/usr/bin/ld: pgut/pgut-list.o: in function
new_list': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:114:(.text+0x1eb): undefined reference topalloc'/usr/bin/ld: pgut/pgut-list.o: in function
enlarge_list': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:174:(.text+0x2f9): undefined reference torepalloc'/usr/bin/ld: pgut/pgut-list.o: in function
list_free_private': /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:1565:(.text+0x2bf9): undefined reference topfree'/usr/bin/ld: /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:1568:(.text+0x2c2e): undefined reference to
pfree' /usr/bin/ld: /home/highgo/tmp/postgresql-18.3/contrib/pg_bulkload-VERSION3_1_23/bin/pgut/pgut-list.c:1569:(.text+0x2c3a): undefined reference topfree'This is caused by the change introduced by ticket #97. On my Ubuntu platform(24.04.1 LTS), it will cause build errors.
As both "pg_config --libdir" and "pg_config --pkglibdir" in new Ubuntu get same result, the workaround of ticket #97 is not necessary now.