Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.91k stars 542 forks source link

static build with gdbm + gettext #15828

Open p5pRT opened 7 years ago

p5pRT commented 7 years ago

Migrated from rt.perl.org#130631 (status was 'open')

Searchable as RT130631$

p5pRT commented 7 years ago

From @fperrad

Created by @fperrad

A static build with the library gdbm (with gettext support)\, causes the following linking error​:

/home/dev/checkout/BR/build/perl-static/host/usr/bin/arm-linux-gcc -static -lm -Wl\,-E -o perl perlmain.o libperl.a lib/auto/B/B.a lib/auto/Devel/Peek/Peek.a lib/auto/Fcntl/Fcntl.a lib/auto/File/DosGlob/DosGlob.a lib/auto/File/Glob/Glob.a lib/auto/GDBM_File/GDBM_File.a lib/auto/Hash/Util/Util.a lib/auto/Hash/Util/FieldHash/FieldHash.a lib/auto/I18N/Langinfo/Langinfo.a lib/auto/Opcode/Opcode.a lib/auto/POSIX/POSIX.a lib/auto/PerlIO/encoding/encoding.a lib/auto/PerlIO/mmap/mmap.a lib/auto/PerlIO/scalar/scalar.a lib/auto/PerlIO/via/via.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Sys/Hostname/Hostname.a lib/auto/Tie/Hash/NamedCapture/NamedCapture.a lib/auto/arybase/arybase.a lib/auto/attributes/attributes.a lib/auto/mro/mro.a lib/auto/re/re.a lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a lib/auto/Devel/PPPort/PPPort.a lib/auto/Digest/MD5/MD5.a lib/auto/Digest/SHA/SHA.a lib/auto/Encode/Encode.a lib/auto/Filter/Util/Call/Call.a lib/auto/IPC/SysV/SysV.a lib/auto/MIME/Base64/Base64.a lib/auto/Math/BigInt/FastCalc/FastCalc.a lib/auto/List/Util/Util.a lib/auto/Socket/Socket.a lib/auto/Sys/Syslog/Syslog.a lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Collate/Collate.a lib/auto/Unicode/Normalize/Normalize.a lib/auto/Data/Dumper/Dumper.a lib/auto/IO/IO.a lib/auto/Cwd/Cwd.a lib/auto/Storable/Storable.a lib/auto/Time/HiRes/HiRes.a lib/auto/threads/threads.a lib/auto/threads/shared/shared.a -lm -lcrypt -lgdbm -lm -lrt -lpthread /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmerrno.o)​: In function `gdbm_strerror'​: gdbmerrno.c​:(.text+0x14)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmfetch.o)​: In function `gdbm_fetch'​: gdbmfetch.c​:(.text+0x84)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmseq.o)​: In function `get_next_key'​: gdbmseq.c​:(.text+0xc8)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmstore.o)​: In function `gdbm_store'​: gdbmstore.c​:(.text+0x168)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​: In function `_gdbm_write_bucket'​: bucket.c​:(.text+0x150)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​:bucket.c​:(.text+0x1ec)​: more undefined references to `libintl_dgettext' follow collect2​: error​: ld returned 1 exit status

Perl Info ``` Flags: category=core severity=low Site configuration information for perl 5.24.1: Configured by fperrad at Tue Jan 17 13:17:54 CET 2017. Summary of my perl5 (revision 5 version 24 subversion 1) configuration: Platform: osname=linux, osvers=3.4.112-sun7i, archname=armv7l-linux uname='linux lime 3.4.112-sun7i #10 smp preempt sun oct 23 15:49:51 cest 2016 armv7l gnulinux ' config_args='-de -Dprefix=/home/fperrad/perl5/perlbrew/perls/perl-5.24.1 -Aeval:scriptdir=/home/fperrad/perl5/perlbrew/perls/perl-5.24.1/bin' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2', optimize='-O2', cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='', gccversion='4.9.2', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8, longdblkind=0 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/arm-linux-gnueabihf/4.9/include-fixed /usr/include/arm-linux-gnueabihf /usr/lib /lib/arm-linux-gnueabihf /lib /usr/lib/arm-linux-gnueabihf libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.19' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong' Locally applied patches: Devel::PatchPerl 1.38 @INC for perl 5.24.1: /home/fperrad/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/armv7l-linux /home/fperrad/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1 /home/fperrad/perl5/perlbrew/perls/perl-5.24.1/lib/5.24.1/armv7l-linux /home/fperrad/perl5/perlbrew/perls/perl-5.24.1/lib/5.24.1 Environment for perl 5.24.1: HOME=/home/fperrad LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/fperrad/perl5/perlbrew/bin:/home/fperrad/perl5/perlbrew/perls/perl-5.24.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games PERLBREW_BASHRC_VERSION=0.78 PERLBREW_HOME=/home/fperrad/.perlbrew PERLBREW_MANPATH=/home/fperrad/perl5/perlbrew/perls/perl-5.24.1/man PERLBREW_PATH=/home/fperrad/perl5/perlbrew/bin:/home/fperrad/perl5/perlbrew/perls/perl-5.24.1/bin PERLBREW_PERL=perl-5.24.1 PERLBREW_ROOT=/home/fperrad/perl5/perlbrew PERLBREW_VERSION=0.78 PERL_BADLANG (unset) SHELL=/bin/bash ```
p5pRT commented 7 years ago

