pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgresql 15 client arm64 and Qt 5.15
6+ messages / 4 participants
[nested] [flat]

* Postgresql 15 client arm64 and Qt 5.15
@ 2023-12-17 22:13 Piergiorgio Valli <piervalli@gmail.com>
  2023-12-17 22:30 ` Re: Postgresql 15 client arm64 and Qt 5.15 Tom Lane <tgl@sss.pgh.pa.us>
  2023-12-18 00:02 ` Re: Postgresql 15 client arm64 and Qt 5.15 Ron Johnson <ronljohnsonjr@gmail.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Piergiorgio Valli @ 2023-12-17 22:13 UTC (permalink / raw)
  To: pgsql-general

Hi all,

I should use the client of Postgresql on Arm64, Host where i build is
Ubuntu 20.04 64bit

I have downloaded the library from Ubuntu repository
http://ftp.de.debian.org/debian/pool/main/p/postgresql-15/libpq-dev_15.5-0+deb12u1_arm64.deb

When I am building the library with libpq.a it shows following error,
probably there are missings libraries. Do you know the additional library
that I need to link?

/home/pier/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
-c -target aarch64-linux-android21 -fno-limit-debug-info -fPIC
-fstack-protector-strong -DANDROID -O2 -fPIC  -I.
-I/home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/include
-I/home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/include
-I/home/pier/data/build/qt-everywhere-src-5.15.10/qtbase/mkspecs/android-clang
-o main.o main.cpp
> /home/pier/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target aarch64-linux-android21 -fno-limit-debug-info -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,-z,noexecstack -shared -o psql main.o   -Llibpq-dev_12.2-4_arm64/data/usr/lib/aarch64-linux-gnu/lib -L/home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib -lpq   -llog -lz -lm -ldl -lc
d: error: undefined symbol: pg_encoding_mblen
> >>> referenced by fe-exec.o:(PQescapeStringInternal) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-exec.o:(PQescapeInternal) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-exec.o:(PQescapeInternal) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced 2 more times
> ld: error: undefined symbol: pg_vsnprintf
> >>> referenced by fe-exec.o:(pqInternalNotice) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by pqexpbuffer.o:(printfPQExpBuffer) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by pqexpbuffer.o:(appendPQExpBuffer) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: pg_sprintf
> >>> referenced by fe-exec.o:(pqInternalNotice) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(PQsetClientEncoding) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: pg_char_to_encoding
> >>> referenced by fe-exec.o:(pqSaveParameterStatus) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-misc.o:(PQenv2encoding) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: __isoc99_sscanf
> >>> referenced by fe-exec.o:(pqSaveParameterStatus) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: pg_tolower
> >>> referenced by fe-exec.o:(PQfnumber) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-exec.o:(PQfnumber) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: __ctype_b_loc
> >>> referenced by fe-exec.o:(PQcmdTuples) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(parse_int_param) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(parseServiceFile) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced 4 more times
> ld: error: undefined symbol: pg_encoding_dsplen
> >>> referenced by fe-misc.o:(PQdsplen) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-protocol3.o:(pqBuildErrorMessage3) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-protocol3.o:(pqBuildErrorMessage3) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: dcgettext
> >>> referenced by fe-misc.o:(libpq_gettext) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-misc.o:(libpq_gettext) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: __errno_location
> >>> referenced by fe-misc.o:(libpq_gettext) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-misc.o:(pqSocketCheck) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-misc.o:(pqReadData) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced 44 more times
> ld: error: undefined symbol: bindtextdomain
> >>> referenced by fe-misc.o:(libpq_gettext) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-misc.o:(libpq_ngettext) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: pg_strerror_r
> >>> referenced by fe-misc.o:(pqSocketCheck) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(connectFailureMessage) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(PQconnectPoll) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced 16 more times
> ld: error: undefined symbol: dcngettext
> >>> referenced by fe-misc.o:(libpq_ngettext) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: stderr
> >>> referenced by fe-connect.o:(defaultNoticeProcessor) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(defaultNoticeProcessor) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(connectOptions2) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced 5 more times
> ld: error: undefined symbol: pg_fprintf
> >>> referenced by fe-connect.o:(defaultNoticeProcessor) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(connectOptions2) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-trace.o:(pqTraceOutputByte1) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced 107 more times
> ld: error: undefined symbol: __explicit_bzero_chk
> >>> referenced by fe-connect.o:(freePGconn) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(freePGconn) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(freePGconn) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced 2 more times
> ld: error: undefined symbol: pg_strcasecmp
> >>> referenced by fe-connect.o:(sslVerifyProtocolVersion) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(sslVerifyProtocolVersion) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(sslVerifyProtocolVersion) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced 14 more times
> ld: error: undefined symbol: pg_strncasecmp
> >>> referenced by fe-connect.o:(parseServiceFile) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: ldap_init
> >>> referenced by fe-connect.o:(parseServiceFile) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: undefined symbol: ldap_set_option
> >>> referenced by fe-connect.o:(parseServiceFile) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> >>> referenced by fe-connect.o:(parseServiceFile) in archive /home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib/libpq.a
> ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
> clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks

