lab-measurement / Lab-Measurement

Lab::Measurement allows to perform test and measurement tasks with Perl scripts.
https://www.labmeasurement.de/
Other
10 stars 11 forks source link

Lab::Measurement Installation fails at PDL install #28

Closed gpetrowitsch closed 3 years ago

gpetrowitsch commented 5 years ago

I'm trying to install Lab::Measurement on a Strawberry Perl (5.28, 32bit) running on my Windows 10 machine, but it fails when it comes to installing the obviously required PDL module.

Therefore I tried cpanm --notest PDL and cpanm --notest --force PDL

but - after lots of processing - I keep getting this final message (see below).

It obviously complains 4x about an "undefined reference to `quadmath_snprintf'", but I have no idea, what to do about that.

Any help is greatly appreciated!

"C:\Perl\Strawberry5.28-32bit\perl\bin\perl.exe" -MExtUtils::Mksymlists \
     -e "Mksymlists('NAME'=>\"PDL::Slatec\", 'DLBASE' => 'Slatec', 'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' => []);"
g++ Slatec.def -o ..\..\blib\arch\auto\PDL\Slatec\Slatec.xs.dll -mdll -s -L"C:\Perl\STRAWB~2.28-\perl\lib\CORE" -L"C:\Perl\STRAWB~2.28-\c\lib" Slatec.o slatec/chfcm.o  slatec/chfdv.o  slatec/chfev.o  slatec/chfie.o  slatec/d1mach.o  slatec/dasum.o  slatec/daxpy.o  slatec/dchfcm.o  slatec/dchfdv.o  slatec/dchfev.o  slatec/dchfie.o  slatec/ddot.o  slatec/dgeco.o  slatec/dgedi.o  slatec/dgefa.o  slatec/dgesl.o  slatec/dp1vlu.o  slatec/dpchbs.o  slatec/dpchce.o  slatec/dpchci.o  slatec/dpchcm.o  slatec/dpchcs.o  slatec/dpchdf.o  slatec/dpchfd.o  slatec/dpchfe.o  slatec/dpchia.o  slatec/dpchic.o  slatec/dpchid.o  slatec/dpchim.o  slatec/dpchkt.o  slatec/dpchsp.o  slatec/dpchst.o  slatec/dpchsw.o  slatec/dpcoef.o  slatec/dpoco.o  slatec/dpodi.o  slatec/dpofa.o  slatec/dpolft.o  slatec/dscal.o  slatec/dswap.o  slatec/ezfft1.o  slatec/ezfftb.o  slatec/ezfftf.o  slatec/ezffti.o  slatec/fdump.o  slatec/i1mach.o  slatec/idamax.o  slatec/isamax.o  slatec/j4save.o  slatec/pchbs.o  slatec/pchce.o  slatec/pchci.o  slatec/pchcm.o  slatec/pchcs.o  slatec/pchdf.o  slatec/pchfd.o  slatec/pchfe.o  slatec/pchia.o  slatec/pchic.o  slatec/pchid.o  slatec/pchim.o  slatec/pchkt.o  slatec/pchsp.o  slatec/pchst.o  slatec/pchsw.o  slatec/pcoef.o  slatec/polfit.o  slatec/pvalue.o  slatec/pythag.o  slatec/r1mach.o  slatec/radb2.o  slatec/radb3.o  slatec/radb4.o  slatec/radb5.o  slatec/radbg.o  slatec/radf2.o  slatec/radf3.o  slatec/radf4.o  slatec/radf5.o  slatec/radfg.o  slatec/rfftb.o  slatec/rfftb1.o  slatec/rfftf.o  slatec/rfftf1.o  slatec/rs.o  slatec/sasum.o  slatec/saxpy.o  slatec/sdot.o  slatec/sgeco.o  slatec/sgedi.o  slatec/sgefa.o  slatec/sgesl.o  slatec/snrm2.o  slatec/spoco.o  slatec/spodi.o  slatec/spofa.o  slatec/srot.o  slatec/srotg.o  slatec/sscal.o  slatec/ssvdc.o  slatec/sswap.o  slatec/tql2.o  slatec/tqlrat.o  slatec/tred1.o  slatec/tred2.o  slatec/xerbla.o  slatec/xercnt.o  slatec/xerhlt.o  slatec/xermsg.o  slatec/xerprn.o  slatec/xersve.o  slatec/xgetua.o    "C:\Perl\STRAWB~2.28-\perl\lib\CORE\libperl528.a" "C:\Perl\Strawberry5.28-32bit\c\bin\..\lib\gcc\i686-w64-mingw32\7.1.0\libquadmath.a" "C:\Perl\Strawberry5.28-32bit\c\bin\..\lib\gcc\i686-w64-mingw32\7.1.0\libgfortran.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libm.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libmoldname.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libkernel32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libuser32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libgdi32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libwinspool.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libcomdlg32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libadvapi32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libshell32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libole32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\liboleaut32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libnetapi32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libuuid.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libws2_32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libmpr.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libwinmm.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libversion.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libodbc32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libodbccp32.a" "C:\Perl\STRAWB~2.28-\c\i686-w64-mingw32\lib\libcomctl32.a" -Wl,--enable-auto-image-base
C:\Perl\Strawberry5.28-32bit\c\bin\..\lib\gcc\i686-w64-mingw32\7.1.0\libgfortran.a(write.o):(.text$get_precision+0x1c0): undefined reference to `quadmath_snprintf'
C:\Perl\Strawberry5.28-32bit\c\bin\..\lib\gcc\i686-w64-mingw32\7.1.0\libgfortran.a(write.o):(.text$get_float_string+0x1a2): undefined reference to `quadmath_snprintf'
C:\Perl\Strawberry5.28-32bit\c\bin\..\lib\gcc\i686-w64-mingw32\7.1.0\libgfortran.a(write.o):(.text$get_float_string+0xd18): undefined reference to `quadmath_snprintf'
C:\Perl\Strawberry5.28-32bit\c\bin\..\lib\gcc\i686-w64-mingw32\7.1.0\libgfortran.a(write.o):(.text$get_float_string+0x1990): undefined reference to `quadmath_snprintf'
collect2.exe: error: ld returned 1 exit status
gmake[2]: *** [Makefile:462: ..\..\blib\arch\auto\PDL\Slatec\Slatec.xs.dll] Error 1
gmake[2]: Leaving directory 'C:/Perl/STRAWB~2.28-/cpan/build/PDL-2.019-1/Lib/Slatec'
gmake[1]: *** [Makefile:496: subdirs] Error 2
gmake[1]: Leaving directory 'C:/Perl/STRAWB~2.28-/cpan/build/PDL-2.019-1/Lib'
gmake: *** [Makefile:547: subdirs] Error 2
  CHM/PDL-2.019.tar.gz
  C:\Perl\STRAWB~2.28-\c\bin\gmake.exe -- NOT OK