From @fperrad

add patch

p5pRT commented 7 years ago

From @fperrad

0001-fix-static-build-with-gdbm-gettext.patch ```diff From 12bf966cb6be35e7ceb79a77687d5798a02c9861 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Tue, 17 Jan 2017 15:21:37 +0100 Subject: [PATCH] fix static build with gdbm + gettext Signed-off-by: Francois Perrad --- ext/GDBM_File/Makefile.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/GDBM_File/Makefile.PL b/ext/GDBM_File/Makefile.PL index 2a44d3e..b2759b5 100644 --- a/ext/GDBM_File/Makefile.PL +++ b/ext/GDBM_File/Makefile.PL @@ -2,7 +2,7 @@ use ExtUtils::MakeMaker; use ExtUtils::Constant 0.11 'WriteConstants'; WriteMakefile( NAME => 'GDBM_File', - LIBS => ["-lgdbm", "-ldbm"], + LIBS => ["-lgdbm -lintl", "-lgdbm", "-ldbm"], XSPROTOARG => '-noprototypes', # XXX remove later? VERSION_FROM => 'GDBM_File.pm', realclean => {FILES=> 'const-c.inc const-xs.inc'}, -- 2.7.4 ```
p5pRT commented 7 years ago

From [Unknown Contact. See original ticket]

add patch

p5pRT commented 7 years ago

From @jkeenan

On Mon\, 23 Jan 2017 10​:21​:17 GMT\, fperrad wrote​:

This is a bug report for perl from francois.perrad@​gadz.org\, generated with the help of perlbug 1.40 running under perl 5.24.1.

----------------------------------------------------------------- [Please describe your issue here]

A static build with the library gdbm (with gettext support)\, causes the following linking error​:

/home/dev/checkout/BR/build/perl-static/host/usr/bin/arm-linux-gcc -static -lm -Wl\,-E -o perl perlmain.o libperl.a lib/auto/B/B.a lib/auto/Devel/Peek/Peek.a lib/auto/Fcntl/Fcntl.a lib/auto/File/DosGlob/DosGlob.a lib/auto/File/Glob/Glob.a lib/auto/GDBM_File/GDBM_File.a lib/auto/Hash/Util/Util.a lib/auto/Hash/Util/FieldHash/FieldHash.a lib/auto/I18N/Langinfo/Langinfo.a lib/auto/Opcode/Opcode.a lib/auto/POSIX/POSIX.a lib/auto/PerlIO/encoding/encoding.a lib/auto/PerlIO/mmap/mmap.a lib/auto/PerlIO/scalar/scalar.a lib/auto/PerlIO/via/via.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Sys/Hostname/Hostname.a lib/auto/Tie/Hash/NamedCapture/NamedCapture.a lib/auto/arybase/arybase.a lib/auto/attributes/attributes.a lib/auto/mro/mro.a lib/auto/re/re.a lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a lib/auto/Devel/PPPort/PPPort.a lib/auto/Digest/MD5/MD5.a lib/auto/Digest/SHA/SHA.a lib/auto/Encode/Encode.a lib/auto/Filter/Util/Call/Call.a lib/auto/IPC/SysV/SysV.a lib/auto/MIME/Base64/Base64.a lib/auto/Math/BigInt/FastCalc/FastCalc.a lib/auto/List/Util/Util.a lib/auto/Socket/Socket.a lib/auto/Sys/Syslog/Syslog.a lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Collate/Collate.a lib/auto/Unicode/Normalize/Normalize.a lib/auto/Data/Dumper/Dumper.a lib/auto/IO/IO.a lib/auto/Cwd/Cwd.a lib/auto/Storable/Storable.a lib/auto/Time/HiRes/HiRes.a lib/auto/threads/threads.a lib/auto/threads/shared/shared.a -lm -lcrypt -lgdbm -lm -lrt -lpthread /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmerrno.o)​: In function `gdbm_strerror'​: gdbmerrno.c​:(.text+0x14)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmfetch.o)​: In function `gdbm_fetch'​: gdbmfetch.c​:(.text+0x84)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmseq.o)​: In function `get_next_key'​: gdbmseq.c​:(.text+0xc8)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmstore.o)​: In function `gdbm_store'​: gdbmstore.c​:(.text+0x168)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​: In function `_gdbm_write_bucket'​: bucket.c​:(.text+0x150)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​:bucket.c​:(.text+0x1ec)​: more undefined references to `libintl_dgettext' follow collect2​: error​: ld returned 1 exit status

