Perl / perl5

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

[PATCH] aee8a1a libc_r was removed from recent versions of MidnightBSD and older versions work better with -pthread. This corrects build errors with threading enabled on MidnightBSD 0.4-CURRENT #12778

Closed p5pRT closed 11 years ago

p5pRT commented 11 years ago

Migrated from rt.perl.org#116785 (status was 'resolved')

Searchable as RT116785$

p5pRT commented 11 years ago

From @laffer1

This is a bug report for perl from luke@​foolishgames.com\, generated with the help of perlbug 1.39 running under perl 5.14.2.

From aee8a1a31d264bf9627ab5348cdd5138adba9d05 Mon Sep 17 00​:00​:00 2001 From​: Lucas Holt \luke@​foolishgames\.com Date​: Sun\, 17 Feb 2013 05​:13​:57 +0000 Subject​: [PATCH] libc_r was removed from recent versions of MidnightBSD and older versions work better with -pthread. This corrects build errors with threading enabled on MidnightBSD 0.4-CURRENT MIME-Version​: 1.0 Content-Type​: multipart/mixed; boundary="------------1.7.7.4"

This is a multi-part message in MIME format. --------------1.7.7.4 Content-Type​: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding​: 8bit


hints/midnightbsd.sh | 8 ++------ 1 files changed\, 2 insertions(+)\, 6 deletions(-)

--------------1.7.7.4 Content-Type​: text/x-patch; name="0001-libc_r-was-removed-from-recent-versions-of-MidnightB.patch" Content-Transfer-Encoding​: 8bit Content-Disposition​: attachment; filename="0001-libc_r-was-removed-from-recent-versions-of-MidnightB.patch"

Inline Patch ```diff diff --git a/hints/midnightbsd.sh b/hints/midnightbsd.sh index b5ef050..13a5335 100644 --- a/hints/midnightbsd.sh +++ b/hints/midnightbsd.sh @@ -33,12 +33,8 @@ d_voidsig='define' cat > UU/usethreads.cbu <<'EOCBU' case "$usethreads" in $define|true|[yY]*) - lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'` - ldflags="-pthread $ldflags" - d_gethostbyaddr_r="undef" - d_gethostbyaddr_r_proto="0" - - set `echo X "$libswanted "| sed -e 's/ c / c_r /'` + ldflags="-pthread $ldflags" + set `echo X "$libswanted "| sed -e 's/ c //'` shift libswanted="$*" # Configure will probably pick the wrong libc to use for nm scan. --------------1.7.7.4-- --- ```

Flags:   category=core   severity=low


Site configuration information for perl 5.14.2​:

Configured by laffer1 at Sun Feb 3 23​:49​:34 UTC 2013.

Summary of my perl5 (revision 5 version 14 subversion 2) configuration​:  
  Platform​:   osname=midnightbsd\, osvers=0.4-current\, archname=amd64-midnightbsd   uname='midnightbsd ds9.midnightbsd.org. 0.4-current midnightbsd 0.4-current #3​: sat jun 16 21​:38​:35 edt 2012 laffer1@​ds9.midnightbsd.org.​:usrobjusrsrcsysds9 amd64 '   config_args='-des -Dprefix=/usr -Dsiteprefix=/usr/local -Dvendorprefix=/usr -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dmksymlinks -Dsrc=/usr/src/usr.bin/perl/../../contrib/perl -Duse64bitint -Duseshrplib'   hint=recommended\, useposix=true\, d_sigaction=define   useithreads=undef\, usemultiplicity=undef   useperlio=define\, d_sfio=undef\, uselargefiles=define\, usesocks=undef   use64bitint=define\, use64bitall=define\, uselongdouble=undef   usemymalloc=n\, bincompat5005=undef   Compiler​:   cc='cc'\, ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'\,   optimize='-O'\,   cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'   ccversion=''\, gccversion='4.2.1 20070831 patched [MidnightBSD]'\, gccosandvers=''   intsize=4\, longsize=8\, ptrsize=8\, doublesize=8\, byteorder=12345678   d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16   ivtype='long'\, ivsize=8\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8   alignbytes=8\, prototype=define   Linker and Libraries​:   ld='cc'\, ldflags ='-Wl\,-E -fstack-protector -L/usr/local/lib'   libpth=/usr/lib /usr/local/lib   libs=-lgdbm -lm -lcrypt -lutil -lc   perllibs=-lm -lcrypt -lutil -lc   libc=\, so=so\, useshrplib=true\, libperl=libperl.so   gnulibc_version=''   Dynamic Linking​:   dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags=' '   cccdlflags='-DPIC -fPIC'\, lddlflags='-shared -L/usr/local/lib -fstack-protector'

