Skip Menu |

This queue is for tickets about the Finance-InteractiveBrokers-SWIG CPAN distribution.

Report information
The Basics
Id: 76932
Status: rejected
Worked: 4 hours (240 min)
Priority: 0/
Queue: Finance-InteractiveBrokers-SWIG

People
Owner: INFIDEL [...] cpan.org
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.06_01
Fixed in: (no value)

Attachments
Finance-InteractiveBrokers-SWIG-0.06_02.tar.gz



Subject: segfault on macosx
when loading Finance::InteractiveBrokers::SWIG, perl segfaults at #0 0x000000010060f587 in boot_Finance__InteractiveBrokers__SWIG (cv=0x10090d6c0) at IBAPI_wrap.cxx:18272 18272 dXSARGS; ------- swig -version SWIG Version 2.0.4 Compiled with /usr/bin/llvm-g++ [i386-apple-darwin11.2.0] Configured options: +pcre Please see http://www.swig.org for reporting bugs and further information ------- Summary of my perl5 (revision 5 version 14 subversion 2) configuration: Commit id: dc281e6088d189558b79a5121119b7196c8b3db0 Platform: osname=darwin, osvers=11.1.0, archname=darwin-2level uname='darwin pre.local 11.1.0 darwin kernel version 11.1.0: tue jul 26 16:07:11 pdt 2011; root:xnu-1699.22.81~1release_x86_64 x86_64 ' config_args='-de -Dprefix=/Users/clkao/perl5/perlbrew/perls/perl-5.14.2' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack- protector -I/usr/local/include -I/opt/local/include', optimize='-O3', cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack- protector -I/usr/local/include -I/opt/local/include' ccversion='', gccversion='4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector - L/usr/local/lib -L/opt/local/lib' libpth=/usr/local/lib /opt/local/lib /usr/lib libs=-lgdbm -ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib - L/opt/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF Built under darwin Compiled at Oct 1 2011 23:54:53 %ENV: PERLBREW_BASHRC_VERSION="0.42" PERLBREW_HOME="/Users/clkao/.perlbrew" PERLBREW_PATH="/Users/clkao/perl5/perlbrew/bin:/Users/clkao/perl5/perlbrew/perls /perl-5.14.2/bin" PERLBREW_PERL="perl-5.14.2" PERLBREW_ROOT="/Users/clkao/perl5/perlbrew" PERLBREW_VERSION="0.21" @INC: /Users/clkao/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level /Users/clkao/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2 /Users/clkao/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/darwin-2level /Users/clkao/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2 .
Hi, Thanks for testing the dev version, and for the thorough bug report. Can you add which version of the IB API you compiled against, also? Thanks!
Actually, scratch that, think I got it sorted. Seems ExtUtils::Embed is made of lies, and was telling 'make' to link to the wrong dynamic libraries. I have attached a new version of Finance::InteractiveBrokers::SWIG which works around this. It builds and passes tests for me under OS-X 11.1.0 against several versions of Perl and swig. Please let me know if it works for you.
Subject: Finance-InteractiveBrokers-SWIG-0.06_02.tar.gz

Message body not shown because it is not plain text.

In doing more research, it turns out that the i686-apple-darwin11-llvm-gcc-4.2 compiler that OS-X Lion uses produces faulty output. I haven't found the original source, but google searches for that version string show numerous errors across many projects. Among other things, the linker double-includes symbols, which is causing the failure in this case. The previously attached 0.06_02 has a suboptimal workaround that seems to allow it to build on there, but the toolchain itself is hosed. It's probably best to upgrade Xcode or the developer toolchain, etc. I'm not an OS-X expert, so I'm not sure which one to recommend. I'll probably roll back those changes with a 0.06_03 version that just complains and exits, but I haven't decided yet.
This is a bug in the OS-X compiler.