Mantis - pm_test_tester
Viewing Issue Advanced Details
4771 packaging minor have not tried 2011-05-20 19:03 2013-06-17 14:18
ellson  
bonivart  
normal  
feedback  
reopened  
none    
none  
0004771: problem with /opt/csw/lib/perl/5.10.1/CORE/proto.h and /opt/SUNWspro/bin/cc
When attempting to build graphviz-2.28 on current9s (sparc-sun-solaris2.9) I get compile errors that beginning with ...


    CXX libgv_perl_la-gv_perl.lo
    CC: Warning: Option -xnorunpath passed to ld, if ld is invoked,
ignored otherwise
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 38: Warning: attribute
nonnull is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 43: Warning: attribute
nonnull is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 48: Warning: attribute
nonnull is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 53: Warning: attribute
nonnull is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 58: Warning: attribute
nonnull is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 67: Warning: attribute
nonnull is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 90: Warning: attribute
__malloc__ is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 94: Warning: attribute
__malloc__ is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 98: Warning: attribute
__malloc__ is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 118: Warning:
attribute nonnull is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 129: Warning:
attribute nonnull is unsupported and will be skipped..
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 130: Error: "{"
expected instead of "(".
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 130: Error: The
function "nonnull" must have a prototype.
    "/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 134: Error: Linkage
specifications are allowed only at file level.
    ...



Is 5.10.1 expect to be compatible with Sun's compilers?
Issue History
2011-05-20 19:03 ellson New Issue
2011-05-20 19:09 ellson Note Added: 0009062
2011-05-21 00:24 ellson Note Added: 0009063
2011-05-21 14:34 dam Note Added: 0009064
2011-05-25 23:16 ellson Note Added: 0009079
2011-05-26 10:46 bonivart Status new => assigned
2011-05-26 10:46 bonivart Assigned To => bonivart
2011-05-26 10:46 bonivart Status assigned => closed
2011-05-26 10:46 bonivart Resolution open => fixed
2011-05-29 21:14 ellson Note Added: 0009089
2011-05-29 21:14 ellson Status closed => feedback
2011-05-29 21:14 ellson Resolution fixed => reopened
2013-06-17 14:18 dam Project pm_tt2 => perl

Notes
(0009062)
ellson   
2011-05-20 19:09   
In fact the problem is occurring with the C++ compiler, not C

./configure is finding:
CXX='/opt/SUNWspro/bin/CC'
(0009063)
ellson   
2011-05-21 00:24   
It was suggested on the opencsw-maintainers list that -xnorunpath was invalid.

This flag comes from:

   $/opt/csw/bin/perl -MExtUtils::Embed -e ccopts
   -D_REENTRANT -xO3 -m32 -xarch=v8 -xnorunpath -I/opt/csw/bdb48/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.10.1/CORE


I couldn't find any more-specific option to ExtUtils::Embed to get CXXFLAGS. Did I miss something?
(0009064)
dam   
2011-05-21 14:34   
The problem is that the Perl headers are not compatible with C++ and needs more investigation.
(0009079)
ellson   
2011-05-25 23:16   
It looks like swig-1.3.40 was generating bad wrapper code for recent versions of perl.

With swig-2.0.3 I was able to compile the graphviz-perl extension (from graphviz-2.28) successfully.

Changing status to "resolved".
(0009089)
ellson   
2011-05-29 21:14   
Sorry to reopen this issue, but:

   $ perl -MExtUtils::Embed -e ccopts
   -D_REENTRANT -xO3 -m32 -xarch=v8 -xnorunpath -I/opt/csw/bdb48/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.10.1/CORE

All three "-x" switches are incompatible with g++-4.4.

And, "__attribute__nonnull__" used in proto.h is incompatible with Sun's CC.

I thought for a while that swig-2.0.3 fixed the problem, but no. I was just confused.

I only managed to get graphviz-2.28 to build by using g++ and by stripping out the -x switches with:

  PERL_CC = `$(PERL) -MExtUtils::Embed -e ccopts | $(PERL) -pe 's/-x.*? //g'`