develooper Front page | perl.perl5.porters | Postings from December 2009

[perl #71784] Embedding regression building golly: Perl_newSV_type

Thread Next
From:
Hugo van der Sanden
Date:
December 31, 2009 07:35
Subject:
[perl #71784] Embedding regression building golly: Perl_newSV_type
Message ID:
rt-3.6.HEAD-1505-1262259059-1758.71784-75-0@perl.org
# New Ticket Created by  Hugo van der Sanden 
# Please include the string:  [perl #71784]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=71784 >


This is a bug report for perl from hv@crypt.org,
generated with the help of perlbug 1.39 running under perl 5.10.1.

-----------------------------------------------------------------
[Please describe your issue here]

The cellular automaton simulator 'golly' (http://golly.sourceforge.net/)
has embedded perl (and python) support from C++. Note that it requires
a perl built with threading support.

Building golly-src-2.1 with perl-5.8.8 gives me the warning:
  cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
.. but otherwise works fine.

Building with perl-5.10.0 works fine, with no warnings.

Building with perl-5.10.1 or with perl-5.11.2 fails with this error at link
time:
g++ `wx-config --cxxflags` -O5 -DZLIB -DVERSION=2.1 -Wall -Wno-non-virtual-dtor -fno-strict-aliasing -o golly ObjGTK/bigint.o ObjGTK/lifealgo.o ObjGTK/hlifealgo.o ObjGTK/hlifedraw.o ObjGTK/qlifealgo.o ObjGTK/qlifedraw.o ObjGTK/jvnalgo.o ObjGTK/ruletreealgo.o ObjGTK/ruletable_algo.o ObjGTK/ghashbase.o ObjGTK/ghashdraw.o ObjGTK/readpattern.o ObjGTK/writepattern.o ObjGTK/liferules.o ObjGTK/util.o ObjGTK/liferender.o ObjGTK/viewport.o ObjGTK/lifepoll.o ObjGTK/generationsalgo.o ObjGTK/wxutils.o ObjGTK/wxprefs.o ObjGTK/wxalgos.o ObjGTK/wxrule.o ObjGTK/wxinfo.o ObjGTK/wxhelp.o ObjGTK/wxstatus.o ObjGTK/wxview.o ObjGTK/wxrender.o ObjGTK/wxscript.o ObjGTK/wxperl.o ObjGTK/wxpython.o ObjGTK/wxfile.o ObjGTK/wxedit.o ObjGTK/wxcontrol.o ObjGTK/wxundo.o ObjGTK/wxselect.o ObjGTK/wxlayer.o ObjGTK/wxmain.o ObjGTK/wxgolly.o `wx-config --libs` -lz  `perl -MExtUtils::Embed -e '$]<5.010 && ldopts'`
ObjGTK/wxperl.o: In function `pl_getcolors':
wxperl.cpp:(.text+0x6784): undefined reference to `Perl_newSV_type'
ObjGTK/wxperl.o: In function `pl_load':
wxperl.cpp:(.text+0xc712): undefined reference to `Perl_newSV_type'
ObjGTK/wxperl.o: In function `pl_evolve':
wxperl.cpp:(.text+0x12189): undefined reference to `Perl_newSV_type'
ObjGTK/wxperl.o: In function `pl_transform':
wxperl.cpp:(.text+0x12680): undefined reference to `Perl_newSV_type'
ObjGTK/wxperl.o: In function `pl_parse':
wxperl.cpp:(.text+0x134d4): undefined reference to `Perl_newSV_type'
ObjGTK/wxperl.o:wxperl.cpp:(.text+0x19efd): more undefined references to `Perl_newSV_type' follow
collect2: ld returned 1 exit status
make: *** [golly] Error 1

The missing symbol is mentioned as a newly added function in the 5.10.1
and 5.11.0 deltalogs, is this simply a failure to export the new symbol
correctly?

The linkage to perl in the application is handled entirely in the file
wxperl.cpp, I'm not sure if it's doing anything in unusually strange
ways. As far as I can see Perl_newSV_type is pulled in solely for
newAV() calls in this case.

I don't know much about embedding, so I hope this is obvious to someone.
I haven't yet contacted the golly maintainers, since to me this looks like
the problem is at perl's end.

Hugo

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

Configured by hv at Wed Dec 30 16:34:02 GMT 2009.

Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
   
  Platform:
    osname=linux, osvers=2.6.22.14-72.fc6, archname=i686-linux-thread-multi
    uname='linux zen.crypt.org 2.6.22.14-72.fc6 #1 smp wed nov 21 13:44:07 est 2007 i686 i686 i386 gnulinux '
    config_args='-des -Dprefix=/opt/perl-5.10.1-t -Doptimize=-g -O6 -Dusethread -Duseithreads -Dusedevel -Uversiononly'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-g -O6',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.1.2 20070626 (Red Hat 4.1.2-13)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -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.5.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -g -O6 -L/usr/local/lib -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.10.1:
    /opt/perl-5.10.1-t/lib/5.10.1/i686-linux-thread-multi
    /opt/perl-5.10.1-t/lib/5.10.1
    /opt/perl-5.10.1-t/lib/site_perl/5.10.1/i686-linux-thread-multi
    /opt/perl-5.10.1-t/lib/site_perl/5.10.1
    .

---
Environment for perl 5.10.1:
    HOME=/home/hv
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/hv/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Next


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