Stopping: 'install' failed for 'PDL'.
amba commented 5 years ago

Thank you for the report. Here at Uni Regensburg, currently all of our users on Windows still use Strawberry Perl 5.20, so we have never run into this. I have filed a bug in the PDL repo: https://github.com/PDLPorters/pdl/issues/265 Note that linking to NI-VISA does not work with versions 5.22 and 5.24 due to a bug in the GNU binutils, see https://rt.cpan.org/Public/Bug/Display.html?id=121219. So, at the moment my recommendation would be to use either Strawberry Perl 5.20.3.3 or 5.26.3.1.

gpetrowitsch commented 5 years ago

Thanks a lot for the hint. I'll try 5.20 and see, what happens...

Installation with Strawberry Perl 5.20.3.3 worked fine. Unfortunately, the Lab::Visa installation with cpanm Lab::Visa as instructed on the installation page, didn't work, so I tried version 5.26, but installation of Lab::Visa didn't work either.

So I donwloaded the tar.gz file, unpacked it and did this in the target directory, to which I unpacked the file:

perl Makefile.PL
gmake
gmake test
gmake install

After that, I just had to edit the Visa.pm at "<PerlPath>\perl\site\lib\Lab\Bus" to accept USB devices. For that, the function _check_resource_name must get an additional clause, like this:

elsif (
        $resname =~ /^USB[0-9]*::0x[0-9A-F]*::0x[0-9A-F]*::\w+(::INSTR)?$/    # USB INSTR
        ) {
        return 1;
    }

And now I'm happy :-) Everything works fine. Thanks for your help!!!

akhuettel commented 3 years ago

OK let's close this then. :)