What would be the command-line options to ./Configure that I would use to reproduce this problem?

Thank you very much.

-- James E Keenan (jkeenan@​cpan.org)

p5pRT commented 7 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 7 years ago

From @tux

On Mon\, 23 Jan 2017 04​:06​:05 -0800\, "James E Keenan via RT" \perlbug\-followup@​perl\.org wrote​:

On Mon\, 23 Jan 2017 10​:21​:17 GMT\, fperrad wrote​:

This is a bug report for perl from francois.perrad@​gadz.org\, generated with the help of perlbug 1.40 running under perl 5.24.1.

----------------------------------------------------------------- [Please describe your issue here]

A static build with the library gdbm (with gettext support)\, causes the following linking error​:

/home/dev/checkout/BR/build/perl-static/host/usr/bin/arm-linux-gcc -static -lm -Wl\,-E -o perl perlmain.o libperl.a lib/auto/B/B.a lib/auto/Devel/Peek/Peek.a lib/auto/Fcntl/Fcntl.a lib/auto/File/DosGlob/DosGlob.a lib/auto/File/Glob/Glob.a lib/auto/GDBM_File/GDBM_File.a lib/auto/Hash/Util/Util.a lib/auto/Hash/Util/FieldHash/FieldHash.a lib/auto/I18N/Langinfo/Langinfo.a lib/auto/Opcode/Opcode.a lib/auto/POSIX/POSIX.a lib/auto/PerlIO/encoding/encoding.a lib/auto/PerlIO/mmap/mmap.a lib/auto/PerlIO/scalar/scalar.a lib/auto/PerlIO/via/via.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Sys/Hostname/Hostname.a lib/auto/Tie/Hash/NamedCapture/NamedCapture.a lib/auto/arybase/arybase.a lib/auto/attributes/attributes.a lib/auto/mro/mro.a lib/auto/re/re.a lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a lib/auto/Devel/PPPort/PPPort.a lib/auto/Digest/MD5/MD5.a lib/auto/Digest/SHA/SHA.a lib/auto/Encode/Encode.a lib/auto/Filter/Util/Call/Call.a lib/auto/IPC/SysV/SysV.a lib/auto/MIME/Base64/Base64.a lib/auto/Math/BigInt/FastCalc/FastCalc.a lib/auto/List/Util/Util.a lib/auto/Socket/Socket.a lib/auto/Sys/Syslog/Syslog.a lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Collate/Collate.a lib/auto/Unicode/Normalize/Normalize.a lib/auto/Data/Dumper/Dumper.a lib/auto/IO/IO.a lib/auto/Cwd/Cwd.a lib/auto/Storable/Storable.a lib/auto/Time/HiRes/HiRes.a lib/auto/threads/threads.a lib/auto/threads/shared/shared.a -lm -lcrypt -lgdbm -lm -lrt -lpthread /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmerrno.o)​: In function `gdbm_strerror'​: gdbmerrno.c​:(.text+0x14)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmfetch.o)​: In function `gdbm_fetch'​: gdbmfetch.c​:(.text+0x84)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmseq.o)​: In function `get_next_key'​: gdbmseq.c​:(.text+0xc8)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmstore.o)​: In function `gdbm_store'​: gdbmstore.c​:(.text+0x168)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​: In function `_gdbm_write_bucket'​: bucket.c​:(.text+0x150)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​:bucket.c​:(.text+0x1ec)​: more undefined references to `libintl_dgettext' follow collect2​: error​: ld returned 1 exit status

