develooper Front page | perl.perl5.porters | Postings from May 2004

ExtUtils::Embed with C++

From:
SilvioCVdeAlmeida
Date:
May 29, 2004 15:26
Subject:
ExtUtils::Embed with C++
Message ID:
40B90B76.B197F029@graaph.arq.br
This is a bug report for perl from scvalmei@graaph.arq.br,
generated with the help of perlbug 1.34 running under perl
v5.8.3.


-----------------------------------------------------------------

I'm starting a project where a C++ library would have to
instantiate a persistent Perl interpreter.

I found an error that's easily reproductible by trying the
example "Persistent Interpreter" from "perldoc
perlembed", but compiling it with g++ instead of gcc. The error
is as follows:

In file included from /usr/include/math.h:109,
                 from
/usr/local/lib/perl5/5.8.3/i686-linux-thread-multi-64int-ld/CORE/perl.h:2839,
                 from persistent.c:3:
/usr/local/lib/perl5/5.8.3/i686-linux-thread-multi-64int-ld/CORE/perl.h:1330:
previous
   declaration of `long double modfl(long double, long double*)'
with C++ 
   linkage
/usr/include/bits/mathcalls.h:116: conflicts with new
declaration with C 
   linkage
/usr/include/bits/mathcalls.h:116: declaration of `long double
modfl(long 
   double, long double*) throw ()' throws different exceptions
/usr/local/lib/perl5/5.8.3/i686-linux-thread-multi-64int-ld/CORE/perl.h:1330:
than
   previous declaration `long double modfl(long double, long
double*)'

It seems like an absent "extern C" on perl.h, or something like
that, but I'm sure that's some more obvious
thing I'm missing.

I sent this to module-authors@perl.org and Nicholas Clark
advised me to send it you as a bug.

I thank you for any help, and for Perl itself!


Silvio


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl v5.8.3:

Configured by perlroot at Tue Apr 13 03:47:01 BRT 2004.

Summary of my perl5 (revision 5.0 version 8 subversion 3)
configuration:
  Platform:
    osname=linux, osvers=2.4.20-8,
archname=i686-linux-thread-multi-64int-ld
    uname='linux libelula.graaph.arq.br 2.4.20-8 #1 thu mar 13
17:18:24 est 2003 i686 athlon i386 gnulinux '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define
usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=define
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='/usr/local/GCC/bin/gcc', ccflags ='-D_REENTRANT
-D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O3',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -I/usr/local/include
-I/usr/include/gdbm'
    ccversion='', gccversion='3.3.3', 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='long double',
nvsize=12, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='/usr/local/GCC/bin/gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=false,
libperl=libperl.a
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.8.3:
    /usr/local/lib/perl5/5.8.3/i686-linux-thread-multi-64int-ld
    /usr/local/lib/perl5/5.8.3
   
/usr/local/lib/perl5/site_perl/5.8.3/i686-linux-thread-multi-64int-ld
    /usr/local/lib/perl5/site_perl/5.8.3
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.8.3:
    HOME=/home/perlroot
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_ALL=pt_BR
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About