Piergiorgio Valli

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgresql 15 client arm64 and Qt 5.15
  2023-12-17 22:13 Postgresql 15 client arm64 and Qt 5.15 Piergiorgio Valli <piervalli@gmail.com>
@ 2023-12-17 22:30 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-12-17 22:30 UTC (permalink / raw)
  To: Piergiorgio Valli <piervalli@gmail.com>; +Cc: pgsql-general

Piergiorgio Valli <piervalli@gmail.com> writes:
> When I am building the library with libpq.a it shows following error,
> probably there are missings libraries. Do you know the additional library
> that I need to link?

>> ld: error: undefined symbol: pg_encoding_mblen
>> ld: error: undefined symbol: pg_vsnprintf

libpgcommon and libpgport

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgresql 15 client arm64 and Qt 5.15
  2023-12-17 22:13 Postgresql 15 client arm64 and Qt 5.15 Piergiorgio Valli <piervalli@gmail.com>
@ 2023-12-18 00:02 ` Ron Johnson <ronljohnsonjr@gmail.com>
  2023-12-18 00:17   ` Re: Postgresql 15 client arm64 and Qt 5.15 Tom Lane <tgl@sss.pgh.pa.us>
  2023-12-18 16:36   ` Re: Postgresql 15 client arm64 and Qt 5.15 Piergiorgio Valli <piervalli@gmail.com>
  1 sibling, 2 replies; 6+ messages in thread

From: Ron Johnson @ 2023-12-18 00:02 UTC (permalink / raw)
  To: pgsql-general

On Sun, Dec 17, 2023 at 5:14 PM Piergiorgio Valli <piervalli@gmail.com>
wrote:

> Hi all,
>
> I should use the client of Postgresql on Arm64, Host where i build is
> Ubuntu 20.04 64bit
>
> I have downloaded the library from Ubuntu repository
> http://ftp.de.debian.org/debian/pool/main/p/postgresql-15/libpq-dev_15.5-0+deb12u1_arm64.deb
>
> When I am building the library with libpq.a it shows following error,
> probably there are missings libraries. Do you know the additional library
> that I need to link?
>
> /home/pier/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -c -target aarch64-linux-android21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -O2 -fPIC  -I. -I/home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/include -I/home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/include -I/home/pier/data/build/qt-everywhere-src-5.15.10/qtbase/mkspecs/android-clang -o main.o main.cpp
> > /home/pier/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target aarch64-linux-android21 -fno-limit-debug-info -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,-z,noexecstack -shared -o psql main.o   -Llibpq-dev_12.2-4_arm64/data/usr/lib/aarch64-linux-gnu/lib -L/home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib -lpq   -llog -lz -lm -ldl -lc
> d: error: undefined symbol: pg_encoding_mblen
> > >>> referenced by fe-exec.o:(PQescapeStringInternal) in archive /home/pier/data/build/libpq-
>
> Did you directly download that one package, or install it via apt?
Because I wonder why it did not pull in the required dependencies.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgresql 15 client arm64 and Qt 5.15
  2023-12-17 22:13 Postgresql 15 client arm64 and Qt 5.15 Piergiorgio Valli <piervalli@gmail.com>
  2023-12-18 00:02 ` Re: Postgresql 15 client arm64 and Qt 5.15 Ron Johnson <ronljohnsonjr@gmail.com>
@ 2023-12-18 00:17   ` Tom Lane <tgl@sss.pgh.pa.us>
  2023-12-18 01:04     ` Re: Postgresql 15 client arm64 and Qt 5.15 Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Tom Lane @ 2023-12-18 00:17 UTC (permalink / raw)
  To: Ron Johnson <ronljohnsonjr@gmail.com>; +Cc: pgsql-general

Ron Johnson <ronljohnsonjr@gmail.com> writes:
> On Sun, Dec 17, 2023 at 5:14 PM Piergiorgio Valli <piervalli@gmail.com>
> wrote:
>> When I am building the library with libpq.a it shows following error,
>> probably there are missings libraries. Do you know the additional library
>> that I need to link?

> Did you directly download that one package, or install it via apt?
> Because I wonder why it did not pull in the required dependencies.

