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
hints/freebsd.sh not freebsd 7+ aware #10338
Comments
From @toddrWhen running configure on FreeBSD 7+, the following error message is printed when hints are run: ./hints/freebsd.sh: /usr/bin/objformat: not found The reason for this is outlined in this email from Feb 2007 As hints run now, it should be executing the non-a.out code, so the below patch should be applied to fix this. Inline Patchdiff --git a/hints/freebsd.sh b/hints/freebsd.sh
index 7d543be..cc6484b 100644
--- a/hints/freebsd.sh
+++ b/hints/freebsd.sh
@@ -114,7 +114,7 @@ case "$osvers" in
lddlflags="-Bshareable $lddlflags"
;;
-*)
+3*|4*|5*|6*)
objformat=`/usr/bin/objformat`
if [ x$objformat = xaout ]; then
if [ -e /usr/lib/aout ]; then
@@ -130,6 +130,13 @@ case "$osvers" in
fi
cccdlflags='-DPIC -fPIC'
;;
+*)
+ libpth="/usr/lib /usr/local/lib"
+ glibpth="/usr/lib /usr/local/lib"
+ ldflags="-Wl,-E "
+ lddlflags="-shared "
+ cccdlflags='-DPIC -fPIC'
+ ;;
esac
case "$osvers" in |
From @toddrpatch file attached |
From @toddrInline Patchdiff --git a/hints/freebsd.sh b/hints/freebsd.sh
index 7d543be..cc6484b 100644
--- a/hints/freebsd.sh
+++ b/hints/freebsd.sh
@@ -114,7 +114,7 @@ case "$osvers" in
lddlflags="-Bshareable $lddlflags"
;;
-*)
+3*|4*|5*|6*)
objformat=`/usr/bin/objformat`
if [ x$objformat = xaout ]; then
if [ -e /usr/lib/aout ]; then
@@ -130,6 +130,13 @@ case "$osvers" in
fi
cccdlflags='-DPIC -fPIC'
;;
+*)
+ libpth="/usr/lib /usr/local/lib"
+ glibpth="/usr/lib /usr/local/lib"
+ ldflags="-Wl,-E "
+ lddlflags="-shared "
+ cccdlflags='-DPIC -fPIC'
+ ;;
esac
case "$osvers" in |
The RT System itself - Status changed from 'new' to 'open' |
From @doughera88On Wed, 21 Apr 2010, Todd Rinaldo wrote:
Thanks. Applied as commit a8ca765 -- |
@doughera88 - Status changed from 'open' to 'resolved' |
From @TuxOn Thu, 22 Apr 2010 08:38:35 -0400 (EDT), Andy Dougherty
+1 for 5.12.1 -- |
From @doughera88On Thu, 22 Apr 2010, H.Merijn Brand wrote:
I don't really care either way. It's a quite safe fix, but the warning it -- |
From @doughera88On Thu, 22 Apr 2010, Andy Dougherty wrote:
On further thought, I'll vote +1 for 5.12.1 here -- it's probably easier -- |
From @toddrOn Apr 27, 2010, at 7:11 AM, Andy Dougherty wrote:
While we're at it, I've discovered that ports is also applying this patch to perl for 5.10. Since this hints file is arguably the property of the ports folks, I'd argue for it being committed into blead. Same drift argument. I've amended the ports patch to deal with the recent blead changes to this file only. From what I can tell, the patch forces threads on and also makes some library inclusion changes. I assume 5.12 didn't have any significant library dependency issues that would make this patch invalid. The only thing I'm unsure about is whether we should be forcing threads on the way they're doing it. I don't have any strong feelings either way if this goes into 5.12.1 but it probably ought to go into blead. Todd. |
From @TuxOn Tue, 27 Apr 2010 11:00:23 -0500, Todd Rinaldo <toddr@cpanel.net>
That line shows it is in blead already
That, plus my vote makes us need just one more committer vote to get it
On what grounds? I didn't check, but did *all* patches to the hint file
-- |
From @toddrOn Apr 27, 2010, at 11:43 AM, H.Merijn Brand wrote:
I'm making a bold assumption that a large portion of the freebsd install base installs whatever ports provides. Therefore it would be advantageous that whatever p5p provides be as close as possible to what ports provides for the hints file. I realize there are limitations in my assumptions. I was hoping some active freebsd folks could chime in with an opinion. Todd |
From @toddrInline Patchdiff --git a/hints/freebsd.sh b/hints/freebsd.sh
index 44cf0eb..aee6791 100644
--- a/hints/freebsd.sh
+++ b/hints/freebsd.sh
@@ -88,6 +88,8 @@ case "$osvers" in
esac
libswanted=`echo $libswanted | sed 's/ malloc / /'`
libswanted=`echo $libswanted | sed 's/ bind / /'`
+ libswanted=`echo $libswanted | sed 's/ dl / /'`
+ libswanted=`echo $libswanted | sed 's/ c / /'`
# iconv gone in Perl 5.8.1, but if someone compiles 5.8.0 or earlier.
libswanted=`echo $libswanted | sed 's/ iconv / /'`
d_setregid='define'
@@ -102,6 +104,10 @@ case "$osvers" in
;;
esac
libswanted=`echo $libswanted | sed 's/ malloc / /'`
+ libswanted=`echo $libswanted | sed 's/ bind / /'`
+ libswanted=`echo $libswanted | sed 's/ dl / /'`
+ libswanted=`echo $libswanted | sed 's/ iconv / /'`
+ libswanted=`echo $libswanted | sed 's/ c / /'`
;;
esac
@@ -125,15 +131,15 @@ case "$osvers" in
else
libpth="/usr/lib /usr/local/lib"
glibpth="/usr/lib /usr/local/lib"
- ldflags="-Wl,-E "
+ ldflags="%%PTHREAD_LIBS%% -Wl,-E "
lddlflags="-shared "
fi
cccdlflags='-DPIC -fPIC'
;;
*)
- libpth="/usr/lib /usr/local/lib"
- glibpth="/usr/lib /usr/local/lib"
- ldflags="-Wl,-E "
+ libpth="/usr/lib /usr/local/lib"
+ glibpth="/usr/lib /usr/local/lib"
+ ldflags="%%PTHREAD_LIBS%% -Wl,-E "
lddlflags="-shared "
cccdlflags='-DPIC -fPIC'
;;
@@ -143,7 +149,7 @@ case "$osvers" in
0*|1*|2*|3*) ;;
*)
- ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
+ ccflags="${ccflags} %%PTHREAD_CFLAGS%% -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then
usenm=false
fi
@@ -190,7 +196,9 @@ esac
# This script UU/usethreads.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use threads.
-cat > UU/usethreads.cbu <<'EOCBU'
+## not quite - modern FreeBSD perl port is supposed to take care of that
+## we just add extra libraries and cflags nowadays
+cat > /dev/null <<'EOCBU'
case "$usethreads" in
$define|true|[yY]*)
lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'` |
From @tomhukinsOn Tue, Apr 27, 2010 at 11:58:27AM -0500, Todd Rinaldo wrote:
I suspect you're right.
I agree, but it's not p5p's responsibility to do this. FreeBSD's Tom |
From @TuxOn Tue, 27 Apr 2010 12:00:26 -0500, Todd Rinaldo <toddr@cpanel.net>
Ah
:) I did not apply the patch, as I have no knowledge about FreeBSD FWIW I fully agree that we should be as close to what they use as -- |
From ben@morrow.me.ukQuoth toddr@cpanel.net (Todd Rinaldo):
This won't work outside of ports. The %%PTHREAD_LIBS%% is substituted AIUI, the aim of this (and the usethreads.cbu bit below) is to ensure The aim is certainly *not* to force perl to be built with -Dusethreads. Ben |
From @doughera88On Tue, 27 Apr 2010, Todd Rinaldo wrote:
Ah, that makes more sense. I agree with the general idea of trying to keep perl and various ports in I do like how hints/openbsd.sh tries to cleanly separate things specific In any case, this patch obviously can't be applied as is, since the -- |
Migrated from rt.perl.org#74564 (status was 'resolved')
Searchable as RT74564$
The text was updated successfully, but these errors were encountered: