Subject: | Encode::Detect 1.01 assumes gcc |
Date: | Mon, 1 Apr 2013 14:33:17 -0700 |
To: | bug-Encode-Detect [...] rt.cpan.org |
From: | "P Fudd" <pfudd [...] binkmail.com> |
Hello!
I'm compiling Encode::Detect on Solaris10 with the Sun Studio 12 C
Compiler, and there are problems.
1. In Build.PL, there's this:
extra_compiler_flags => ['-x', 'c++', '-Iinclude'],
The '-x c++' argument is not understood by this compiler. This was fixed
by a wrapper around the system-provided cc in /opt/SUNWspro/prod/bin/cc
that detects '-x c++' and calls /opt/SUNWspro/prod/bin/CC instead.
2. The compile proceeds, but dies on lib/Encode/Detect/Detector.c because
it's a c++ program, but including perl.h proceeds to include proto.h,
which causes the compiler to choke in new and interesting ways:
"/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 90: Warning: attribute
__malloc__ 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 139: Error: Linkage
specifications are allowed only at file level.
"/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 220: Error: "," expected
instead of "(".
Compilation aborted, too many Error messages.
(There were 55 lines of errors, only a sample is shown here.)
Some people might switch to gcc for Encode::Detect, but then the resulting
compiled object files will not link with the rest of Perl which *was*
compiled with the Sun compiler.
Anyhoo, some people say this module has been abandoned. I hope not! :-)