Subject: | 3.05 breaks XS modules on Cygwin/perl-5.10 |
Cross posted from https://rt.cpan.org/Public/Bug/Display.html?id=71897.
XS modules fail to compile on Cygwin with error (sample):
~~~~~~
lib/Archive/Extract/Libarchive.c:207:1: error: external linkage required
for symbol ‘XS_Archive__Extract__Libarchive__extract’ because of
‘dllexport’ attribute
lib/Archive/Extract/Libarchive.c:208:1: error: external linkage required
for symbol ‘XS_Archive__Extract__Libarchive__extract’ because of
‘dllexport’ attribute
~~~~~~
See attached file for more info on environment and build log.
Using 3.04 works fine.
Thanks,
-Mithun
Subject: | archive_extract_libarchive_035_error.txt |
Machine Info
============
::
$ uname -a
CYGWIN_NT-5.1 000000464620PC 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin
Perl Info
=========
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
::
Platform:
osname=cygwin, osvers=1.7.5(0.22553), archname=i686-cygwin-thread-multi-64int
uname='cygwin_nt-5.1 reini 1.7.5(0.22553) 2010-04-12 19:07 i686 cygwin '
config_args='-de -Dlibperl=cygperl5_10.dll -Dcc=gcc-4 -Dld=g++-4 -Dmksymlinks -Dusethreads -Dmad=y -Doptimize=-O3 -Accflags=-g3'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='gcc-4', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
optimize='-O3',
cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.3.4 20090804 (release) 1', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++-4', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib
libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
perllibs=-ldl -lcrypt
libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_10.dll
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY MYMALLOC PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MAD PERL_USE_SAFE_PUTENV
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API
Locally applied patches:
CYG11 no-bs
CYG12 no archlib in otherlibdirs
CYG14 Dynaloader
CYG15 static-Win32CORE
CYG17 utf8-paths
CYG21 LibList-Kid.patch
CYG22 cygwin-1.7 hints
CYG23 544-stat
CYG24 build man pages
CYG25 rebase_privlib
Module-Build-0.36_13
Bug#55162 CYG18 File::Spec::case_tolerant performance
disable ExtUtils::MakeMaker::Coverage in Sys-Syslog
Built under cygwin
Compiled at Aug 28 2010 20:17:29
%ENV:
PERL5LIB="/cygdrive/c/mithun/usr/lib:/cygdrive/c/mithun/work/scmscripts/ca/prod/src/lib"
PERL_CPANM_OPT="--notest --quiet --mirror http://cpan.metacpan.org --auto-cleanup 1"
CYGWIN=""
@INC:
/cygdrive/c/mithun/usr/lib
/cygdrive/c/mithun/work/scmscripts/ca/prod/src/lib
/usr/lib/perl5/5.10/i686-cygwin
/usr/lib/perl5/5.10
/usr/lib/perl5/site_perl/5.10/i686-cygwin
/usr/lib/perl5/site_perl/5.10
/usr/lib/perl5/vendor_perl/5.10/i686-cygwin
/usr/lib/perl5/vendor_perl/5.10
/usr/lib/perl5/vendor_perl/5.10
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/vendor_perl/5.8
.
libarchive version
==================
::
$ pkg-config.exe --modversion libarchive
2.8.5
cpanm Install log
=================
::
$ cpanm -v Archive::Extract::Libarchive
cpanm (App::cpanminus) 1.5003 on perl 5.010001 built for i686-cygwin-thread-multi-64int
Work directory is /home/mithun/.cpanm/work/1319470163.4552
You have make /usr/bin/make
You have LWP 6.03
You have /usr/bin/tar: tar (GNU tar) 1.25
Packaged by Cygwin (1.25-1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Archive::Extract::Libarchive on cpanmetadb ...
--> Working on Archive::Extract::Libarchive
Fetching http://cpan.metacpan.org/authors/id/L/LB/LBROCARD/Archive-Extract-Libarchive-0.35.tar.gz ... OK
Unpacking Archive-Extract-Libarchive-0.35.tar.gz
Archive-Extract-Libarchive-0.35
Archive-Extract-Libarchive-0.35/CHANGES
Archive-Extract-Libarchive-0.35/META.yml
Archive-Extract-Libarchive-0.35/META.json
Archive-Extract-Libarchive-0.35/Build.PL
Archive-Extract-Libarchive-0.35/SIGNATURE
Archive-Extract-Libarchive-0.35/LICENSE
Archive-Extract-Libarchive-0.35/MANIFEST
Archive-Extract-Libarchive-0.35/README
Archive-Extract-Libarchive-0.35/lib
Archive-Extract-Libarchive-0.35/lib/Archive
Archive-Extract-Libarchive-0.35/lib/Archive/Extract
Archive-Extract-Libarchive-0.35/lib/Archive/Extract/ppport.h
Archive-Extract-Libarchive-0.35/lib/Archive/Extract/Libarchive.pm
Archive-Extract-Libarchive-0.35/lib/Archive/Extract/Libarchive.xs
Archive-Extract-Libarchive-0.35/t
Archive-Extract-Libarchive-0.35/t/simple.t
Archive-Extract-Libarchive-0.35/t/archive.tar.bz2
Archive-Extract-Libarchive-0.35/t/pod.t
Archive-Extract-Libarchive-0.35/t/archive.zip
Archive-Extract-Libarchive-0.35/t/archive.tgz
Archive-Extract-Libarchive-0.35/inc
Archive-Extract-Libarchive-0.35/inc/Devel
Archive-Extract-Libarchive-0.35/inc/Devel/CheckLib.pm
Entering Archive-Extract-Libarchive-0.35
Checking configure dependencies from META.yml
Checking if you have Module::Build 0.38 ... Yes (0.3800)
Configuring Archive-Extract-Libarchive-0.35 ... Running Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Archive-Extract-Libarchive' version '0.35'
OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::CBuilder 0 ... Yes (0.280202)
Checking if you have Test::More 0 ... Yes (0.98)
Checking if you have Object::Tiny 0 ... Yes (1.08)
Building Archive-Extract-Libarchive-0.35 ... Building Archive-Extract-Libarchive
gcc-4 -I/usr/lib/perl5/5.10/i686-cygwin/CORE -DXS_VERSION="0.35" -DVERSION="0.35" -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O3 -o lib/Archive/Extract/Libarchive.o lib/Archive/Extract/Libarchive.c
lib/Archive/Extract/Libarchive.c:207:1: error: external linkage required for symbol 'XS_Archive__Extract__Libarchive__extract' because of 'dllexport' attribute
lib/Archive/Extract/Libarchive.c:208:1: error: external linkage required for symbol 'XS_Archive__Extract__Libarchive__extract' because of 'dllexport' attribute
error building lib/Archive/Extract/Libarchive.o from 'lib/Archive/Extract/Libarchive.c' at /usr/lib/perl5/5.10/ExtUtils/CBuilder/Base.pm line 175.
FAIL
! Installing Archive::Extract::Libarchive failed. See /home/mithun/.cpanm/build.log for details.