Menu

#417 Perl 5.22: + GSL 2.1 fails to build

normal
closed-duplicate
None
5
2016-05-15
2016-05-15
PetaMem R&D
No

While trying to install PDL in perlbrew 5.22 perl (gcc is 5.3.0) I encounter quite a lot of warnings and fatals and eventually the install fails:

THe install command is a simple "install PDL" in the cpan shell.

...
cc -c  "-I/root/.cpan/build/PDL-2.015-839Wdd/Basic/Core" "-I/usr/include" -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"2.015\" -DXS_VERSION=\"2.015\" -fPIC "-I/opt/perlbrew/perls/perl-5.22.2/lib/5.22.2/x86_64-linux/CORE"  -DPDL_PTHREAD  -DBADVAL=1 -DBADVAL_USENAN=0 -DBADVAL_PER_PDL=0 pdlcore.c
pdlcore.c: In function ‘pdl_setav_LongLong’:
pdlcore.c:1292:22: warning: format ‘%g’ expects argument of type ‘double’, but argument 3 has type ‘PDL_LongLong {aka long int}’ [-Wformat=]
       fprintf(stderr,"Warning: pdl_setav_LongLong converted undef to  (%g) %ld time%s\n",undefval,undef_count,undef_count==1?"":"s");
                      ^
pdlcore.c: In function ‘pdl_setav_Short’:
pdlcore.c:1675:22: warning: format ‘%g’ expects argument of type ‘double’, but argument 3 has type ‘int’ [-Wformat=]
       fprintf(stderr,"Warning: pdl_setav_Short converted undef to  (%g) %ld time%s\n",undefval,undef_count,undef_count==1?"":"s");
                      ^
pdlcore.c: In function ‘pdl_setav_Indx’:
pdlcore.c:2058:22: warning: format ‘%g’ expects argument of type ‘double’, but argument 3 has type ‘PDL_Indx {aka long int}’ [-Wformat=]
       fprintf(stderr,"Warning: pdl_setav_Indx converted undef to  (%g) %ld time%s\n",undefval,undef_count,undef_count==1?"":"s");
                      ^
pdlcore.c: In function ‘pdl_setav_Long’:
pdlcore.c:2441:22: warning: format ‘%g’ expects argument of type ‘double’, but argument 3 has type ‘PDL_Long {aka int}’ [-Wformat=]
       fprintf(stderr,"Warning: pdl_setav_Long converted undef to  (%g) %ld time%s\n",undefval,undef_count,undef_count==1?"":"s");
                      ^
pdlcore.c: In function ‘pdl_setav_Ushort’:
pdlcore.c:3590:22: warning: format ‘%g’ expects argument of type ‘double’, but argument 3 has type ‘int’ [-Wformat=]
       fprintf(stderr,"Warning: pdl_setav_Ushort converted undef to  (%g) %ld time%s\n",undefval,undef_count,undef_count==1?"":"s");
                      ^
pdlcore.c: In function ‘pdl_setav_Byte’:
pdlcore.c:3973:22: warning: format ‘%g’ expects argument of type ‘double’, but argument 3 has type ‘int’ [-Wformat=]
       fprintf(stderr,"Warning: pdl_setav_Byte converted undef to  (%g) %ld time%s\n",undefval,undef_count,undef_count==1?"":"s");
                      ^
cc -c  "-I/root/.cpan/build/PDL-2.015-839Wdd/Basic/Core" "-I/usr/include" -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"2.015\" -DXS_VERSION=\"2.015\" -fPIC "-I/opt/perlbrew/perls/perl-5.22.2/lib/5.22.2/x86_64-linux/CORE"  -DPDL_PTHREAD  -DBADVAL=1 -DBADVAL_USENAN=0 -DBADVAL_PER_PDL=0 pdlapi.c
pdlapi.c: In function ‘pdl_dump_fixspace’:
pdlapi.c:500:11: warning: format ‘%f’ expects argument of type ‘double’, but argument 3 has type ‘PDL_Anyval {aka struct <anonymous>}’ [-Wformat=]
    printf("%s%f",(i?" ":""),pdl_get_offs(it,i));
           ^