What would be the command-line options to ./Configure that I would use to reproduce this problem?

Also note that not all systems that support gdbm have a (working) libintl installed. Adding -lintl without test *will* break systems.

Thank you very much.

-- H.Merijn Brand http​://tux.nl Perl Monger http​://amsterdam.pm.org/ using perl5.00307 .. 5.25 porting perl5 on HP-UX\, AIX\, and openSUSE http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org/ http​://qa.perl.org http​://www.goldmark.org/jeff/stupid-disclaimers/

p5pRT commented 7 years ago

From @fperrad

On Mon\, 23 Jan 2017 04​:16​:00 -0800\, hmbrand wrote​:

On Mon\, 23 Jan 2017 04​:06​:05 -0800\, "James E Keenan via RT" \perlbug\-followup@​perl\.org wrote​:

On Mon\, 23 Jan 2017 10​:21​:17 GMT\, fperrad wrote​:

This is a bug report for perl from francois.perrad@​gadz.org\, generated with the help of perlbug 1.40 running under perl 5.24.1.

----------------------------------------------------------------- [Please describe your issue here]

A static build with the library gdbm (with gettext support)\, causes the following linking error​:

/home/dev/checkout/BR/build/perl-static/host/usr/bin/arm-linux-gcc -static -lm -Wl\,-E -o perl perlmain.o libperl.a lib/auto/B/B.a lib/auto/Devel/Peek/Peek.a lib/auto/Fcntl/Fcntl.a lib/auto/File/DosGlob/DosGlob.a lib/auto/File/Glob/Glob.a lib/auto/GDBM_File/GDBM_File.a lib/auto/Hash/Util/Util.a lib/auto/Hash/Util/FieldHash/FieldHash.a lib/auto/I18N/Langinfo/Langinfo.a lib/auto/Opcode/Opcode.a lib/auto/POSIX/POSIX.a lib/auto/PerlIO/encoding/encoding.a lib/auto/PerlIO/mmap/mmap.a lib/auto/PerlIO/scalar/scalar.a lib/auto/PerlIO/via/via.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Sys/Hostname/Hostname.a lib/auto/Tie/Hash/NamedCapture/NamedCapture.a lib/auto/arybase/arybase.a lib/auto/attributes/attributes.a lib/auto/mro/mro.a lib/auto/re/re.a lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a lib/auto/Devel/PPPort/PPPort.a lib/auto/Digest/MD5/MD5.a lib/auto/Digest/SHA/SHA.a lib/auto/Encode/Encode.a lib/auto/Filter/Util/Call/Call.a lib/auto/IPC/SysV/SysV.a lib/auto/MIME/Base64/Base64.a lib/auto/Math/BigInt/FastCalc/FastCalc.a lib/auto/List/Util/Util.a lib/auto/Socket/Socket.a lib/auto/Sys/Syslog/Syslog.a lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Collate/Collate.a lib/auto/Unicode/Normalize/Normalize.a lib/auto/Data/Dumper/Dumper.a lib/auto/IO/IO.a lib/auto/Cwd/Cwd.a lib/auto/Storable/Storable.a lib/auto/Time/HiRes/HiRes.a lib/auto/threads/threads.a lib/auto/threads/shared/shared.a -lm -lcrypt -lgdbm -lm -lrt -lpthread /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot- linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmerrno.o)​: In function `gdbm_strerror'​: gdbmerrno.c​:(.text+0x14)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot- linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmfetch.o)​: In function `gdbm_fetch'​: gdbmfetch.c​:(.text+0x84)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot- linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmseq.o)​: In function `get_next_key'​: gdbmseq.c​:(.text+0xc8)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot- linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmstore.o)​: In function `gdbm_store'​: gdbmstore.c​:(.text+0x168)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot- linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​: In function `_gdbm_write_bucket'​: bucket.c​:(.text+0x150)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot- linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​:bucket.c​:(.text+0x1ec)​: more undefined references to `libintl_dgettext' follow collect2​: error​: ld returned 1 exit status

What would be the command-line options to ./Configure that I would use to reproduce this problem?

Also note that not all systems that support gdbm have a (working) libintl installed. Adding -lintl without test *will* break systems.

See http​://perldoc.perl.org/ExtUtils/MakeMaker.html#LIBS So\, a first test is done with "-lgdbm -lintl"\, if this test fails\, a second test is done "-lgdbm".

Thank you very much.

p5pRT commented 7 years ago

From @fperrad

On Mon\, 23 Jan 2017 04​:06​:04 -0800\, jkeenan wrote​:

On Mon\, 23 Jan 2017 10​:21​:17 GMT\, fperrad wrote​:

This is a bug report for perl from francois.perrad@​gadz.org\, generated with the help of perlbug 1.40 running under perl 5.24.1.

----------------------------------------------------------------- [Please describe your issue here]

A static build with the library gdbm (with gettext support)\, causes the following linking error​:

/home/dev/checkout/BR/build/perl-static/host/usr/bin/arm-linux-gcc -static -lm -Wl\,-E -o perl perlmain.o libperl.a lib/auto/B/B.a lib/auto/Devel/Peek/Peek.a lib/auto/Fcntl/Fcntl.a lib/auto/File/DosGlob/DosGlob.a lib/auto/File/Glob/Glob.a lib/auto/GDBM_File/GDBM_File.a lib/auto/Hash/Util/Util.a lib/auto/Hash/Util/FieldHash/FieldHash.a lib/auto/I18N/Langinfo/Langinfo.a lib/auto/Opcode/Opcode.a lib/auto/POSIX/POSIX.a lib/auto/PerlIO/encoding/encoding.a lib/auto/PerlIO/mmap/mmap.a lib/auto/PerlIO/scalar/scalar.a lib/auto/PerlIO/via/via.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Sys/Hostname/Hostname.a lib/auto/Tie/Hash/NamedCapture/NamedCapture.a lib/auto/arybase/arybase.a lib/auto/attributes/attributes.a lib/auto/mro/mro.a lib/auto/re/re.a lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a lib/auto/Devel/PPPort/PPPort.a lib/auto/Digest/MD5/MD5.a lib/auto/Digest/SHA/SHA.a lib/auto/Encode/Encode.a lib/auto/Filter/Util/Call/Call.a lib/auto/IPC/SysV/SysV.a lib/auto/MIME/Base64/Base64.a lib/auto/Math/BigInt/FastCalc/FastCalc.a lib/auto/List/Util/Util.a lib/auto/Socket/Socket.a lib/auto/Sys/Syslog/Syslog.a lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Collate/Collate.a lib/auto/Unicode/Normalize/Normalize.a lib/auto/Data/Dumper/Dumper.a lib/auto/IO/IO.a lib/auto/Cwd/Cwd.a lib/auto/Storable/Storable.a lib/auto/Time/HiRes/HiRes.a lib/auto/threads/threads.a lib/auto/threads/shared/shared.a -lm -lcrypt -lgdbm -lm -lrt -lpthread /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmerrno.o)​: In function `gdbm_strerror'​: gdbmerrno.c​:(.text+0x14)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmfetch.o)​: In function `gdbm_fetch'​: gdbmfetch.c​:(.text+0x84)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmseq.o)​: In function `get_next_key'​: gdbmseq.c​:(.text+0xc8)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(gdbmstore.o)​: In function `gdbm_store'​: gdbmstore.c​:(.text+0x168)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​: In function `_gdbm_write_bucket'​: bucket.c​:(.text+0x150)​: undefined reference to `libintl_dgettext' /home/dev/checkout/BR/build/perl-static/host/usr/arm-buildroot-linux- uclibcgnueabi/sysroot/usr/lib/libgdbm.a(bucket.o)​:bucket.c​:(.text+0x1ec)​: more undefined references to `libintl_dgettext' follow collect2​: error​: ld returned 1 exit status

What would be the command-line options to ./Configure that I would use to reproduce this problem?

I cross compile perl in an Buildroot (http​://buildroot.org/) environment. See full log on http​://autobuild.buildroot.org/results/d1f/d1f133ca3693b6653eed4fc513effc0bbdcfd9c9/build-end.log Other occurences of this failure on http​://autobuild.buildroot.org/?reason=perl-5.24.0 The configure script is not the usual one\, it comes from http​://github.com/arsv/perl-cross

Thank you very much.