This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trying to build (perl) Inline::CPP-0.25.


I ran into a similar problem recently - the standard sort of c++ references were not being found. It turns out that the linker I was calling was ld2, a script that called another script perlld (in /usr/bin), where I found this:

# these are pretty mandatory
my $CC = 'gcc';
my $EXPORT_ALL = 1;

I edited this script and replaced gcc with g++. I don't know if this was a good idea or not, but it seemed to fix the problem.

Sisyphus wrote:
Hi,
I'm running Windows Vista Business 64 on an AMD64 box. See below my sig for 'perl -V'.
I've built Inline::CPP on previous Cygwin installations (on Windows 2000) and on "native" Win32 builds of perl , but attempts to build this module under Cygwin are now failing under 'make test' with the following errors:


-------------------------------------
gcc -shared -o _01basic_t_5cd2.dll -Wl,--out-implib=lib_01basic_t_5cd2.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388608 -Wl,--enable-auto-image-base \
-s -L/usr/local/lib _01basic_t_5cd2.o /usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a
_01basic_t_5cd2.o:_01basic_t_5cd2.c:(.text+0x2a5): undefined reference to `operator new(unsigned int)'
_01basic_t_5cd2.o:_01basic_t_5cd2.c:(.text+0x1345): undefined reference to `operator delete(void*)'
_01basic_t_5cd2.o:_01basic_t_5cd2.c:(.text+0x19cc): undefined reference to `std::ios_base::Init::Init()'
_01basic_t_5cd2.o:_01basic_t_5cd2.c:(.text+0x19e8): undefined reference to `std::ios_base::Init::~Init()'
Creating library file: lib_01basic_t_5cd2.dll.a
collect2: ld returned 1 exit status
perlld: *** system() failed to execute
-------------------------------------


My immediate thought is that the problem arises because, as is evident from the above copy'n'paste, 'gcc' is being invoked instead of 'g++'.

Is there some %Config::Config{} key that contains an inappropriate value, or does the bug lie within the Inline::CPP-0.25 source ?

Cheers,
Rob

Rob@desktop2 ~/comp/Inline-CPP-0.25
$ perl -V:cc
cc='gcc';

Rob@desktop2 ~/comp/Inline-CPP-0.25
$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=cygwin, osvers=1.5.18(0.13242), archname=cygwin-thread-multi-64int
uname='cygwin_nt-5.1 inspiron 1.5.18(0.13242) 2005-07-02 20:30 i686 unknown
unknown cygwin '
config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Uusemymalloc -Dopt
imize=-O3 -Dman3ext=3pm -Dusesitecustomize'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=de
fine
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr
/local/include',
optimize='-O3',
cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/inc
lude'
ccversion='', gccversion='3.4.4 (cygming special) (gdc 0.12, using dmd 0.125
)', 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', lsee
ksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld2', ldflags =' -s -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -ldb -lcrypt -lgdbm_compat
perllibs=-lcrypt -lgdbm_compat
libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'



Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_64_BIT_INT USE_LARGE_FILES USE_SITECUSTOMIZE PERL_IMPLICIT_CONTEXT Locally applied patches: SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962 Built under cygwin Compiled at Dec 30 2005 02:44:25 %ENV: CYGWIN="" @INC: /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 .




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]