in reply to Inline::C produces compilation errors

Hi holandes777,

use Inline C => Config => LIBS => '-libhasp_linux.a';
That should be:
use Inline C => Config => LIBS => '-lhasp_linux';
and if it still can't find the library then you'll need to also provide the fully qualified location of libhasp_linux.a.
use Inline C => Config => LIBS => '-L/full/path/to/library -lhasp_linu +x';
However, your immediate problem seems to be that your compiler doesn't like the C file that xsubpp is creating.

Which version of perl are you running ? ... are you using the compiler that was used to build your perl ?

One thing you could do is to install ExtUtils::ParseXS and see if that helps. (That should mean that ExtUtils::ParseXS will write the C file, but I don't know whether that will make any difference.)

Update: I was just wondering whether Inline::C built and installed ok for you (passing all tests). Seems to me that, with errors like you're getting, make test should have produced numerous failures.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Inline::C produces compilation errors
by holandes777 (Scribe) on Nov 20, 2007 at 21:54 UTC
    I am running v5.8.6 and it comes straight off the FC4 CDs. I did not compile with this compiler so I am going to have to learn that skill.
     
    I guess using sledgehammers in perl does not work huh? (dang)
     
    Another weekend of fun with perl. Thanks for the tip. I should have thought of it.
      I did not compile with this compiler...

      I don't know if that's the problem - it's just something that strikes me as a possible cause of the errors you're getting.

      If, when building Inline, make test ran without reporting any failures, then I would venture to suggest it's *not* the problem. If you didn't actualy build Inline yourself from source (eg you installed an rpm), try building Inline from source and see what make test produces.

      Cheers,
      Rob
        I followed you suggestion downloading and installing perl 5.8.8. from source. I then tried to install Inline-0.44 and got the list of error messages shown below.
         
        I checked a few of the ".so" files it says it "Had problems bootstrapping Inline module" and they were there. Example:
        t/01syntax.....Uncaught exception from user code: Had problems bootstrapping Inline module '_01syntax_t_6b3a'
        When I go to the directory and do a listing it is there:
        [root@FC4-Casinfo Inline-0.44]# ls -l /CASINFO/packages/Inline-0.44/C/ +_Inline_test/lib/auto/_01syntax_t_6b3a/_01syntax_t_6b3a.so -r-xr-xr-x 1 root root 10547 Oct 26 11:20 /CASINFO/packages/Inline-0. +44/C/_Inline_test/lib/auto/_01syntax_t_6b3a/_01syntax_t_6b3a.so [root@FC4-Casinfo Inline-0.44]#
        There is precious little useful in google regarding this except for cpan tester results
         
        Any ideas??
         
        [root@FC4-Casinfo Inline-0.44]# make test make[1]: Entering directory `/CASINFO/packages/Inline-0.44/C' make[1]: Leaving directory `/CASINFO/packages/Inline-0.44/C' PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" " +test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00init......ok t/01usages....ok t/02config....ok t/03errors....ok t/04create....ok t/05files.....skipped all skipped: no reason given All tests successful, 1 test skipped. Files=6, Tests=14, 1 wallclock secs ( 1.02 cusr + 0.07 csys = 1.09 +CPU) make[1]: Entering directory `/CASINFO/packages/Inline-0.44/C' PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" " +test_harness(0, '../blib/lib', '../blib/arch')" t/*.t t/00init.......ok t/01syntax.....Uncaught exception from user code: Had problems bootstrapping Inline module '_01syntax_t_6b3a' Can't load '/CASINFO/packages/Inline-0.44/C/_Inline_test/lib/auto/_01s +yntax_t_6b3a/_01syntax_t_6b3a.so' for module _01syntax_t_6b3a: /CASIN +FO/packages/Inline-0.44/C/_Inline_test/lib/auto/_01syntax_t_6b3a/_01s +yntax_t_6b3a.so: undefined symbol: pthread_getspecific at /usr/local/ +lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230. at ../blib/lib/Inline.pm line 500 at t/01syntax.t line 28 BEGIN failed--compilation aborted at t/01syntax.t line 37. at t/01syntax.t line 37 One or more DATA sections were not processed by Inline. t/01syntax.....dubious Test returned status 9 (wstat 2304, 0x900) DIED. FAILED tests 1-5 Failed 5/5 tests, 0.00% okay t/02config.....ok 1/3Uncaught exception from user code: Had problems bootstrapping Inline module '_02config_t_733b' Can't load '/CASINFO/packages/Inline-0.44/C/_Inline_test/lib/auto/_02c +onfig_t_733b/_02config_t_733b.so' for module _02config_t_733b: /CASIN +FO/packages/Inline-0.44/C/_Inline_test/lib/auto/_02config_t_733b/_02c +onfig_t_733b.so: undefined symbol: pthread_getspecific at /usr/local/ +lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230. at ../blib/lib/Inline.pm line 500 at t/02config.t line 38 BEGIN failed--compilation aborted at t/02config.t line 40. at t/02config.t line 40 t/02config.....dubious Test returned status 9 (wstat 2304, 0x900) DIED. FAILED test 3 Failed 1/3 tests, 66.67% okay t/03typemap....Uncaught exception from user code: Had problems bootstrapping Inline module '_03typemap_t_a52c' Can't load '/CASINFO/packages/Inline-0.44/C/_Inline_test/lib/auto/_03t +ypemap_t_a52c/_03typemap_t_a52c.so' for module _03typemap_t_a52c: /CA +SINFO/packages/Inline-0.44/C/_Inline_test/lib/auto/_03typemap_t_a52c/ +_03typemap_t_a52c.so: undefined symbol: pthread_getspecific at /usr/l +ocal/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230. at ../blib/lib/Inline.pm line 500 at /usr/local/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 0 INIT failed--call queue aborted. at t/03typemap.t line 0 t/03typemap....dubious Test returned status 9 (wstat 2304, 0x900) t/04perlapi....Uncaught exception from user code: Had problems bootstrapping Inline module '_04perlapi_t_3c76' Can't load '/CASINFO/packages/Inline-0.44/C/_Inline_test/lib/auto/_04p +erlapi_t_3c76/_04perlapi_t_3c76.so' for module _04perlapi_t_3c76: /CA +SINFO/packages/Inline-0.44/C/_Inline_test/lib/auto/_04perlapi_t_3c76/ +_04perlapi_t_3c76.so: undefined symbol: pthread_getspecific at /usr/l +ocal/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230. at ../blib/lib/Inline.pm line 500 at /usr/local/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 0 INIT failed--call queue aborted. at t/04perlapi.t line 0 t/04perlapi....dubious Test returned status 9 (wstat 2304, 0x900) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay t/05xsmode.....Uncaught exception from user code: Had problems bootstrapping Inline module 'xsmode' Can't load '/CASINFO/packages/Inline-0.44/C/_Inline_test/lib/auto/xsmo +de/xsmode.so' for module xsmode: /CASINFO/packages/Inline-0.44/C/_Inl +ine_test/lib/auto/xsmode/xsmode.so: undefined symbol: pthread_getspec +ific at /usr/local/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230. at ../blib/lib/Inline.pm line 500 at /usr/local/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 0 INIT failed--call queue aborted. at t/05xsmode.t line 0 t/05xsmode.....dubious Test returned status 9 (wstat 2304, 0x900) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/01syntax.t 9 2304 5 10 200.00% 1-5 t/02config.t 9 2304 3 2 66.67% 3 t/03typemap.t 9 2304 ?? ?? % ?? t/04perlapi.t 9 2304 1 2 200.00% 1 t/05xsmode.t 9 2304 1 2 200.00% 1 Failed 5/6 test scripts, 16.67% okay. 8/11 subtests failed, 27.27% oka +y. make[1]: *** [test_dynamic] Error 9 make[1]: Leaving directory `/CASINFO/packages/Inline-0.44/C' [root@FC4-Casinfo Inline-0.44]#