|
Posted by Guy Paulus on February 21, 2008, 9:13 am
Please log in for more thread options
Hello:
I have built perl 5.10.0 on a SPARC Solaris 10 platform with the
Sun Studio 12 C compiler. I would like now to build the module
Encode::Detect which comes with C++ source files in the src/ sub-
directory. The usual
perl Makefile.PL
make
does not work, as the compiler called in is the C one (/opt/SUNWspro/
bin/cc).
When I enforce the usage of the Studio 12 C++ compiler doing
perl Makefile.PL CC=/opt/SUNWspro/bin/CC LD=/opt/SUNWspro/bin/CC
make
I get a flurry of errors from <proto.h> in the perl 5.10.0/lib/sun4-
solaris/CORE directory when compiling lib/Encode/Detect/Detector.c :
>>>>>>>>>>>> error mesages with Sun Studio 12 C++ <<<<<<<<<<<<<<<<
/opt/SUNWspro/bin/CC -Isrc -I/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE
-DXS_VERSION="1.00" -DVERSION="1.00" -KPIC -Iinclude -c -xtarget=native
-I/usr/sfw/include -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -xO3 -o lib/Encode/Detect/Detector.o
lib/Encode/Detect/Detector.c
CC: Warning: -xarch=native has been explicitly specified, or implicitly
specified by a macro option, -xarch=native on this architecture implies
-xarch=sparcvis2 which generates code that does not run on pre UltraSPARC
III processors
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 36: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 39: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 42: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 45: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 48: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 74: Warning:
attribute __malloc__ is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 78: Warning:
attribute __malloc__ is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 82: Warning:
attribute __malloc__ is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 97: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 106: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 107: Error:
"{" expected instead of "(".
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 107: Error:
The function "nonnull" must have a prototype.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 109: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 110: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 112: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 115: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 116: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 117: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 118: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 119: Error:
"," expected instead of "(".
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 121: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 122: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 123: Error:
"," expected instead of "(".
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 124: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 124: Error:
There must be an identifier to declare.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 126: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 127: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 129: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 130: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 132: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 134: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 136: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 137: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 139: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 141: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 143: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 145: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 147: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 148: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 150: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 152: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 154: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 156: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 158: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 159: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 161: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 162: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 163: Error:
"," expected instead of "(".
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 165: Error:
Linkage specifications are allowed only at file level.
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 166: Warning:
attribute nonnull is unsupported and will be skipped..
"/usr/local/perl5/5.10.0/lib/sun4-solaris/CORE/proto.h", line 167: Error:
"," expected instead of "(".
Compilation aborted, too many Error messages.
error building lib/Encode/Detect/Detector.o from
'lib/Encode/Detect/Detector.c' at
/usr/local/perl5/5.10.0/lib/ExtUtils/CBuilder/Base.pm line 109.
*** Error code 2
make: Fatal error: Command failed for target `all'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
On the other hand, when I resort to using "gcc -x c++" as compiler,
all source files are compiled, but then "make test" fails:
>>>>>>>>>>>>>>> error messages with gcc -x c++ <<<<<<<<<<<<<<<<<<<<<<<<<
/usr/local/perl5/bin/perl Build --makefile_env_macros 1 test
t/base........
# Failed test 'use Encode::Detect::Detector;'
# at t/base.t line 5.
# Tried to use 'Encode::Detect::Detector'.
# Error: Can't load
'/root/Encode-Detect-1.00/blib/arch/auto/Encode/Detect/Detector/Detector.so'
for module Encode::Detect::Detector: ld.so.1: perl: fatal: relocation
error: file
/root/Encode-Detect-1.00/blib/arch/auto/Encode/Detect/Detector/Detector.so:
symbol __gxx_personality_v0: referenced symbol not found at
/usr/local/perl5/5.10.0/lib/sun4-solaris/DynaLoader.pm line 203.
# at (eval 3) line 2
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at t/base.t line 5.
t/base........NOK 1/0Can't locate auto/Encode/Detect/Detector/new.al in
@INC (@INC contains: /root/Encode-Detect-1.00/blib/lib
/root/Encode-Detect-1.00/blib/arch /usr/local/perl5/5.10.0/lib/sun4-solaris
/usr/local/perl5/5.10.0/lib/sun4-solaris /usr/local/perl5/5.10.0/lib
/usr/local/perl5/site_perl/5.10.0/sun4-solaris
/usr/local/perl5/site_perl/5.10.0/sun4-solaris
/usr/local/perl5/site_perl/5.10.0
/usr/local/perl5/vendor_perl/5.10.0/sun4-solaris
/usr/local/perl5/vendor_perl/5.10.0 /usr/local/perl5/vendor_perl
/usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4
/usr/perl5/vendor_perl/5.8.4 . /usr/local/perl5/5.10.0/lib/sun4-solaris
/usr/local/perl5/5.10.0/lib /usr/local/perl5/site_perl/5.10.0/sun4-solaris
/usr/local/perl5/site_perl/5.10.0
/usr/local/perl5/vendor_perl/5.10.0/sun4-solaris
/usr/local/perl5/vendor_perl/5.10.0 /usr/local/perl5/vendor_perl
/usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4
/usr/perl5/vendor_perl/5.8.4 .) at t/base.t line 9
# Looks like you failed 1 test of 1.
# Looks like your test died just after 1.
t/base........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
t/encoding....Can't locate Data/Dump.pm in @INC (@INC contains:
/root/Encode-Detect-1.00/blib/lib /root/Encode-Detect-1.00/blib/arch
/usr/local/perl5/5.10.0/lib/sun4-solaris
/usr/local/perl5/5.10.0/lib/sun4-solaris /usr/local/perl5/5.10.0/lib
/usr/local/perl5/site_perl/5.10.0/sun4-solaris
/usr/local/perl5/site_perl/5.10.0/sun4-solaris
/usr/local/perl5/site_perl/5.10.0
/usr/local/perl5/vendor_perl/5.10.0/sun4-solaris
/usr/local/perl5/vendor_perl/5.10.0 /usr/local/perl5/vendor_perl
/usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4
/usr/perl5/vendor_perl/5.8.4 . /usr/local/perl5/5.10.0/lib/sun4-solaris
/usr/local/perl5/5.10.0/lib /usr/local/perl5/site_perl/5.10.0/sun4-solaris
/usr/local/perl5/site_perl/5.10.0
/usr/local/perl5/vendor_perl/5.10.0/sun4-solaris
/usr/local/perl5/vendor_perl/5.10.0 /usr/local/perl5/vendor_perl
/usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4
/usr/perl5/vendor_perl/5.8.4 .) at t/encoding.t line 4.
BEGIN failed--compilation aborted at t/encoding.t line 4.
# Looks like your test died before it could output anything.
t/encoding....dubious
Test returned status 255 (wstat 65280, 0xff00)
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/base.t 255 65280 1 1 1
t/encoding.t 255 65280 ?? ?? ??
Failed 2/2 test scripts. 1/1 subtests failed.
Files=2, Tests=1, 1 wallclock secs ( 0.20 cusr + 0.06 csys = 0.26 CPU)
Failed 2/2 test programs. 1/1 subtests failed.
*** Error code 255
make: Fatal error: Command failed for target `test'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
I would really appreciate someone's input on how to build that module
in my current environment.
--
,
/)
// Guy Paulus (Sys Admin)
(/ BATir Dept., CP-194/2
_/ ______ Universite Libre de Bruxelles
) ( (-----( 50 av. F. D. Roosevelt
/INK\ \ \ B-1050 Brussels
\___/ \ \ Phone: +32(2)650 3652
jgs _)_____) Fax: +32(2)650 2789
`------`
|
|
Posted by sisyphus on February 23, 2008, 7:10 am
Please log in for more thread options
=2E
=2E
>
> On the other hand, when I resort to using "gcc -x c++" as compiler,
> all source files are compiled, but then "make test" fails:
I think that's the correct approach - explicitly calling the C++
compiler almost works for me, too, on Win32.
Everyone who tries to build this module manages to come up with
different errors.
For me the make process is killed by an undefined reference to
'_boot_Encode__Detect' - which means that the Encode::Detect loadable
object doesn't get built and the tests fail. Of course, since the
loadable object didn't build, the tests should not even run - at least
that's the way it would be with ExtUtils::MakeMaker. Maybe
Module::Build enforces different rules.
>
> /usr/local/perl5/bin/perl Build --makefile_env_macros 1 test
> t/base........
> # =A0 Failed test 'use Encode::Detect::Detector;'
> # =A0 at t/base.t line 5.
> # =A0 =A0 Tried to use 'Encode::Detect::Detector'.
> # =A0 =A0 Error: =A0Can't load
> '/root/Encode-Detect-1.00/blib/arch/auto/Encode/Detect/Detector/Detector.s=
o=AD'
> for module Encode::Detect::Detector: ld.so.1: perl: fatal: relocation
> error: file
> /root/Encode-Detect-1.00/blib/arch/auto/Encode/Detect/Detector/Detector.so=
:
> symbol __gxx_personality_v0: referenced symbol not found at
> /usr/local/perl5/5.10.0/lib/sun4-solaris/DynaLoader.pm line 203.
> # =A0at (eval 3) line 2
> # Compilation failed in require at (eval 3) line 2.
> # BEGIN failed--compilation aborted at t/base.t line 5.
> t/base........NOK 1/0Can't locate auto/Encode/Detect/Detector/new.al
Can't really help with this error.
> t/encoding....Can't locate Data/Dump.pm in @INC
First thing to do here is install Data::Dump. Until you do that,
you'll aways get that error. But don't be surprised if, after having
installed Data::Dump, you still get failures with the encoding.t
tests.
As I remarked at
http://groups.google.com.au/group/perl.beginners/browse_thread/thread/4dcd83=
a69c52acde/3a61152b5e8b7712?hl=3Den#3a61152b5e8b7712
this module has the markings of an abandoned module.
But it can probably be hacked into a workable form if one knows how.
Maybe check the bug reports at http://rt.cpan.org/Public/Dist/Display.html?N=
ame=3DEncode-Detect
to see if there's anything there that helps.
Cheers,
Rob
|
| Similar Threads | Posted | | Building Perl module GD::Text on Solaris 10 | August 3, 2007, 3:37 pm |
| Looking for pre-built DBI/DBD:Oracle modules for Perl 5.8.4 on Solaris 10 platform | May 6, 2008, 5:02 pm |
| Problem building DBD::Oracle on 64 bit solaris | April 13, 2005, 2:51 pm |
| Module to detect keyboard presses | March 30, 2007, 8:09 am |
| How to tell CPAN-testers a module is just for a specific platform? | October 2, 2004, 10:04 am |
| encode the perl code | September 6, 2006, 1:12 am |
| Encode::Guess load ISO-8859-1 | March 27, 2006, 10:09 am |
| GD module on Solaris 9 | September 3, 2004, 11:10 am |
| How to detect an image type with GD | November 8, 2006, 12:10 pm |
| Weird Module Installation Problem on Solaris 10 | November 4, 2005, 8:36 am |
|