Skip to content
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

perl + gcc-4.0.0 + solaris + gnu binutils #7964

Closed
p5pRT opened this issue Jun 10, 2005 · 16 comments
Closed

perl + gcc-4.0.0 + solaris + gnu binutils #7964

p5pRT opened this issue Jun 10, 2005 · 16 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 10, 2005

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

Searchable as RT36235$

@p5pRT
Copy link
Author

p5pRT commented Jun 10, 2005

From niki.waibel@newlogic.com

perl on solaris using gcc-3.X and gnu binutils correctly adds -Wl,-E to
to LDFLAGS. it seems that the detection of the gnu binutils is somehow
broken if gcc-4.X is used.

seen in perl-5.8.5 / perl-5.8.6 / perl-5.8.7
using gcc-3.4.3 / gcc-4.0.0
on solaris9 and solaris10.

i also tested different versions of the binutils, because
first i thought that i've to blame the binutils​:
binutils-2.15.92.0.2 / binutils-2.15.94.0.2 / binutils-2.16.90.0.3
but the binutils version has nothing to do with this bug!

i fixed this problem by setting
  LDFLAGS="-Wl,-E $LDFLAGS"
and using
  ./configure.gnu -Dlddlflags="-shared $LDFLAGS"

i am not suscribed to any perl-list, so pls Cc​: me if
you respond to this bugreport.

hope this helps, niki w. waibel
--
niki w. waibel - system administrator @​ newlogic technologies ag

@p5pRT
Copy link
Author

p5pRT commented Jul 25, 2005

From @doughera88

On Thu, 10 Jun 2005, Niki W. Waibel wrote​:

# New Ticket Created by "Niki W. Waibel"
# Please include the string​: [perl #36235]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=36235 >

perl on solaris using gcc-3.X and gnu binutils correctly adds -Wl,-E to
to LDFLAGS. it seems that the detection of the gnu binutils is somehow
broken if gcc-4.X is used.

The detection is done in hints/solaris_2.sh. It's quite possible that the
output of gcc has changed such that the hints file doesn't pick it up
correctly anymore.

Could you please create a trivial "Hello world" C program and then compile
it with

  gcc-3.X -v -o hello hello.c > gcc3.out 2>&1
  gcc-3.X -Wl,-V -o hello hello.c > gcc3-Wl.out 2>&1
  gcc-4.0 -v -o hello hello.c > gcc4.out 2>&1
  gcc-4.0 -Wl,-V -o hello hello.c > gcc4-Wl.out 2>&1

(adjusting the exact gcc names as needed.)

and send me the various *.out files? Then perhaps I can see
why the hints/solaris_2.sh file is failing.

--
  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Jul 25, 2005

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

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2005

From niki.waibel@newlogic.com

On 25-Jul-2005 Andy Dougherty via RT wrote​:

On Thu, 10 Jun 2005, Niki W. Waibel wrote​:

# New Ticket Created by "Niki W. Waibel"
# Please include the string​: [perl #36235]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=36235 >

perl on solaris using gcc-3.X and gnu binutils correctly adds -Wl,-E to
to LDFLAGS. it seems that the detection of the gnu binutils is somehow
broken if gcc-4.X is used.

The detection is done in hints/solaris_2.sh. It's quite possible that the
output of gcc has changed such that the hints file doesn't pick it up
correctly anymore.

Could you please create a trivial "Hello world" C program and then compile
it with

  gcc\-3\.X \-v \-o hello hello\.c > gcc3\.out 2>&1
  gcc\-3\.X \-Wl\,\-V \-o hello hello\.c > gcc3\-Wl\.out 2>&1
  gcc\-4\.0 \-v \-o hello hello\.c > gcc4\.out 2>&1
  gcc\-4\.0 \-Wl\,\-V \-o hello hello\.c > gcc4\-Wl\.out 2>&1

(adjusting the exact gcc names as needed.)

and send me the various *.out files? Then perhaps I can see
why the hints/solaris_2.sh file is failing.

ok. created the files using gcc-3.4.3/gcc-4.0.0 and
binutils-2.16.90.0.3 on solaris9.