Locally applied patches​:  


@​INC for perl 5.14.2​:   /usr/local/lib/perl5/site_perl/5.14.2/amd64-midnightbsd   /usr/local/lib/perl5/site_perl/5.14.2   /usr/lib/perl5/vendor_perl/5.14.2/amd64-midnightbsd   /usr/lib/perl5/vendor_perl/5.14.2   /usr/lib/perl5/5.14.2/amd64-midnightbsd   /usr/lib/perl5/5.14.2   /usr/local/lib/perl5/site_perl   /usr/lib/perl5/vendor_perl   .


Environment for perl 5.14.2​:   HOME=/root   LANG (unset)   LANGUAGE (unset)   LD_LIBRARY_PATH (unset)   LOGDIR (unset)   PATH=/sbin​:/bin​:/usr/sbin​:/usr/bin​:/usr/games​:/usr/local/sbin​:/usr/local/bin​:/root/bin   PERL_BADLANG (unset)   SHELL=/bin/mksh

p5pRT commented 11 years ago

From @jkeenan

On Sat Feb 16 13​:18​:58 2013\, luke@​foolishgames.com wrote​:

This is a bug report for perl from luke@​foolishgames.com\, generated with the help of perlbug 1.39 running under perl 5.14.2.

From aee8a1a31d264bf9627ab5348cdd5138adba9d05 Mon Sep 17 00​:00​:00 2001 From​: Lucas Holt \luke@&#8203;foolishgames\.com Date​: Sun\, 17 Feb 2013 05​:13​:57 +0000 Subject​: [PATCH] libc_r was removed from recent versions of MidnightBSD and older versions work better with -pthread. This corrects build errors with threading enabled on MidnightBSD 0.4-CURRENT MIME-Version​: 1.0 Content-Type​: multipart/mixed; boundary="------------1.7.7.4"

This is a multi-part message in MIME format. --------------1.7.7.4 Content-Type​: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding​: 8bit

--- hints/midnightbsd.sh | 8 ++------ 1 files changed\, 2 insertions(+)\, 6 deletions(-)

--------------1.7.7.4 Content-Type​: text/x-patch; name="0001-libc_r-was-removed-from-recent- versions-of-MidnightB.patch" Content-Transfer-Encoding​: 8bit Content-Disposition​: attachment; filename="0001-libc_r-was-removed- from-recent-versions-of-MidnightB.patch"

diff --git a/hints/midnightbsd.sh b/hints/midnightbsd.sh index b5ef050..13a5335 100644 --- a/hints/midnightbsd.sh +++ b/hints/midnightbsd.sh @​@​ -33\,12 +33\,8 @​@​ d_voidsig='define' cat > UU/usethreads.cbu \<\<'EOCBU' case "$usethreads" in $define|true|[yY]*) - lc_r=`/sbin/ldconfig -r|grep '​:-lc_r'|awk '{print $NF}'|sed -n '$p'` - ldflags="-pthread $ldflags" - d_gethostbyaddr_r="undef" - d_gethostbyaddr_r_proto="0" - - set `echo X "$libswanted "| sed -e 's/ c / c_r /'` + ldflags="-pthread $ldflags" + set `echo X "$libswanted "| sed -e 's/ c //'` shift libswanted="$*" # Configure will probably pick the wrong libc to use for nm scan.

--------------1.7.7.4--

--- Flags​: category=core severity=low --- Site configuration information for perl 5.14.2​:

Configured by laffer1 at Sun Feb 3 23​:49​:34 UTC 2013.

Summary of my perl5 (revision 5 version 14 subversion 2) configuration​:

Platform​: osname=midnightbsd\, osvers=0.4-current\, archname=amd64-midnightbsd uname='midnightbsd ds9.midnightbsd.org. 0.4-current midnightbsd 0.4-current #3​: sat jun 16 21​:38​:35 edt 2012 laffer1@​ds9.midnightbsd.org.​:usrobjusrsrcsysds9 amd64 ' config_args='-des -Dprefix=/usr -Dsiteprefix=/usr/local -Dvendorprefix=/usr -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dmksymlinks -Dsrc=/usr/src/usr.bin/perl/../../contrib/perl -Duse64bitint -Duseshrplib' hint=recommended\, useposix=true\, d_sigaction=define useithreads=undef\, usemultiplicity=undef useperlio=define\, d_sfio=undef\, uselargefiles=define\, usesocks=undef use64bitint=define\, use64bitall=define\, uselongdouble=undef usemymalloc=n\, bincompat5005=undef Compiler​: cc='cc'\, ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'\, optimize='-O'\, cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion=''\, gccversion='4.2.1 20070831 patched [MidnightBSD]'\, gccosandvers='' intsize=4\, longsize=8\, ptrsize=8\, doublesize=8\, byteorder=12345678 d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16 ivtype='long'\, ivsize=8\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8 alignbytes=8\, prototype=define Linker and Libraries​: ld='cc'\, ldflags ='-Wl\,-E -fstack-protector -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lgdbm -lm -lcrypt -lutil -lc perllibs=-lm -lcrypt -lutil -lc libc=\, so=so\, useshrplib=true\, libperl=libperl.so gnulibc_version='' Dynamic Linking​: dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags=' ' cccdlflags='-DPIC -fPIC'\, lddlflags='-shared -L/usr/local/lib -fstack-protector'