cc -c  "-I/root/.cpan/build/PDL-2.015-839Wdd/Basic/Core"   -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"2.015\" -DXS_VERSION=\"2.015\" -fPIC "-I/opt/perlbrew/perls/perl-5.22.2/lib/5.22.2/x86_64-linux/CORE"   simq.c
simq.c: In function ‘simq’:
simq.c:81:3: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
   puts("SIMQ ROWNRM=0");
   ^

and some more, until the fatal error arrives:

Running Mkbootstrap for PDL::GSLSF::ELLINT ()
chmod 644 "ELLINT.bs"
"/opt/perlbrew/perls/perl-5.22.2/bin/perl" "/opt/perlbrew/perls/perl-5.22.2/lib/5.22.2/ExtUtils/xsubpp"  -typemap "/opt/perlbrew/perls/perl-5.22.2/lib/5.22.2/ExtUtils/typemap" -typemap "/root/.cpan/build/PDL-2.015-839Wdd/Basic/Core/typemap.pdl"  ELLINT.xs > ELLINT.xsc && mv ELLINT.xsc ELLINT.c
cc -c  "-I/root/.cpan/build/PDL-2.015-839Wdd/Basic/Core"   -I/usr/include -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"2.015\" -DXS_VERSION=\"2.015\" -fPIC "-I/opt/perlbrew/perls/perl-5.22.2/lib/5.22.2/x86_64-linux/CORE"   ELLINT.c
In file included from ELLINT.xs:39:0:
ELLINT.xs: In function pdl_gsl_sf_ellint_D_readdata’:
ELLINT.xs:1736:8: error: too many arguments to function gsl_sf_ellint_D_e
 GSLERR(gsl_sf_ellint_D_e,((phi_datap)[0] PDL_COMMENT("ACCESS()") ,(k_datap)[0] PDL_COMMENT("ACCESS()") ,(n_datap)[0] PDL_COMMENT("ACCESS()") ,GSL_PREC_DOUBLE,&r))
        ^
../gslerr.h:5:35: note: in definition of macro GSLERR
 #define GSLERR(x,y) if ((status = x y)) {snprintf(buf,200,"Error in %s: %s", #x, gsl_strerror(status));barf("%s", buf);}
                                   ^
In file included from /usr/include/gsl/gsl_sf.h:17:0,
                 from ELLINT.xs:38:
/usr/include/gsl/gsl_sf_ellint.h:84:5: note: declared here
 int gsl_sf_ellint_D_e(double phi, double k, gsl_mode_t mode, gsl_sf_result * result);
     ^
Makefile:325: recipe for target 'ELLINT.o' failed
make[4]: *** [ELLINT.o] Error 1
make[4]: Leaving directory '/root/.cpan/build/PDL-2.015-839Wdd/Lib/GSL/SF/ellint'
Makefile:493: recipe for target 'subdirs' failed
make[3]: *** [subdirs] Error 2
make[3]: Leaving directory '/root/.cpan/build/PDL-2.015-839Wdd/Lib/GSL/SF'
Makefile:480: recipe for target 'subdirs' failed
make[2]: *** [subdirs] Error 2

Now I do have read https://sourceforge.net/p/pdl/bugs/407/ and I do have gsl 2.1 - so I'm merely saying "doesn't work for me" for the current version on CPAN.

Discussion

  • Chris Marshall

    Chris Marshall - 2016-05-15
    • summary: Perl 5.22: multiple Build problems --> Perl 5.22: + GSL 2.1 fails to build
    • status: open --> closed-duplicate
    • assigned_to: Chris Marshall
     
  • Chris Marshall

    Chris Marshall - 2016-05-15

    Hi PetaMem, thanks for the report. I'm sorry you have problems building PDL on your system. Unfortunately, a real fix requires a new PDL release which is planned for this month.

    In the meantime, you can edit the perldl.conf file to disable the GSL bindings build, or install GSL 1.x and build against that. We hope to have this resolved in the coming PDL-2.016.

    Please contact the PDL mailing list if you have any questions or build problems we can help with. See http://pdl.perl.org/?page=mailing-lists to enroll.

     

Log in to post a comment.

Monday.com Logo