===
nwaibel@​blade100-2​:~/c $ cat hello.c
#include <stdio.h>

int main();

int main()
{
  printf("hello world!\n");
  return(0);
}

gcc is compiled using --prefix=/misc/sparc-sun-solaris2.9/opt/gcc/${VERSION}
binutils are compiled using --prefix=/misc/sparc-sun-solaris2.9/opt/binutis/${VERSION}

requested files are attached to this email. hope that is ok.
never used this perlbug system before...

niki

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2005

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2005

From niki.waibel@newlogic.com

gcc4.out

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2005

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2005

From niki.waibel@newlogic.com

gcc3.out

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2005

From @doughera88

On Tue, 26 Jul 2005, Niki Waibel wrote​:

On 25-Jul-2005 Andy Dougherty via RT wrote​:

On Thu, 10 Jun 2005, Niki W. Waibel wrote​:

# New Ticket Created by "Niki W. Waibel"
# Please include the string​: [perl #36235]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=36235 >

perl on solaris using gcc-3.X and gnu binutils correctly adds -Wl,-E to
to LDFLAGS. it seems that the detection of the gnu binutils is somehow
broken if gcc-4.X is used.

The detection is done in hints/solaris_2.sh. It's quite possible that the
output of gcc has changed such that the hints file doesn't pick it up
correctly anymore.

Thanks for the verbose output. It looks like the problem is that the old
output of gcc-[23] 'Reading specs from ... ' has been replaced in gcc-4
(at least in this configuration) by 'Using built-in specs'.

The following simple patch to hints/solaris_2.sh might be enough to get
things to work. Could you try it out? (apply with patch -p1). You'll
have to remove your old config.sh before re-running Configure.

  rm config.sh
  sh Configure [whatever options you want]

Inline Patch
--- perl-current/hints/solaris_2.sh	Sun May 22 10:38:40 2005
+++ perl-andy/hints/solaris_2.sh	Tue Jul 26 11:29:22 2005
@@ -211,7 +211,10 @@
 	# Indent to avoid propagation to config.sh
 	verbose=`${cc:-cc} -v -o try try.c 2>&1`
 
-if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
+# XXX TODO:  'specs' output changed from 'Reading specs from' in gcc-[23] to 'Using
+# built-in specs' in gcc-4.  Perhaps we should just use the same gcc test as
+# in Configure to see if we're using gcc.
+if echo "$verbose" | egrep '(Reading specs from)|(Using built-in specs)' >/dev/null 2>&1; then
 	#
 	# Using gcc.
 	#
-- 
    Andy Dougherty		doughera@lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2005

From niki.waibel@newlogic.com

Thanks for the verbose output. It looks like the problem is that the old
output of gcc-[23] 'Reading specs from ... ' has been replaced in gcc-4
(at least in this configuration) by 'Using built-in specs'.

The following simple patch to hints/solaris_2.sh might be enough to get
things to work. Could you try it out? (apply with patch -p1). You'll
have to remove your old config.sh before re-running Configure.

  rm config\.sh
  sh Configure \[whatever options you want\]

--- perl-current/hints/solaris_2.sh Sun May 22 10​:38​:40 2005
+++ perl-andy/hints/solaris_2.sh Tue Jul 26 11​:29​:22 2005
@​@​ -211,7 +211,10 @​@​
# Indent to avoid propagation to config.sh
verbose=`${cc​:-cc} -v -o try try.c 2>&1`

-if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
+# XXX TODO​: 'specs' output changed from 'Reading specs from' in gcc-[23] to 'Using
+# built-in specs' in gcc-4. Perhaps we should just use the same gcc test as
+# in Configure to see if we're using gcc.
+if echo "$verbose" | egrep '(Reading specs from)|(Using built-in specs)' >/dev/null 2>&1; then
#
# Using gcc.
#
--
Andy Dougherty doughera@​lafayette.edu

sorry, out for a business trip the next 2 days...
will try later...

@p5pRT
Copy link
Author

p5pRT commented Aug 9, 2005

