Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2019-10

Errors on cross-compile from Linux x64 to NetBSD x64

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexey Tor.

FPC 3.3 trunk from today. Lazarus trunk from today. Project CudaText. Cross compilers installed via fpcupdeluxe 1.6.2y

...
Compile package atsynedit_cmp_package 1.1: Success Compile package atsynedit_ex_package 1.3: Success
Compile Project, Mode: netbsd x64, OS: netbsd, Target: builds/netbsd-x64-gtk2/cudatext: Success, Errors: 2 Error: /home/user/fpcupdeluxe/cross/bin/x86_64-netbsd/x86_64-netbsd-ld: /home/user/fpcupdeluxe/fpc/units/x86_64-netbsd/rtl/cwstring.o: in function `CWSTRING_$$_init$':
Error: cwstring.pp:(.text.n_cwstring_$$_init$+0x10): warning: warning: reference to compatibility __setlocale_mb_len_max_32();include <locale.h> for correct reference

The final binary is made, but with errors. Since i cannot run it (i cannot install NetBSD gui), I want to know what these errors mean? Binary is invalid?

Regards, Alexey

Reply by email

Karoly Balogh (Charlie/SGR
to Alexey Tor.

Hi,

Alexey Tor. wrote 18 lines
FPC 3.3 trunk from today. Lazarus trunk from today. Project CudaText. Cross compilers installed via fpcupdeluxe 1.6.2y ... Compile package atsynedit_cmp_package 1.1: Success Compile package atsynedit_ex_package 1.3: Success Compile Project, Mode: netbsd x64, OS: netbsd, Target: builds/netbsd-x64-gtk2/cudatext: Success, Errors: 2 Error: /home/user/fpcupdeluxe/cross/bin/x86_64-netbsd/x86_64-netbsd-ld: /home/user/fpcupdeluxe/fpc/units/x86_64-netbsd/rtl/cwstring.o: in function `CWSTRING_$$_init$': Error: cwstring.pp:(.text.n_cwstring_$$_init$+0x10): warning: warning: reference to compatibility __setlocale_mb_len_max_32();include <locale.h> for correct reference The final binary is made, but with errors. Since i cannot run it (i cannot install NetBSD gui), I want to know what these errors mean? Binary is invalid?

Can you retry with SVN r43118 and newer?

Apparently, as usual with BSDs, they sometimes break their libc naming compatibility, which is a problem as we link against it, but we don't use their C headers obviously. They renamed the reference to __setlocal_mb_len_max_32 to __setlocale50 in NetBSD 6, which shipped in 2012... I changed it now in our trunk, but this means NetBSD releases earlier than 6 won't be supported. As NetBSD 5 EoL'd in 2014, I don't see this as a problem, necessarily.

BTW, as a testcase, you could build a test-app which uses widestrings and links against libc. It doesn't have to be a GUI app to reporduce this issue.

Charlie

Reply by email