develooper Front page | perl.perl5.porters | Postings from April 2007

Re: g++ on FreeBSD

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
April 10, 2007 10:03
Subject:
Re: g++ on FreeBSD
Message ID:
20070410170340.GH69960@plum.flirble.org
On Wed, Mar 28, 2007 at 12:23:41PM -0400, Andy Dougherty wrote:

> Poking about in the hints files a bit, I think the following might help.  
> We should probably eventually incorporate this more carefully in 
> Configure's usenm.U unit, but not today.
> 
> diff -u perl-current/hints/freebsd.sh perl-andy/hints/freebsd.sh
> --- perl-current/hints/freebsd.sh	2007-03-08 06:22:17.000000000 -0500
> +++ perl-andy/hints/freebsd.sh	2007-03-28 11:42:31.000000000 -0400
> @@ -138,11 +138,22 @@
>  *)
>  	ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
>  	if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then
> -	    usenm=false
> +	    # Respect a command-line override
> +	    test -z "$usenm" && usenm=false
>  	fi
>          ;;
>  esac
>  
> +
> +# If we are using g++ we must use nm and force ourselves to use
> +# the /usr/lib/libc.a because the symbol scanning tricks of 
> +# Configure will crash and burn horribly.
> +case "$cc" in
> +*g++*) usenm=true
> +       libc='/usr/lib/libc.a'
> +       ;;
> +esac
> +
>  cat <<'EOM' >&4
>  
>  Some users have reported that Configure halts when testing for

Sadly it has almost no effect:

--- config.sh   Tue Apr 10 17:36:34 2007
+++ config.sh.g++.orig  Tue Apr 10 17:32:10 2007
@@ -8,7 +8,7 @@
 
 # Package name      : perl5
 # Source directory  : .
-# Configuration time: Tue Apr 10 17:36:06 BST 2007
+# Configuration time: Tue Apr 10 17:31:41 BST 2007
 # Configured by     : nick
 # Target system     : freebsd saigo.etla.org 6.2-release-p1 freebsd 6.2-release-p1 #1: sun feb 18 11:53:59 gmt 2007 root@saigo.etla.org:usrobjusrsrcsyssaigo2 i386 
 
@@ -63,7 +63,7 @@
 ccversion=''
 cf_by='nick'
 cf_email='nick@ccl4.org'
-cf_time='Tue Apr 10 17:36:06 BST 2007'
+cf_time='Tue Apr 10 17:31:41 BST 2007'
 charsize='1'
 chgrp=''
 chmod='chmod'
@@ -741,7 +741,7 @@
 ldlibpthname='LD_LIBRARY_PATH'
 less='less'
 lib_ext='.a'
-libc='/usr/lib/libc.a'
+libc=''
 libperl='libperl.a'
 libpth='/usr/lib /usr/local/lib'
 libs='-lm -lcrypt'


and then it fails in the same way.

g++ Configure has a lot of stuff such as:

ctermid() NOT found.

ctermid_r() NOT found.

ctime_r() NOT found.

whereas gcc Configure finds them:

ctermid() found.

ctermid_r() found.
ctermid_r() prototype found.
Prototype: char* ctermid_r(char*);

ctime_r() found.
ctime_r() prototype found.
Prototype: char* ctime_r(const time_t*, char*);



One can't use nm to extra symbols on FreeBSD.

Was there a flag to get Configure to not delete all its try.c files?

Nicholas Clark

Thread Previous | Thread Next


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