From niki.waibel@newlogic.com

On 26-Jul-2005 Andy Dougherty via RT wrote​:

On Tue, 26 Jul 2005, Niki Waibel wrote​:

On 25-Jul-2005 Andy Dougherty via RT wrote​:

On Thu, 10 Jun 2005, Niki W. Waibel wrote​:

# New Ticket Created by "Niki W. Waibel"
# Please include the string​: [perl #36235]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=36235 >

perl on solaris using gcc-3.X and gnu binutils correctly adds -Wl,-E to
to LDFLAGS. it seems that the detection of the gnu binutils is somehow
broken if gcc-4.X is used.

The detection is done in hints/solaris_2.sh. It's quite possible that the
output of gcc has changed such that the hints file doesn't pick it up
correctly anymore.

Thanks for the verbose output. It looks like the problem is that the old
output of gcc-[23] 'Reading specs from ... ' has been replaced in gcc-4
(at least in this configuration) by 'Using built-in specs'.

The following simple patch to hints/solaris_2.sh might be enough to get
things to work. Could you try it out? (apply with patch -p1). You'll
have to remove your old config.sh before re-running Configure.

  rm config\.sh
  sh Configure \[whatever options you want\]

--- perl-current/hints/solaris_2.sh Sun May 22 10​:38​:40 2005
+++ perl-andy/hints/solaris_2.sh Tue Jul 26 11​:29​:22 2005
@​@​ -211,7 +211,10 @​@​
# Indent to avoid propagation to config.sh
verbose=`${cc​:-cc} -v -o try try.c 2>&1`

-if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
+# XXX TODO​: 'specs' output changed from 'Reading specs from' in gcc-[23] to 'Using
+# built-in specs' in gcc-4. Perhaps we should just use the same gcc test as
+# in Configure to see if we're using gcc.
+if echo "$verbose" | egrep '(Reading specs from)|(Using built-in specs)' >/dev/null 2>&1; then
#
# Using gcc.
#
--

patch is fine and works ok. although i'd really love to see​:
  a) std configure produced by autoconf
  b) std makefiles produces by automake
  c) std handling of libraries (libperl.a/libperl.so.1.0.0) by libtool
but maybe that is anyway on the roadmap...

thanks for help, niki

@p5pRT
Copy link
Author

p5pRT commented Aug 10, 2005

From @doughera88

On Tue, 9 Aug 2005, Niki Waibel wrote​:

patch is fine and works ok. although i'd really love to see​:
a) std configure produced by autoconf
b) std makefiles produces by automake
c) std handling of libraries (libperl.a/libperl.so.1.0.0) by libtool
but maybe that is anyway on the roadmap...

I'm not aware of any plans in that direction. Replacing perl's
mostly-working build system would be a lot of work, and no one has felt
a compelling need.

If you're curious about why perl didn't use autoconf from the beginning,
see the section

  =head2 Autoconf

in Porting/pumpkin.pod.

--
  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Aug 10, 2005

From @Tux

On Tue, 26 Jul 2005 12​:03​:37 -0400 (EDT), Andy Dougherty
<doughera@​lafayette.edu> wrote​:

On Tue, 26 Jul 2005, Niki Waibel wrote​:

On 25-Jul-2005 Andy Dougherty via RT wrote​:

On Thu, 10 Jun 2005, Niki W. Waibel wrote​:

# New Ticket Created by "Niki W. Waibel"
# Please include the string​: [perl #36235]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=36235 >

perl on solaris using gcc-3.X and gnu binutils correctly adds -Wl,-E to
to LDFLAGS. it seems that the detection of the gnu binutils is somehow
broken if gcc-4.X is used.

The detection is done in hints/solaris_2.sh. It's quite possible that
the output of gcc has changed such that the hints file doesn't pick it
up correctly anymore.

Thanks for the verbose output. It looks like the problem is that the old
output of gcc-[23] 'Reading specs from ... ' has been replaced in gcc-4
(at least in this configuration) by 'Using built-in specs'.

The following simple patch to hints/solaris_2.sh might be enough to get
things to work. Could you try it out? (apply with patch -p1). You'll
have to remove your old config.sh before re-running Configure.

rm config\.sh
sh Configure \[whatever options you want\]

--- perl-current/hints/solaris_2.sh Sun May 22 10​:38​:40 2005
+++ perl-andy/hints/solaris_2.sh Tue Jul 26 11​:29​:22 2005
@​@​ -211,7 +211,10 @​@​
# Indent to avoid propagation to config.sh
verbose=`${cc​:-cc} -v -o try try.c 2>&1`

-if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
+# XXX TODO​: 'specs' output changed from 'Reading specs from' in gcc-[23]
to 'Using +# built-in specs' in gcc-4. Perhaps we should just use the same
gcc test as +# in Configure to see if we're using gcc.
+if echo "$verbose" | egrep '(Reading specs from)|(Using built-in specs)'

/dev/null 2>&1; then #
# Using gcc.
#

Is this patch still to be applied?

--
H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/)
using Perl 5.6.2, 5.8.0, 5.8.5, & 5.9.2 on HP-UX 10.20, 11.00 & 11.11,
AIX 4.3 & 5.2, SuSE 9.2 & 9.3, and Cygwin. http​://www.cmve.net/~merijn
Smoking perl​: http​://www.test-smoke.org, perl QA​: http​://qa.perl.org
reports to​: smokers-reports@​perl.org, perl-qa@​perl.org

@p5pRT
Copy link
Author

p5pRT commented Aug 10, 2005

From @doughera88

On Wed, 10 Aug 2005, H.Merijn Brand wrote​:

--- perl-current/hints/solaris_2.sh Sun May 22 10​:38​:40 2005
+++ perl-andy/hints/solaris_2.sh Tue Jul 26 11​:29​:22 2005
@​@​ -211,7 +211,10 @​@​
# Indent to avoid propagation to config.sh
verbose=`${cc​:-cc} -v -o try try.c 2>&1`

-if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
+# XXX TODO​: 'specs' output changed from 'Reading specs from' in gcc-[23]
to 'Using +# built-in specs' in gcc-4. Perhaps we should just use the same
gcc test as +# in Configure to see if we're using gcc.
+if echo "$verbose" | egrep '(Reading specs from)|(Using built-in specs)'

/dev/null 2>&1; then #
# Using gcc.
#

Is this patch still to be applied?

Yes, please. We've now verified it works.

--
  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Aug 10, 2005

From @Tux

On Wed, 10 Aug 2005 15​:32​:25 -0400 (EDT), Andy Dougherty
<doughera@​lafayette.edu> wrote​:

On Wed, 10 Aug 2005, H.Merijn Brand wrote​:

--- perl-current/hints/solaris_2.sh Sun May 22 10​:38​:40 2005
+++ perl-andy/hints/solaris_2.sh Tue Jul 26 11​:29​:22 2005
@​@​ -211,7 +211,10 @​@​
# Indent to avoid propagation to config.sh
verbose=`${cc​:-cc} -v -o try try.c 2>&1`

-if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
+# XXX TODO​: 'specs' output changed from 'Reading specs from' in
gcc-[23] to 'Using +# built-in specs' in gcc-4. Perhaps we should just
use the same gcc test as +# in Configure to see if we're using gcc.
+if echo "$verbose" | egrep '(Reading specs from)|(Using built-in
specs)'

/dev/null 2>&1; then #
# Using gcc.
#

Is this patch still to be applied?

Yes, please. We've now verified it works.

Thanks, applied in change #25282

--
H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/)
using Perl 5.6.2, 5.8.0, 5.8.5, & 5.9.2 on HP-UX 10.20, 11.00 & 11.11,
AIX 4.3 & 5.2, SuSE 9.2 & 9.3, and Cygwin. http​://www.cmve.net/~merijn
Smoking perl​: http​://www.test-smoke.org, perl QA​: http​://qa.perl.org
reports to​: smokers-reports@​perl.org, perl-qa@​perl.org

@p5pRT
Copy link
Author

p5pRT commented Aug 17, 2005

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant