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

5.8.6 build fails on Solaris8 with Studio 10 Compiler #7950

Closed
p5pRT opened this issue Jun 3, 2005 · 9 comments
Closed

5.8.6 build fails on Solaris8 with Studio 10 Compiler #7950

p5pRT opened this issue Jun 3, 2005 · 9 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 3, 2005

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

Searchable as RT36113$

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2005

From mkh@suncity.es.dupont.com


Configure​:

sh Configure \
-de \
-Dprefix=/opt/perl58 \
-Dcc=cc \
-Doptimize='-fast -xO3 -xtarget=ultra3'

Uneventful make until​:

rm -f libperl.a
/usr/ccs/bin/ar rcu libperl.a perl.o gv.o toke.o perly.o op.o pad.o
regcomp.o dump.o util.o mg.o reentr.o hv.o av.o run.o pp_hot.o sv.o pp.o
scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o
universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o locale.o
pp_pack.o pp_sort.o
`sh cflags "optimize='-fast -xO3 -xtarget=ultra3'" opmini.o`
-DPERL_EXTERNAL_GLOB opmini.c
  CCCMD = cc -DPERL_CORE -c -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fast -xO3 -xtarget=ultra3
cc -L/usr/lib -L/usr/ccs/lib -L/opt/Studio10/SUNWspro/prod/lib/v8plus
-L/opt/Studio10/SUNWspro/prod/lib -L/lib -L/usr/local/lib -o miniperl \
  miniperlmain.o opmini.o libperl.a -lsocket -lnsl -ldl -lm -lutil -lc
./miniperl -w -Ilib -MExporter -e '<?>' || gmake minitest
gmake​: [extra.pods] Error 1 (ignored)
./miniperl -Ilib configpm configpm.tmp
sh mv-if-diff configpm.tmp lib/Config.pm
./miniperl -Ilib lib/lib_pm.PL
gmake​: *** [lib/lib.pm] Illegal Instruction (core dumped)

If -Doptimize is changed to '-xO2 -xtarget=ultra3' make and make test
works.

The failure occurs at the second line of lib/lib_pm.PL​:

use File​::Basename qw(&basename &dirname);

Compilation is with the latest Sun Studio 10 compiler (with current
patches).

Sun support claims this is not a compiler problem.



Flags​:
  category=install
  severity=medium


% ./miniperl -Ilib -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration​:
  Platform​:
  osname=solaris, osvers=2.8, archname=sun4-solaris
  uname='sunos suncity 5.8 generic_108528-29 sun4u sparc
sunw,sun-blade-1000 '
  config_args='-de -Dprefix=/opt/perl58 -Dcc=cc -Doptimize=-fast -xO3
-xtarget=ultra3'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=undef uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
  optimize='-fast -xO3 -xtarget=ultra3',
  cppflags='-I/usr/local/include'
  ccversion='Sun C 5.7 Patch 117836-02 2005/03/23', gccversion='',
gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -L/usr/lib -L/usr/ccs/lib
-L/opt/Studio10/SUNWspro/prod/lib/v8plus -L/opt/Studio10/SUNWspro/prod/lib
-L/lib -L/usr/local/lib '
  libpth=/usr/lib /usr/ccs/lib /opt/Studio10/SUNWspro/prod/lib/v8plus
/opt/Studio10/SUNWspro/prod/lib /lib /usr/local/lib
  libs=-lsocket -lnsl -ldl -lm -lutil -lc
  perllibs=-lsocket -lnsl -ldl -lm -lutil -lc
  libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
  cccdlflags='-KPIC', lddlflags='-G -L/usr/lib -L/usr/ccs/lib
-L/opt/Studio10/SUNWspro/prod/lib/v8plus -L/opt/Studio10/SUNWspro/prod/lib
-L/lib -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
  Compile-time options​: USE_LARGE_FILES
  Built under solaris
  Compiled at Jun 3 2005 07​:41​:33
  @​INC​:
  lib
  /opt/perl58/lib/5.8.6/sun4-solaris
  /opt/perl58/lib/5.8.6
  /opt/perl58/lib/site_perl/5.8.6/sun4-solaris
  /opt/perl58/lib/site_perl/5.8.6
  /opt/perl58/lib/site_perl
  .

+---------------------------------------------------+
| Mike Hanafey |
| DuPont Crop Genetics |
| Experimental Station E353/132 |
| ----------------------+------------------------- |
| FedEx, UPS, etc. | US Mail |
| ---------------- | ------- |
| RT 141 & Henry Clay | POB 80353 |
| Wilmington, DE 19803 | Wilmington DE 19880-0353 |
| ----------------------+------------------------- |
| Phone​: (302)695-2614 Fax​: (302)695-2728 |
| Email​: hanafey@​dna.es.dupont.com |
+---------------------------------------------------+

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2005

From domo@computer.org

On 3 Jun 2005, at 14​:27, Mike Hanafey (via RT) wrote​:

sh Configure \
-de \
-Dprefix=/opt/perl58 \
-Dcc=cc \
-Doptimize='-fast -xO3 -xtarget=ultra3'

Uneventful make until​:

...
./miniperl -w -Ilib -MExporter -e '<?>' || gmake minitest
gmake​: [extra.pods] Error 1 (ignored)
./miniperl -Ilib configpm configpm.tmp
sh mv-if-diff configpm.tmp lib/Config.pm
./miniperl -Ilib lib/lib_pm.PL
gmake​: *** [lib/lib.pm] Illegal Instruction (core dumped)

If -Doptimize is changed to '-xO2 -xtarget=ultra3' make and make test
works.

The failure occurs at the second line of lib/lib_pm.PL​:

use File​::Basename qw(&basename &dirname);

Compilation is with the latest Sun Studio 10 compiler (with current
patches).

If you can track down a core file, and can point a debugger at it to
get a stack trace, please post the result​: it would be useful to know
where the code is blowing up. Ask here for more help if necessary.

Sun support claims this is not a compiler problem.

Is their argument convincing? It certainly smells like an optimiser
bug. If it is, there is a way of telling Configure to arrange that
the source file in question is compiled with less optimisation than
the rest. See hints/README.hints.
--
Dominic Dunlop

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2005

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

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2005

From @doughera88

On Fri, 3 Jun 2005, Mike Hanafey wrote​:

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

sh Configure \
-de \
-Dprefix=/opt/perl58 \
-Dcc=cc \
-Doptimize='-fast -xO3 -xtarget=ultra3'

Uneventful make until​:

./miniperl -w -Ilib -MExporter -e '<?>' || gmake minitest
gmake​: [extra.pods] Error 1 (ignored)
./miniperl -Ilib configpm configpm.tmp
sh mv-if-diff configpm.tmp lib/Config.pm
./miniperl -Ilib lib/lib_pm.PL
gmake​: *** [lib/lib.pm] Illegal Instruction (core dumped)

Thank you for your report. Older versions of the compiler don't show
this, so it may prove very difficult to track down.

Here are a few suggestions. I have a vague hope they may be helpful.

1. perl-5.8.7 was just released. Unless you have reason to use 5.8.6,
you should probably work with 5.8.7.

2. Can you try running 'make minitest' ? That tries to test 'miniperl'
and is sometimes helpful in tracking down the problem.

If -Doptimize is changed to '-xO2 -xtarget=ultra3' make and make test
works.

3. (more tedious). -fast is a "macro" that actually turns on a number of
optimizations. Could you try it with -fast -xO2 -xtarget=ultra3 ?
That would tell us whether it's the -xO2 vs. -xO3 optimization level that
matters or whether it's one of the optimizations enabled by -fast.

Compilation is with the latest Sun Studio 10 compiler (with current
patches).

Sun support claims this is not a compiler problem.

Linker and Libraries​:
ld='cc', ldflags =' -L/usr/lib -L/usr/ccs/lib
-L/opt/Studio10/SUNWspro/prod/lib/v8plus -L/opt/Studio10/SUNWspro/prod/lib
-L/lib -L/usr/local/lib '
libpth=/usr/lib /usr/ccs/lib /opt/Studio10/SUNWspro/prod/lib/v8plus
/opt/Studio10/SUNWspro/prod/lib /lib /usr/local/lib

4. One odd thing here -- if you're using -xtarget=ultra3, should we
really be loading in the v8plut libraries first? I think the compiler
can actually get all that right without our help. Try this​:

  1. make realclean
  2. edit your config.sh and delete all the v8plus entries.
  (Actually, you can probably delete all the
  -L/opt/Studio10/SUNWspro entries.)
  3. sh Configure -S
  4. make depend
  5. make
 
--
  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Nov 8, 2006

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

@p5pRT
Copy link
Author

p5pRT commented May 28, 2012

From @Hugmeir

On Fri Jun 03 05​:27​:49 2005, mkh@​suncity.es.dupont.com wrote​:

-----------------------------------------------------------------
Configure​:

sh Configure \
-de \
-Dprefix=/opt/perl58 \
-Dcc=cc \
-Doptimize='-fast -xO3 -xtarget=ultra3'

I was able to compile Perl 5.16.0 and 5.14.2 using the latest suncc,
with -fast and -xO3, on Solaris 10/SPARC. I don't have a ultra3
platform to test on, but seeing how this appeared to be a compiler bug,
I think that we should close this.

--hugmeir

@p5pRT
Copy link
Author

p5pRT commented May 28, 2012

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

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2016

From @dcollinsn

Per Bryan, unless there is any objection.

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2016

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

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

No branches or pull requests

1 participant