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

perl-cross 1.5.3 + perl 5.40.0: Build failure while crosscompiling x86_64-linux-gnu -> riscv64-linux-gnu #147

Open
berolinux opened this issue Jul 3, 2024 · 7 comments

Comments

@berolinux
Copy link

Trying to crosscompile perl 5.40.0 from x86_64-linux-gnu to riscv64-linux-gnu with perl-cross 1.5.3 results in

gcc  -o miniperl miniperlmain.host.o av.host.o scope.host.o doop.host.o doio.host.o dump.host.o gv.host.o hv.host.o mg.host.o reentr.host.o mro_core.host.o perly.host.o pp.host.o pp_hot.host.o pp_ctl.host.o pp_sys.host.o regexec.host.o utf8.host.o sv.host.o taint.host.o toke.host.o util.host.o deb.host.o run.host.o universal.host.o pad.host.o globals.host.o keywords.host.o perlio.host.o numeric.host.o mathoms.host.o locale.host.o pp_pack.host.o pp_sort.host.o caretx.host.o dquote.host.o time64.host.o builtin.host.o peep.host.o class.host.o regcomp.host.o regcomp_debug.host.o regcomp_invlist.host.o regcomp_study.host.o regcomp_trie.host.o opmini.host.o perlmini.host.o -lm -lcrypt -ldl
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_croak_memory_wrap':
locale.c:(.text+0x2f59): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `S_PerlEnv_putenv':
locale.c:(.text+0x33d0): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x33fc): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x340d): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x3419): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x3436): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x344b): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x3450): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x347c): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x349a): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x34a9): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x34d5): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_mortal_getenv':
locale.c:(.text+0x6378): undefined reference to `PL_current_context'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x63b4): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x63e0): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x63f1): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x63fd): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x641f): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x6424): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x6450): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x6481): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x64ad): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x64bc): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x64e8): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_get_context':
locale.c:(.text+0x67df): undefined reference to `PL_thr_key'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_force_locale_unlock':
locale.c:(.text+0x7c0b): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x7c37): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x7c76): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_locale_panic':
locale.c:(.text+0x7d1b): undefined reference to `PL_current_context'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `S_querylocale_2008_i':
locale.c:(.text+0x8337): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x8363): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x83f5): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x8421): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x8463): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x84da): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `S_bool_setlocale_2008_i':
locale.c:(.text+0x861e): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x8666): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0x86c4): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_warn_problematic_locale':
locale.c:(.text+0xa1df): undefined reference to `PL_current_context'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_setlocale':
locale.c:(.text+0xa535): undefined reference to `PL_current_context'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `S_populate_hash_from_localeconv':
locale.c:(.text+0xb3a7): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xb3d3): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xb611): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xb63d): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xb67c): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_langinfo':
locale.c:(.text+0xb755): undefined reference to `PL_current_context'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_langinfo8':
locale.c:(.text+0xb7c9): undefined reference to `PL_current_context'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `S_langinfo_sv_i':
locale.c:(.text+0xbad6): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbb02): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbb8a): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbbb6): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbbfb): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbcc8): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbcf4): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbd79): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbda5): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbdea): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbead): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xbed9): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc11b): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc150): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc198): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `S_ints_to_tm':
locale.c:(.text+0xc738): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc764): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc775): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc781): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc796): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc7ab): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc7b0): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc7dc): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc7fa): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc809): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xc835): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `S_strftime_tm':
locale.c:(.text+0xc9e9): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xca15): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xca26): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xca30): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xca3f): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xca6b): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcaa3): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcacf): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcae0): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcaea): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcaf1): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcafb): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcb27): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcb2e): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcb41): undefined reference to `PL_env_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xcb6d): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_init_i18nl10n':
locale.c:(.text+0xd525): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xd545): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xd54c): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xd571): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xd585): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o:locale.c:(.text+0xd5bc): more undefined references to `PL_C_locale_obj' follow
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_init_i18nl10n':
locale.c:(.text+0xd843): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xd86f): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xd90e): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xd93a): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xd97f): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xdef4): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xdf20): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xdfab): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xdfe0): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xe028): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_my_strerror':
locale.c:(.text+0xf233): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_switch_to_global_locale':
locale.c:(.text+0xf469): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf4b2): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf4de): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf55c): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf588): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf5c7): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_sync_locale':
locale.c:(.text+0xf62f): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf65b): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf6e6): undefined reference to `PL_locale_mutex'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf712): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf751): undefined reference to `Perl_croak_nocontext'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_switch_locale_context':
locale.c:(.text+0xf7a4): undefined reference to `PL_veto_switch_non_tTHX_context'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_thread_locale_init':
locale.c:(.text+0xf83d): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf851): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf885): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.host.o: in function `Perl_thread_locale_term':
locale.c:(.text+0xf8bd): undefined reference to `PL_C_locale_obj'
/usr/bin/x86_64-openmandriva-linux-gnu-ld.bfd: locale.c:(.text+0xf918): undefined reference to `PL_C_locale_obj'
collect2: error: ld returned 1 exit status

while linking the host miniperl.

Native x86_64-linux-gnu builds of perl 5.40.0 compile and work fine on the same box.

@arsv
Copy link
Owner

arsv commented Jul 4, 2024 via email

@berolinux
Copy link
Author

config.log
config.sh

@chewi
Copy link
Contributor

chewi commented Jul 7, 2024

Same here from x86_64-linux-gnu to m68k-linux-gnu on Gentoo. 5.38.2 still builds fine, so I don't think it's a Gentoo issue.

@tinomai
Copy link

tinomai commented Jul 9, 2024

It seems this is a general issue. Do not apply

cnf/diffs/perl5-5.40.0/xconfig.patch

fix the linker errors for (all?) cross-compilation combinations. Tested with x86_64-linux-gnu to {aarch64,loongarch64,powerpc64le,riscv64}-linux-gnu so far.

s390x then fails with different errors. But this may be an other issue.

@arsv
Copy link
Owner

arsv commented Jul 9, 2024 via email

@berolinux
Copy link
Author

Confirmed that 3627973 fixes it for me.

@tinomai
Copy link

tinomai commented Jul 9, 2024

Yes, 3627973 fixes all build errors x86_64-linux-gnu to {aarch64,loongarch64,powerpc64le,riscv64,s390x}-linux-gnu which I have seen.

Thank you very much!

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

4 participants