develooper Front page | perl.perl5.porters | Postings from May 2019

[perl #134098] Debugging builds fail if locale support is missing

From:
Richard
Date:
May 13, 2019 19:03
Subject:
[perl #134098] Debugging builds fail if locale support is missing
Message ID:
rt-4.0.24-6443-1557774183-506.134098-75-0@perl.org
# New Ticket Created by  Richard 
# Please include the string:  [perl #134098]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134098 >


Preliminary smoking with Android 8.1 (Oreo)/Termux shows that vanilla
builds mostly smoke okay, with a handful of test failures, but
-DDEBUGGING builds fail during make.
See https://perl5.test-smoke.org/report/86839 for an example.

A linker error occurs during the following step:
cc -L/system/lib -fstack-protector-strong -o miniperl opmini.o
perlmini.o  gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o
reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o
scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o
universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o
pp_pack.o pp_sort.o caretx.o dquote.o time64.o  miniperlmain.o
-lpthread -ldl -lm -lutil -lc -llog

/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld:
locale.o: in function `Perl_setlocale':
/data/data/com.termux/files/home/PerlSource/perl4/perl/locale.c:2281:
undefined reference to `setlocale_debug_string'
clang-8: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [makefile:358: lib/buildcustomize.pl] Error 1

The following are all undefined in this build (all in the hints file,
apart from the latter):
  d_locconv
  d_setlocale
  d_setlocale_r
  d_lc_monetary_2008
  i_locale
  d_newlocale

Perl will actually build with these defined on Android 8.1 - to be
covered in a separate ticket - and with these defined, the -DDEBUGGING
build is happy. So seems to be a -DDEBUGGING vs locale thing, not an
Android-specific problem.

Details of the non-debugging variant are:

Summary of my perl5 (revision 5 version 29 subversion 10) configuration:
  Derived from: d1f642a8a65dd77a182c2c2bb4d3370a3ac20272
  Ancestor: abf787ba980b7d12a799dc22b830524bed5e028d
  Platform:
    osname=android
    osvers=8.1.0
    archname=aarch64-linux-android
    uname='linux localhost 4.4.114 #1 smp preempt thu nov 8 14:28:26
cst 2018 aarch64 android '
    config_args='-des -Alibpth=/system/lib /vendor/lib -Dusedevel -Ud_newlocale'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-fno-strict-aliasing -pipe -fstack-protector-strong
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
    optimize='-O2'
    cppflags='-fno-strict-aliasing -pipe -fstack-protector-strong'
    ccversion=''
    gccversion='4.2.1 Compatible Clang 8.0.0 (tags/RELEASE_800/final)'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=1
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='cc'
    ldflags =' -L/system/lib -fstack-protector-strong'
    libpth=/system/lib /vendor/lib
/data/data/com.termux/files/usr/include/aarch64-linux-android
/data/data/com.termux/files/usr/lib
/data/data/com.termux/files/usr/lib/clang/8.0.0
/data/data/com.termux/files/usr/bin/../lib /system/lib /vendor/lib
    libs=-lpthread -ldb -ldl -lm -lutil -lc -llog
    perllibs=-lpthread -ldl -lm -lutil -lc -llog
    libc=/system/lib/libc.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/system/lib -fstack-protector-strong'


Characteristics of this binary (from libperl):
  Compile-time options:
    HAS_TIMES
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_DEVEL
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_LARGE_FILES
    USE_PERLIO
    USE_PERL_ATOF
  Locally applied patches:
    uncommitted-changes
    d1f642a8a65dd77a182c2c2bb4d3370a3ac20272
  Built under android
  Compiled at May 13 2019 17:49:05
  @INC:
    lib
    ./../lib/perl5/site_perl/5.29.10/aarch64-linux-android
    ./../lib/perl5/site_perl/5.29.10
    ./../lib/perl5/5.29.10/aarch64-linux-android
    ./../lib/perl5/5.29.10




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About