Locally applied patches​:

--- @​INC for perl 5.14.2​: /usr/local/lib/perl5/site_perl/5.14.2/amd64-midnightbsd /usr/local/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/vendor_perl/5.14.2/amd64-midnightbsd /usr/lib/perl5/vendor_perl/5.14.2 /usr/lib/perl5/5.14.2/amd64-midnightbsd /usr/lib/perl5/5.14.2 /usr/local/lib/perl5/site_perl /usr/lib/perl5/vendor_perl .

--- Environment for perl 5.14.2​: HOME=/root LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset)

PATH=/sbin​:/bin​:/usr/sbin​:/usr/bin​:/usr/games​:/usr/local/sbin​:/usr/local/bin​:/root/bin PERL_BADLANG (unset) SHELL=/bin/mksh

Can we get one other user of MidnightBSD to vet this patch?

Thank you very much. Jim Keenan

p5pRT commented 11 years ago

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

p5pRT commented 11 years ago

From @bingos

On Sat\, Feb 16\, 2013 at 03​:13​:22PM -0800\, James E Keenan via RT wrote​:

Can we get one other user of MidnightBSD to vet this patch?

Thank you very much. Jim Keenan

I haven't got 0.4\, but do have 0.3 running.

As MidnightBSD forked off from FreeBSD 6.0(ish) and 'hints/freebsd.sh' has this to say about -lc_r

  # Anton Berezin says that post 500something we're wrong to be   # to be using -lc_r\, and should just be using -pthread on the   # linker line.   # So presumably really we should be checking that $osver is 5.*)   # and that `/sbin/sysctl -n kern.osreldate` -ge 500016   # or -lt 500something and only in that range not doing this​:   ldflags="-pthread $ldflags"

I'll try the patch out and commit it if all is okay on 0.3

Cheers\,

-- Chris Williams aka BinGOs PGP ID 0x4658671F http​://www.gumbynet.org.uk

p5pRT commented 11 years ago

From @jkeenan

On Sat Feb 16 13​:18​:58 2013\, luke@​foolishgames.com wrote​:

This is a bug report for perl from luke@​foolishgames.com\, generated with the help of perlbug 1.39 running under perl 5.14.2.

From aee8a1a31d264bf9627ab5348cdd5138adba9d05 Mon Sep 17 00​:00​:00 2001 From​: Lucas Holt \luke@&#8203;foolishgames\.com Date​: Sun\, 17 Feb 2013 05​:13​:57 +0000 Subject​: [PATCH] libc_r was removed from recent versions of MidnightBSD and older versions work better with -pthread. This corrects build errors with threading enabled on MidnightBSD 0.4-CURRENT MIME-Version​: 1.0 Content-Type​: multipart/mixed; boundary="------------1.7.7.4"

This is a multi-part message in MIME format. --------------1.7.7.4 Content-Type​: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding​: 8bit

--- hints/midnightbsd.sh | 8 ++------ 1 files changed\, 2 insertions(+)\, 6 deletions(-)

Luke​: A patch has been committed to blead in commit 721fe537. Can you test that out?

Thank you very much. Jim Keenan

p5pRT commented 11 years ago

From @laffer1

On Feb 17\, 2013\, at 1​:48 PM\, "James E Keenan via RT" \perlbug\-followup@&#8203;perl\.org wrote​:

Luke​: A patch has been committed to blead in commit 721fe537. Can you test that out?

Thank you very much. Jim Keenan

Jim\,

I just tested this locally and it's working great.

Thank you.

Lucas Holt Luke@​FoolishGames.com ________________________________________________________ MidnightBSD.org (Free OS) JustJournal.com (Free blogging)

p5pRT commented 11 years ago

From @jkeenan

Marking resolved per feedback from OP.

p5pRT commented 11 years ago

From [Unknown Contact. See original ticket]

Marking resolved per feedback from OP.

p5pRT commented 11 years ago

@jkeenan - Status changed from 'open' to 'resolved'