Skip Menu |

This queue is for tickets about the Math-Int128 CPAN distribution.

Report information
The Basics
Id: 102519
Status: resolved
Priority: 0/
Queue: Math-Int128

People
Owner: Nobody in particular
Requestors: sisk [...] mojotoad.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: possible OSX bug with Math::Int128
Date: Wed, 4 Mar 2015 17:01:26 -0500
To: bug-Math-Int128 [...] rt.cpan.org
From: Matt Sisk <sisk [...] mojotoad.com>
Hello again, I'm not quite sure if this is a bug or just a misfeature of OSX, but I'm having trouble getting the C client API to work correctly. Please see the attached Sample.xs and Sample.pm for the (simplified) code I'm using. It compiles without errors, but when I attempt to load the module, the following error happens: $ /opt/local/bin/perl -Iblib/lib -Iblib/arch -MSample Can't load 'blib/arch/auto/Sample/Sample.bundle' for module Sample: dlopen(blib/arch/auto/Sample/Sample.bundle, 1): Symbol not found: _math_int128_c_api_SvU128 Referenced from: blib/arch/auto/Sample/Sample.bundle Expected in: flat namespace in blib/arch/auto/Sample/Sample.bundle at /opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/DynaLoader.pm line 194. at - line 0. Compilation failed in require. BEGIN failed--compilation aborted. The Math::Int128 module is properly installed and passed tests. Thanks for any insight, Matt

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128
Date: Thu, 5 Mar 2015 08:29:45 +0000 (UTC)
To: "bug-Math-Int128 [...] rt.cpan.org" <bug-Math-Int128 [...] rt.cpan.org>
From: Salvador Fandino <sfandino [...] yahoo.com>
Show quoted text
----- Original Message -----
> From: "sisk@mojotoad.com via RT" <bug-Math-Int128@rt.cpan.org> > To: > Cc: > Sent: Wednesday, March 4, 2015 11:01 PM > Subject: [rt.cpan.org #102519] possible OSX bug with Math::Int128 > > Wed Mar 04 17:01:37 2015: Request 102519 was acted upon. > Transaction: Ticket created by sisk@mojotoad.com > Queue: Math-Int128 > Subject: possible OSX bug with Math::Int128 > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: sisk@mojotoad.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 >
> > Hello again, > > I'm not quite sure if this is a bug or just a misfeature of OSX, but I'm > having trouble getting the C client API to work correctly. Please see the > attached Sample.xs and Sample.pm for the (simplified) code I'm using. It > compiles without errors, but when I attempt to load the module, the > following error happens: > > $ /opt/local/bin/perl -Iblib/lib -Iblib/arch -MSample > Can't load 'blib/arch/auto/Sample/Sample.bundle' for module Sample: > dlopen(blib/arch/auto/Sample/Sample.bundle, 1): Symbol not found: > _math_int128_c_api_SvU128 > Referenced from: blib/arch/auto/Sample/Sample.bundle > Expected in: flat namespace > in blib/arch/auto/Sample/Sample.bundle at > /opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/DynaLoader.pm line > 194. > at - line 0. > Compilation failed in require. > BEGIN failed--compilation aborted. > > The Math::Int128 module is properly installed and passed tests.
Are you compiling and linking the file c_api_client/perl_math_int128.c into your module?
Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128
Date: Thu, 5 Mar 2015 11:02:36 -0500
To: bug-Math-Int128 [...] rt.cpan.org
From: Matt Sisk <sisk [...] mojotoad.com>
Yes, c_api_client/perl_math_int128.c is getting compiled and linked via the WriteMakefile option "OBJECT => '$(O_FILES)'". On Thu, Mar 5, 2015 at 3:30 AM, Salvador \"Fandiño\" via RT < bug-Math-Int128@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 > > > > > > > ----- Original Message -----
> > From: "sisk@mojotoad.com via RT" <bug-Math-Int128@rt.cpan.org> > > To: > > Cc: > > Sent: Wednesday, March 4, 2015 11:01 PM > > Subject: [rt.cpan.org #102519] possible OSX bug with Math::Int128 > > > > Wed Mar 04 17:01:37 2015: Request 102519 was acted upon. > > Transaction: Ticket created by sisk@mojotoad.com > > Queue: Math-Int128 > > Subject: possible OSX bug with Math::Int128 > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: sisk@mojotoad.com > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 >
>
> > > > Hello again, > > > > I'm not quite sure if this is a bug or just a misfeature of OSX, but I'm > > having trouble getting the C client API to work correctly. Please see the > > attached Sample.xs and Sample.pm for the (simplified) code I'm using. It > > compiles without errors, but when I attempt to load the module, the > > following error happens: > > > > $ /opt/local/bin/perl -Iblib/lib -Iblib/arch -MSample > > Can't load 'blib/arch/auto/Sample/Sample.bundle' for module Sample: > > dlopen(blib/arch/auto/Sample/Sample.bundle, 1): Symbol not found: > > _math_int128_c_api_SvU128 > > Referenced from: blib/arch/auto/Sample/Sample.bundle > > Expected in: flat namespace > > in blib/arch/auto/Sample/Sample.bundle at > > /opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/DynaLoader.pm line > > 194. > > at - line 0. > > Compilation failed in require. > > BEGIN failed--compilation aborted. > > > > The Math::Int128 module is properly installed and passed tests.
> > > Are you compiling and linking the file c_api_client/perl_math_int128.c > into your module? > > >
Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128
Date: Thu, 5 Mar 2015 11:04:29 -0500
To: bug-Math-Int128 [...] rt.cpan.org
From: Matt Sisk <sisk [...] mojotoad.com>
Also, everything works fine on linux. On Thu, Mar 5, 2015 at 11:02 AM, Matt Sisk <sisk@mojotoad.com> wrote: Show quoted text
> Yes, c_api_client/perl_math_int128.c is getting compiled and linked via > the WriteMakefile option "OBJECT => '$(O_FILES)'". > > On Thu, Mar 5, 2015 at 3:30 AM, Salvador \"Fandiño\" via RT < > bug-Math-Int128@rt.cpan.org> wrote: >
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 > >> >> >> >> >> >> ----- Original Message -----
>> > From: "sisk@mojotoad.com via RT" <bug-Math-Int128@rt.cpan.org> >> > To: >> > Cc: >> > Sent: Wednesday, March 4, 2015 11:01 PM >> > Subject: [rt.cpan.org #102519] possible OSX bug with Math::Int128 >> > >> > Wed Mar 04 17:01:37 2015: Request 102519 was acted upon. >> > Transaction: Ticket created by sisk@mojotoad.com >> > Queue: Math-Int128 >> > Subject: possible OSX bug with Math::Int128 >> > Broken in: (no value) >> > Severity: (no value) >> > Owner: Nobody >> > Requestors: sisk@mojotoad.com >> > Status: new >> > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 >
>>
>> > >> > Hello again, >> > >> > I'm not quite sure if this is a bug or just a misfeature of OSX, but I'm >> > having trouble getting the C client API to work correctly. Please see
>> the
>> > attached Sample.xs and Sample.pm for the (simplified) code I'm using. It >> > compiles without errors, but when I attempt to load the module, the >> > following error happens: >> > >> > $ /opt/local/bin/perl -Iblib/lib -Iblib/arch -MSample >> > Can't load 'blib/arch/auto/Sample/Sample.bundle' for module Sample: >> > dlopen(blib/arch/auto/Sample/Sample.bundle, 1): Symbol not found: >> > _math_int128_c_api_SvU128 >> > Referenced from: blib/arch/auto/Sample/Sample.bundle >> > Expected in: flat namespace >> > in blib/arch/auto/Sample/Sample.bundle at >> > /opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/DynaLoader.pm
>> line
>> > 194. >> > at - line 0. >> > Compilation failed in require. >> > BEGIN failed--compilation aborted. >> > >> > The Math::Int128 module is properly installed and passed tests.
>> >> >> Are you compiling and linking the file c_api_client/perl_math_int128.c >> into your module? >> >> >>
>
Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128
Date: Thu, 5 Mar 2015 16:21:44 +0000 (UTC)
To: "bug-Math-Int128 [...] rt.cpan.org" <bug-Math-Int128 [...] rt.cpan.org>
From: Salvador Fandino <sfandino [...] yahoo.com>
Show quoted text
----- Original Message -----
> From: "sisk@mojotoad.com via RT" <bug-Math-Int128@rt.cpan.org> > To: > Cc: > Sent: Thursday, March 5, 2015 5:02 PM > Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128 > > Queue: Math-Int128 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 > > > Yes, c_api_client/perl_math_int128.c is getting compiled and linked via the
> WriteMakefile option "OBJECT => '$(O_FILES)'".
Yet that looks like a compilation/linker issue. Anyway I know mostly nothing about OS/X and don't have access to a Mac and there is nothing evident that would allow me to narrow the problem. So, I don't know... let my ask in PerlMonks, somebody may be able to help!
Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128
Date: Thu, 5 Mar 2015 16:32:49 +0000 (UTC)
To: "bug-Math-Int128 [...] rt.cpan.org" <bug-Math-Int128 [...] rt.cpan.org>
From: Salvador Fandino <sfandino [...] yahoo.com>
Show quoted text
>> Yes, c_api_client/perl_math_int128.c is getting compiled and linked via the
Show quoted text
>
>> WriteMakefile option "OBJECT => '$(O_FILES)'".
Could you show me your full module including supporting files (i.e. Makefile.PL) and the compilation log?
Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128
Date: Thu, 5 Mar 2015 14:31:31 -0500
To: bug-Math-Int128 [...] rt.cpan.org
From: Matt Sisk <sisk [...] mojotoad.com>
I've attached the files I'm using for the build. Here is the compilation output: $ /opt/local/bin/perl Makefile.PL Generating a Unix-style Makefile Writing Makefile for Sample Writing MYMETA.yml and MYMETA.json $ make Skip blib/lib/Sample.pm (unchanged) Running Mkbootstrap for Sample () chmod 644 "Sample.bs" /usr/bin/clang -c -I. -pipe -Os -fno-common -DPERL_DARWIN -I/opt/local/include -fno-strict-aliasing -fstack-protector -I/opt/local/include -O3 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" "-I/opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/CORE" Sample.c /usr/bin/clang -c -I. -pipe -Os -fno-common -DPERL_DARWIN -I/opt/local/include -fno-strict-aliasing -fstack-protector -I/opt/local/include -O3 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" "-I/opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/CORE" perl_math_int128.c rm -f blib/arch/auto/Sample/Sample.bundle env MACOSX_DEPLOYMENT_TARGET=10.9 /usr/bin/clang -L/opt/local/lib -Wl,-headerpad_max_install_names -bundle -undefined dynamic_lookup -fstack-protector Sample.o perl_math_int128.o -o blib/arch/auto/Sample/Sample.bundle \ \ chmod 755 blib/arch/auto/Sample/Sample.bundle "/opt/local/bin/perl5.16" -MExtUtils::Command::MM -e 'cp_nonempty' -- Sample.bs blib/arch/auto/Sample/Sample.bs 644 On Thu, Mar 5, 2015 at 11:33 AM, Salvador \"Fandiño\" via RT < bug-Math-Int128@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 > >
> >> Yes, c_api_client/perl_math_int128.c is getting compiled and linked
> via the >
> >
> >> WriteMakefile option "OBJECT => '$(O_FILES)'".
> > > Could you show me your full module including supporting files (i.e. > Makefile.PL) and the compilation log? > > >
Download Sample-0.00.tar.gz
application/x-gzip 45.1k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128
Date: Thu, 5 Mar 2015 16:12:22 -0500
To: bug-Math-Int128 [...] rt.cpan.org
From: Matt Sisk <sisk [...] mojotoad.com>
Interestingly, the c_api_client for Math::Int64 works without a problem. On Thu, Mar 5, 2015 at 2:31 PM, Matt Sisk <sisk@mojotoad.com> wrote: Show quoted text
> I've attached the files I'm using for the build. Here is the compilation > output: > > $ /opt/local/bin/perl Makefile.PL > Generating a Unix-style Makefile > Writing Makefile for Sample > Writing MYMETA.yml and MYMETA.json > $ make > Skip blib/lib/Sample.pm (unchanged) > Running Mkbootstrap for Sample () > chmod 644 "Sample.bs" > /usr/bin/clang -c -I. -pipe -Os -fno-common -DPERL_DARWIN > -I/opt/local/include -fno-strict-aliasing -fstack-protector > -I/opt/local/include -O3 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" > "-I/opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/CORE" Sample.c > /usr/bin/clang -c -I. -pipe -Os -fno-common -DPERL_DARWIN > -I/opt/local/include -fno-strict-aliasing -fstack-protector > -I/opt/local/include -O3 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" > "-I/opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/CORE" > perl_math_int128.c > rm -f blib/arch/auto/Sample/Sample.bundle > env MACOSX_DEPLOYMENT_TARGET=10.9 /usr/bin/clang -L/opt/local/lib > -Wl,-headerpad_max_install_names -bundle -undefined dynamic_lookup > -fstack-protector Sample.o perl_math_int128.o -o > blib/arch/auto/Sample/Sample.bundle \ > \ > > chmod 755 blib/arch/auto/Sample/Sample.bundle > "/opt/local/bin/perl5.16" -MExtUtils::Command::MM -e 'cp_nonempty' -- > Sample.bs blib/arch/auto/Sample/Sample.bs 644 > > > On Thu, Mar 5, 2015 at 11:33 AM, Salvador \"Fandiño\" via RT < > bug-Math-Int128@rt.cpan.org> wrote: >
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 > >>
>> >> Yes, c_api_client/perl_math_int128.c is getting compiled and linked
>> via the >>
>> >
>> >> WriteMakefile option "OBJECT => '$(O_FILES)'".
>> >> >> Could you show me your full module including supporting files (i.e. >> Makefile.PL) and the compilation log? >> >> >>
>
Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128
Date: Thu, 5 Mar 2015 16:27:23 -0500
To: bug-Math-Int128 [...] rt.cpan.org
From: Matt Sisk <sisk [...] mojotoad.com>
Okay I think I'm getting somewhere. When I run the strings command on the perl_math_int128.o file, the only string that appears is: "Unable to load Math::Int128 C API: your compiler does not support 128bit integers". So the following conditional is failing in perl_math_int128.c: #if ((LONGSIZE >= 8) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ Show quoted text
>= 4)))
What I can't understand is why Math::Int128 builds and tests successfully...it uses the same stanza, right? Thanks, Matt On Thu, Mar 5, 2015 at 4:12 PM, Matt Sisk <sisk@mojotoad.com> wrote: Show quoted text
> Interestingly, the c_api_client for Math::Int64 works without a problem. > > On Thu, Mar 5, 2015 at 2:31 PM, Matt Sisk <sisk@mojotoad.com> wrote: >
>> I've attached the files I'm using for the build. Here is the compilation >> output: >> >> $ /opt/local/bin/perl Makefile.PL >> Generating a Unix-style Makefile >> Writing Makefile for Sample >> Writing MYMETA.yml and MYMETA.json >> $ make >> Skip blib/lib/Sample.pm (unchanged) >> Running Mkbootstrap for Sample () >> chmod 644 "Sample.bs" >> /usr/bin/clang -c -I. -pipe -Os -fno-common -DPERL_DARWIN >> -I/opt/local/include -fno-strict-aliasing -fstack-protector >> -I/opt/local/include -O3 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" >> "-I/opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/CORE" Sample.c >> /usr/bin/clang -c -I. -pipe -Os -fno-common -DPERL_DARWIN >> -I/opt/local/include -fno-strict-aliasing -fstack-protector >> -I/opt/local/include -O3 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" >> "-I/opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/CORE" >> perl_math_int128.c >> rm -f blib/arch/auto/Sample/Sample.bundle >> env MACOSX_DEPLOYMENT_TARGET=10.9 /usr/bin/clang -L/opt/local/lib >> -Wl,-headerpad_max_install_names -bundle -undefined dynamic_lookup >> -fstack-protector Sample.o perl_math_int128.o -o >> blib/arch/auto/Sample/Sample.bundle \ >> \ >> >> chmod 755 blib/arch/auto/Sample/Sample.bundle >> "/opt/local/bin/perl5.16" -MExtUtils::Command::MM -e 'cp_nonempty' -- >> Sample.bs blib/arch/auto/Sample/Sample.bs 644 >> >> >> On Thu, Mar 5, 2015 at 11:33 AM, Salvador \"Fandiño\" via RT < >> bug-Math-Int128@rt.cpan.org> wrote: >>
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 > >>>
>>> >> Yes, c_api_client/perl_math_int128.c is getting compiled and linked
>>> via the >>>
>>> >
>>> >> WriteMakefile option "OBJECT => '$(O_FILES)'".
>>> >>> >>> Could you show me your full module including supporting files (i.e. >>> Makefile.PL) and the compilation log? >>> >>> >>>
>>
>
On Thu Mar 05 16:27:35 2015, sisk@mojotoad.com wrote: Show quoted text
> Okay I think I'm getting somewhere. When I run the strings command on > the perl_math_int128.o file, the only string that appears is: "Unable > to > load Math::Int128 C API: your compiler does not support 128bit > integers". > > So the following conditional is failing in perl_math_int128.c: > > #if ((LONGSIZE >= 8) && (__GNUC__ > 4 || (__GNUC__ == 4 && > __GNUC_MINOR__
> > = 4)))
> > What I can't understand is why Math::Int128 builds and tests > successfully...it uses the same stanza, right?
Actually, Math::Int128 no longer uses that sort of detection. Instead, it probes the compiler uses feature tests with Config::AutoConf. I'm not sure how to best replicate this with the embedding .c file, since you can't do feature detection in CPP. I was thinking that we could provide a Config::AutoConf recipe for others to use to generate appropriate defines and then fall back to the compiler detection that it does currently.
Show quoted text
> I was thinking that we could provide a Config::AutoConf recipe for > others to use to generate appropriate defines and then fall back to > the compiler detection that it does currently.
In any case, I have removed the obsolete compiler checks that were embedded in the C API client files. Matt, could you check with the new versions bundled in v0.21? https://metacpan.org/source/SALVA/Math-Int128-0.21/c_api_client
Subject: Re: [rt.cpan.org #102519] possible OSX bug with Math::Int128
Date: Mon, 9 Mar 2015 14:56:59 -0400
To: bug-Math-Int128 [...] rt.cpan.org
From: Matt Sisk <sisk [...] mojotoad.com>
Everything appears to work now on OS/X with v0.21. Thanks! On Mon, Mar 9, 2015 at 12:54 PM, Salvador Fandino Garcia via RT < bug-Math-Int128@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=102519 > > >
> > I was thinking that we could provide a Config::AutoConf recipe for > > others to use to generate appropriate defines and then fall back to > > the compiler detection that it does currently.
> > In any case, I have removed the obsolete compiler checks that were > embedded in the C API client files. > > Matt, could you check with the new versions bundled in v0.21? > > https://metacpan.org/source/SALVA/Math-Int128-0.21/c_api_client > >