.a libraries don't carry any information about what they depend on.
What I'd wonder is why the OP thinks it's a good idea to link this
way rather than using shared libraries.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgresql 15 client arm64 and Qt 5.15
  2023-12-17 22:13 Postgresql 15 client arm64 and Qt 5.15 Piergiorgio Valli <piervalli@gmail.com>
  2023-12-18 00:02 ` Re: Postgresql 15 client arm64 and Qt 5.15 Ron Johnson <ronljohnsonjr@gmail.com>
  2023-12-18 00:17   ` Re: Postgresql 15 client arm64 and Qt 5.15 Tom Lane <tgl@sss.pgh.pa.us>
@ 2023-12-18 01:04     ` Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Adrian Klaver @ 2023-12-18 01:04 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Ron Johnson <ronljohnsonjr@gmail.com>; +Cc: pgsql-general

On 12/17/23 16:17, Tom Lane wrote:
> Ron Johnson <ronljohnsonjr@gmail.com> writes:
>> On Sun, Dec 17, 2023 at 5:14 PM Piergiorgio Valli <piervalli@gmail.com>
>> wrote:
>>> When I am building the library with libpq.a it shows following error,
>>> probably there are missings libraries. Do you know the additional library
>>> that I need to link?
> 
>> Did you directly download that one package, or install it via apt?
>> Because I wonder why it did not pull in the required dependencies.
> 
> .a libraries don't carry any information about what they depend on.
> What I'd wonder is why the OP thinks it's a good idea to link this
> way rather than using shared libraries.

If I where to hazard a guess:

/home/pier/Android/Sdk/ndk/ ...


> 
> 			regards, tom lane
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgresql 15 client arm64 and Qt 5.15
  2023-12-17 22:13 Postgresql 15 client arm64 and Qt 5.15 Piergiorgio Valli <piervalli@gmail.com>
  2023-12-18 00:02 ` Re: Postgresql 15 client arm64 and Qt 5.15 Ron Johnson <ronljohnsonjr@gmail.com>
@ 2023-12-18 16:36   ` Piergiorgio Valli <piervalli@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Piergiorgio Valli @ 2023-12-18 16:36 UTC (permalink / raw)
  To: Ron Johnson <ronljohnsonjr@gmail.com>; +Cc: pgsql-general

Hi,
I have a SO 64bit (not arm 64)  so I have downloaded the package manually
to collect all libraries for cross compilation,it is true there are missing
dependencies because there are many packages (on Windows all dll are under
folder libs).
Now I am searching where  libpgcommon and libpgport where are installed.  I
will install a SO arm64 to search library alternative I thinks should build
Postgresql for Arm.
Thanks
Pier
Il giorno lun 18 dic 2023 alle ore 01:03 Ron Johnson <
ronljohnsonjr@gmail.com> ha scritto:

> On Sun, Dec 17, 2023 at 5:14 PM Piergiorgio Valli <piervalli@gmail.com>
> wrote:
>
>> Hi all,
>>
>> I should use the client of Postgresql on Arm64, Host where i build is
>> Ubuntu 20.04 64bit
>>
>> I have downloaded the library from Ubuntu repository
>> http://ftp.de.debian.org/debian/pool/main/p/postgresql-15/libpq-dev_15.5-0+deb12u1_arm64.deb
>>
>> When I am building the library with libpq.a it shows following error,
>> probably there are missings libraries. Do you know the additional library
>> that I need to link?
>>
>> /home/pier/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -c -target aarch64-linux-android21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -O2 -fPIC  -I. -I/home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/include -I/home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/include -I/home/pier/data/build/qt-everywhere-src-5.15.10/qtbase/mkspecs/android-clang -o main.o main.cpp
>> > /home/pier/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target aarch64-linux-android21 -fno-limit-debug-info -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,-z,noexecstack -shared -o psql main.o   -Llibpq-dev_12.2-4_arm64/data/usr/lib/aarch64-linux-gnu/lib -L/home/pier/data/build/libpq-dev_15.5-0+deb12u1_arm64/data/usr/lib -lpq   -llog -lz -lm -ldl -lc
>> d: error: undefined symbol: pg_encoding_mblen
>> > >>> referenced by fe-exec.o:(PQescapeStringInternal) in archive /home/pier/data/build/libpq-
>>
>> Did you directly download that one package, or install it via apt?
> Because I wonder why it did not pull in the required dependencies.
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2023-12-18 16:36 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-12-17 22:13 Postgresql 15 client arm64 and Qt 5.15 Piergiorgio Valli <piervalli@gmail.com>
2023-12-17 22:30 ` Tom Lane <tgl@sss.pgh.pa.us>
2023-12-18 00:02 ` Ron Johnson <ronljohnsonjr@gmail.com>
2023-12-18 00:17   ` Tom Lane <tgl@sss.pgh.pa.us>
2023-12-18 01:04     ` Adrian Klaver <adrian.klaver@aklaver.com>
2023-12-18 16:36   ` Piergiorgio Valli <piervalli@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox