How do I make Alien use an existing tarball instead of downloading? - perl

My distro does not offer any gsl <2.6 any more.
Given:
Alien::GSL 1.01
/tmp/gsl-2.5.tar.gz
How do I force it to compile that gsl instead of downloading from GNU FTP version 2.6, which I already have on the system anyway but is not delectable to Math::GSL 0.40?
I unsuccessfully tried:
copying the tarball into the unpacked Alien::GSL base directory
messing with alien_repository
This is for a throw-away project. I'm okay with manual installation instructions and patching toolchain code.

ikegami found the decisive hint:
It looks like you can set protocol of local to use a local file
Tested step-by-step instructions, plus some additional work-arounds; to me it looks like the build systems of the two modules are buggy/insufficiently tested:
cpanm --look Alien::GSL
patch Build.PL
diff --git a/Build.PL b/Build.PL
index 32f3057..6537138 100644
--- a/Build.PL
+++ b/Build.PL
## -20,10 +20,9 ## my $builder = Alien::Base::ModuleBuild->new(
alien_name => 'gsl',
alien_repository => [
{
- protocol => 'ftp',
- host => 'ftp.gnu.org',
- location => '/gnu/gsl',
- pattern => qr/^gsl-([\d\.]+)\.tar\.gz$/,
+ protocol => 'local',
+ location => '/tmp',
+ pattern => 'gsl-2.5.tar.gz',
},
],
meta_merge => {
--
2.23.0
perl Build.PL
./Build
Pay attention to the generated configure/libtool commands here, they match the Perl configuration. A manual installation without those various options is not guaranteed to be compatible or usable. (This is not superstition: a similar problem historically shows up when installing mod_perl2 and libapreq2 from source on a system httpd; perl needs to be compiled first, then httpd to match, then the other packages, otherwise it won't work.) This shows the value of installing through Alien, since it delegates to M::B, the correct options will be figured out. It's above my level of knowledge to accurately create them from scratch.
./Build test
gsl-config in blib now erroneously contains build paths, not install paths, fix:
perl -MConfig -i -lpe'
s|/.*(/auto/share/dist/Alien-GSL)|$Config{installsitelib}$1|
' blib/lib/auto/share/dist/Alien-GSL/bin/gsl-config
./Build install
exit # cpanm
cpanm --look Math::GSL
# let it pick up gsl-config on PATH
export PATH=$PATH:$(perl -mAlien::GSL -e'print Alien::GSL->bin_dir')
perl Build.PL
./Build
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(gsl-config --libs | perl -lne'/-L(\S+) / && print $1')
./Build test
./Build install
exit # cpanm
Finally rëexport the variables whenever you want to use Math::GSL.

Related

Why will it not install DBI?

I have installed XAMPP on windows 10.
Running Apache and mySQL, works fine. I was testing Perl, and it worked too. However it can't connect to mySQL, so I tried to install DBI, but neither PPM or CPAN was recognized by DOS. So I installed ActiveState-Perl, and then used CPAN to install DBI, and you can see the result below.
Any ideas will help! Thanks!!
Reading 'C:\Perl64\cpan\Metadata'
Database was generated on Tue, 24 Dec 2019 06:29:03 GMT
Running install for module 'DBI'
Checksum for C:\Perl64\cpan\sources\authors\id\T\TI\TIMB\DBI-1.642.tar.gz ok
Scanning cache C:\Perl64/cpan/build for sizes
........................................................................----DONE
DEL(1/1): C:\Perl64\cpan\build\DBI-1.642-0.yml
DBI-1.642/
DBI-1.642/DBI.pm
DBI-1.642/dbipport.h
DBI-1.642/INSTALL
DBI-1.642/dbixs_rev.pl
DBI-1.642/Perl.xs
DBI-1.642/dbivport.h
DBI-1.642/LICENSE
DBI-1.642/dbi_sql.h
DBI-1.642/Changes
DBI-1.642/dbilogstrip.PL
DBI-1.642/MANIFEST
DBI-1.642/ex/
DBI-1.642/dbiprof.PL
DBI-1.642/Driver.xst
DBI-1.642/t/
DBI-1.642/DBI.xs
DBI-1.642/test.pl
DBI-1.642/README.md
DBI-1.642/dbd_xsh.h
DBI-1.642/typemap
DBI-1.642/dbixs_rev.h
DBI-1.642/dbiproxy.PL
DBI-1.642/DBIXS.h
DBI-1.642/META.yml
DBI-1.642/lib/
DBI-1.642/Makefile.PL
DBI-1.642/Driver_xst.h
DBI-1.642/META.json
DBI-1.642/lib/DBI/
DBI-1.642/lib/Bundle/
DBI-1.642/lib/DBD/
DBI-1.642/lib/Win32/
DBI-1.642/lib/Win32/DBIODBC.pm
DBI-1.642/lib/DBD/DBM.pm
DBI-1.642/lib/DBD/NullP.pm
DBI-1.642/lib/DBD/File/
DBI-1.642/lib/DBD/Proxy.pm
DBI-1.642/lib/DBD/ExampleP.pm
DBI-1.642/lib/DBD/Gofer/
DBI-1.642/lib/DBD/File.pm
DBI-1.642/lib/DBD/Mem.pm
DBI-1.642/lib/DBD/Gofer.pm
DBI-1.642/lib/DBD/Sponge.pm
DBI-1.642/lib/DBD/Gofer/Transport/
DBI-1.642/lib/DBD/Gofer/Policy/
DBI-1.642/lib/DBD/Gofer/Policy/classic.pm
DBI-1.642/lib/DBD/Gofer/Policy/pedantic.pm
DBI-1.642/lib/DBD/Gofer/Policy/Base.pm
DBI-1.642/lib/DBD/Gofer/Policy/rush.pm
DBI-1.642/lib/DBD/Gofer/Transport/pipeone.pm
DBI-1.642/lib/DBD/Gofer/Transport/null.pm
DBI-1.642/lib/DBD/Gofer/Transport/stream.pm
DBI-1.642/lib/DBD/Gofer/Transport/corostream.pm
DBI-1.642/lib/DBD/Gofer/Transport/Base.pm
DBI-1.642/lib/DBD/File/Developers.pod
DBI-1.642/lib/DBD/File/Roadmap.pod
DBI-1.642/lib/DBD/File/HowTo.pod
DBI-1.642/lib/Bundle/DBI.pm
DBI-1.642/lib/DBI/ProfileDumper.pm
DBI-1.642/lib/DBI/Util/
DBI-1.642/lib/DBI/PurePerl.pm
DBI-1.642/lib/DBI/Profile.pm
DBI-1.642/lib/DBI/Gofer/
DBI-1.642/lib/DBI/ProfileData.pm
DBI-1.642/lib/DBI/Const/
DBI-1.642/lib/DBI/DBD.pm
DBI-1.642/lib/DBI/W32ODBC.pm
DBI-1.642/lib/DBI/ProxyServer.pm
DBI-1.642/lib/DBI/DBD/
DBI-1.642/lib/DBI/ProfileSubs.pm
DBI-1.642/lib/DBI/ProfileDumper/
DBI-1.642/lib/DBI/SQL/
DBI-1.642/lib/DBI/SQL/Nano.pm
DBI-1.642/lib/DBI/ProfileDumper/Apache.pm
DBI-1.642/lib/DBI/DBD/SqlEngine/
DBI-1.642/lib/DBI/DBD/Metadata.pm
DBI-1.642/lib/DBI/DBD/SqlEngine.pm
DBI-1.642/lib/DBI/DBD/SqlEngine/Developers.pod
DBI-1.642/lib/DBI/DBD/SqlEngine/HowTo.pod
DBI-1.642/lib/DBI/Const/GetInfoType.pm
DBI-1.642/lib/DBI/Const/GetInfoReturn.pm
DBI-1.642/lib/DBI/Const/GetInfo/
DBI-1.642/lib/DBI/Const/GetInfo/ODBC.pm
DBI-1.642/lib/DBI/Const/GetInfo/ANSI.pm
DBI-1.642/lib/DBI/Gofer/Serializer/
DBI-1.642/lib/DBI/Gofer/Transport/
DBI-1.642/lib/DBI/Gofer/Execute.pm
DBI-1.642/lib/DBI/Gofer/Response.pm
DBI-1.642/lib/DBI/Gofer/Request.pm
DBI-1.642/lib/DBI/Gofer/Transport/pipeone.pm
DBI-1.642/lib/DBI/Gofer/Transport/stream.pm
DBI-1.642/lib/DBI/Gofer/Transport/Base.pm
DBI-1.642/lib/DBI/Gofer/Serializer/DataDumper.pm
DBI-1.642/lib/DBI/Gofer/Serializer/Storable.pm
DBI-1.642/lib/DBI/Gofer/Serializer/Base.pm
DBI-1.642/lib/DBI/Util/_accessor.pm
DBI-1.642/lib/DBI/Util/CacheMemory.pm
DBI-1.642/t/pod.t
DBI-1.642/t/90sql_type_cast.t
DBI-1.642/t/80proxy.t
DBI-1.642/t/51dbm_file.t
DBI-1.642/t/16destroy.t
DBI-1.642/t/lib.pl
DBI-1.642/t/73cachedkids.t
DBI-1.642/t/40profile.t
DBI-1.642/t/02dbidrv.t
DBI-1.642/t/86gofer_fail.t
DBI-1.642/t/53sqlengine_adv.t
DBI-1.642/t/06attrs.t
DBI-1.642/t/65transact.t
DBI-1.642/t/01basics.t
DBI-1.642/t/48dbi_dbd_sqlengine.t
DBI-1.642/t/03handle.t
DBI-1.642/t/05concathash.t
DBI-1.642/t/41prof_dump.t
DBI-1.642/t/14utf8.t
DBI-1.642/t/07kids.t
DBI-1.642/t/11fetch.t
DBI-1.642/t/19fhtrace.t
DBI-1.642/t/91_store_warning.t
DBI-1.642/t/87gofer_cache.t
DBI-1.642/t/54_dbd_mem.t
DBI-1.642/t/72childhandles.t
DBI-1.642/t/49dbd_file.t
DBI-1.642/t/85gofer.t
DBI-1.642/t/12quote.t
DBI-1.642/t/04mods.t
DBI-1.642/t/10examp.t
DBI-1.642/t/52dbm_complex.t
DBI-1.642/t/35thrclone.t
DBI-1.642/t/50dbm_simple.t
DBI-1.642/t/15array.t
DBI-1.642/t/31methcache.t
DBI-1.642/t/09trace.t
DBI-1.642/t/60preparse.t
DBI-1.642/t/20meta.t
DBI-1.642/t/pod-coverage.t
DBI-1.642/t/70callbacks.t
DBI-1.642/t/42prof_data.t
DBI-1.642/t/13taint.t
DBI-1.642/t/43prof_env.t
DBI-1.642/t/30subclass.t
DBI-1.642/t/08keeperr.t
DBI-1.642/ex/profile.pl
DBI-1.642/ex/corogofer.pl
DBI-1.642/ex/perl_dbi_nulls_test.pl
Configuring T/TI/TIMB/DBI-1.642.tar.gz with Makefile.PL
Your perl was compiled with gcc (version 4.6.3), okay.
Use of uninitialized value $DBI::DBD::Config{"cc"} in string eq at lib/DBI/DBD.pm line 3315.
Creating test wrappers for DBD::Gofer:
t/zvg_01basics.t
t/zvg_02dbidrv.t
t/zvg_03handle.t
t/zvg_04mods.t
t/zvg_05concathash.t
t/zvg_06attrs.t
t/zvg_07kids.t
t/zvg_08keeperr.t
t/zvg_09trace.t
t/zvg_10examp.t
t/zvg_11fetch.t
t/zvg_12quote.t
t/zvg_13taint.t
t/zvg_14utf8.t
t/zvg_15array.t
t/zvg_16destroy.t
t/zvg_19fhtrace.t
t/zvg_20meta.t
t/zvg_30subclass.t
t/zvg_31methcache.t
t/zvg_35thrclone.t (use threads)
t/zvg_40profile.t
t/zvg_41prof_dump.t
t/zvg_42prof_data.t
t/zvg_43prof_env.t
t/zvg_48dbi_dbd_sqlengine.t
t/zvg_49dbd_file.t
t/zvg_50dbm_simple.t
t/zvg_51dbm_file.t
t/zvg_52dbm_complex.t
t/zvg_53sqlengine_adv.t
t/zvg_54_dbd_mem.t
t/zvg_60preparse.t
t/zvg_65transact.t
t/zvg_70callbacks.t
t/zvg_72childhandles.t
t/zvg_73cachedkids.t
t/zvg_80proxy.t
t/zvg_85gofer.t
t/zvg_86gofer_fail.t
t/zvg_87gofer_cache.t
t/zvg_90sql_type_cast.t
t/zvg_91_store_warning.t
Creating test wrappers for DBI::SQL::Nano:
t/zvn_48dbi_dbd_sqlengine.t
t/zvn_49dbd_file.t
t/zvn_50dbm_simple.t
t/zvn_51dbm_file.t
t/zvn_52dbm_complex.t
t/zvn_85gofer.t
Creating test wrappers for DBI::PurePerl:
t/zvp_01basics.t
t/zvp_02dbidrv.t
t/zvp_03handle.t
t/zvp_04mods.t
t/zvp_05concathash.t
t/zvp_06attrs.t
t/zvp_07kids.t
t/zvp_08keeperr.t
t/zvp_09trace.t
t/zvp_10examp.t
t/zvp_11fetch.t
t/zvp_12quote.t
t/zvp_13taint.t
t/zvp_14utf8.t
t/zvp_15array.t
t/zvp_16destroy.t
t/zvp_19fhtrace.t
t/zvp_20meta.t
t/zvp_30subclass.t
t/zvp_31methcache.t
t/zvp_35thrclone.t (use threads)
t/zvp_40profile.t
t/zvp_41prof_dump.t
t/zvp_42prof_data.t
t/zvp_43prof_env.t
t/zvp_48dbi_dbd_sqlengine.t
t/zvp_49dbd_file.t
t/zvp_50dbm_simple.t
t/zvp_51dbm_file.t
t/zvp_52dbm_complex.t
t/zvp_53sqlengine_adv.t
t/zvp_54_dbd_mem.t
t/zvp_60preparse.t
t/zvp_65transact.t
t/zvp_70callbacks.t
t/zvp_72childhandles.t
t/zvp_73cachedkids.t
t/zvp_80proxy.t
t/zvp_85gofer.t
t/zvp_86gofer_fail.t
t/zvp_87gofer_cache.t
t/zvp_90sql_type_cast.t
t/zvp_91_store_warning.t
Creating test wrappers for DBD::Gofer + DBI::SQL::Nano:
t/zvxgn_48dbi_dbd_sqlengine.t
t/zvxgn_49dbd_file.t
t/zvxgn_50dbm_simple.t
t/zvxgn_51dbm_file.t
t/zvxgn_52dbm_complex.t
t/zvxgn_85gofer.t
Creating test wrappers for DBD::Gofer + DBI::PurePerl:
t/zvxgp_01basics.t
t/zvxgp_02dbidrv.t
t/zvxgp_03handle.t
t/zvxgp_04mods.t
t/zvxgp_05concathash.t
t/zvxgp_06attrs.t
t/zvxgp_07kids.t
t/zvxgp_08keeperr.t
t/zvxgp_09trace.t
t/zvxgp_10examp.t
t/zvxgp_11fetch.t
t/zvxgp_12quote.t
t/zvxgp_13taint.t
t/zvxgp_14utf8.t
t/zvxgp_15array.t
t/zvxgp_16destroy.t
t/zvxgp_19fhtrace.t
t/zvxgp_20meta.t
t/zvxgp_30subclass.t
t/zvxgp_31methcache.t
t/zvxgp_35thrclone.t (use threads)
t/zvxgp_40profile.t
t/zvxgp_41prof_dump.t
t/zvxgp_42prof_data.t
t/zvxgp_43prof_env.t
t/zvxgp_48dbi_dbd_sqlengine.t
t/zvxgp_49dbd_file.t
t/zvxgp_50dbm_simple.t
t/zvxgp_51dbm_file.t
t/zvxgp_52dbm_complex.t
t/zvxgp_53sqlengine_adv.t
t/zvxgp_54_dbd_mem.t
t/zvxgp_60preparse.t
t/zvxgp_65transact.t
t/zvxgp_70callbacks.t
t/zvxgp_72childhandles.t
t/zvxgp_73cachedkids.t
t/zvxgp_80proxy.t
t/zvxgp_85gofer.t
t/zvxgp_86gofer_fail.t
t/zvxgp_87gofer_cache.t
t/zvxgp_90sql_type_cast.t
t/zvxgp_91_store_warning.t
Creating test wrappers for DBI::SQL::Nano + DBI::PurePerl:
t/zvxnp_48dbi_dbd_sqlengine.t
t/zvxnp_49dbd_file.t
t/zvxnp_50dbm_simple.t
t/zvxnp_51dbm_file.t
t/zvxnp_52dbm_complex.t
t/zvxnp_85gofer.t
Creating test wrappers for DBD::Gofer + DBI::SQL::Nano + DBI::PurePerl:
t/zvxgnp_48dbi_dbd_sqlengine.t
t/zvxgnp_49dbd_file.t
t/zvxgnp_50dbm_simple.t
t/zvxgnp_51dbm_file.t
t/zvxgnp_52dbm_complex.t
t/zvxgnp_85gofer.t
Checking if your kit is complete...
Looks good
Use of uninitialized value $m[8] in join or string at C:/Perl64/site/lib/ExtUtils/MM_Unix.pm line 343.
I see you're using perl 5.028001 on MSWin32-x64-multi-thread, okay.
Remember to actually *read* the README file!
Use 'make' to build the software (dmake or nmake on Windows).
Then 'make test' to execute self tests.
Then 'make install' to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.
Windows users need to use the correct make command.
That may be nmake or dmake depending on which Perl you are using.
If using the Win32 ActiveState build then it is recommended that you
use the ppm utility to fetch and install a prebuilt DBI instead.
Generating a dmake-style Makefile
Writing Makefile for DBI
Writing MYMETA.yml and MYMETA.json
TIMB/DBI-1.642.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK
Running make for T/TI/TIMB/DBI-1.642.tar.gz
'dmake' is not recognized as an internal or external command,
operable program or batch file.
TIMB/DBI-1.642.tar.gz
dmake -- NOT OK
Failed during this command:
TIMB/DBI-1.642.tar.gz : make NO
cpan>```
Previously, ActiveState Perl would automatically install dmake and MinGW for you, see “ppm.bat install failed: Can't find any package that provides MinGW”.
I tried to install perl version 5.28.1 using the new ActiveState Platform, see notice at the PPM index:
Notice! PPM is being replaced with the ActiveState Platform, which
enhances PPM’s build and deploy capabilities. Create your free
Platform account to download ActivePerl or customize Perl with the
packages you require and get automatic updates.
but there is no MinGW package when I choose "Add packages" from the "Configuration" tab at my Perl project from the ActiveState Platform.
However, for the old PPM with perl version 5.24 there is a MinGW package.
Also, if I try run from the Command Prompt:
>ppm install MinGW
ppm install failed: Can't find any package that provides MinGW
I would recommend using Strawberry Perl until this problem with ActivePerl is fixed.

'dmake' is not recognized as an internal or external command [duplicate]

I have installed XAMPP on windows 10.
Running Apache and mySQL, works fine. I was testing Perl, and it worked too. However it can't connect to mySQL, so I tried to install DBI, but neither PPM or CPAN was recognized by DOS. So I installed ActiveState-Perl, and then used CPAN to install DBI, and you can see the result below.
Any ideas will help! Thanks!!
Reading 'C:\Perl64\cpan\Metadata'
Database was generated on Tue, 24 Dec 2019 06:29:03 GMT
Running install for module 'DBI'
Checksum for C:\Perl64\cpan\sources\authors\id\T\TI\TIMB\DBI-1.642.tar.gz ok
Scanning cache C:\Perl64/cpan/build for sizes
........................................................................----DONE
DEL(1/1): C:\Perl64\cpan\build\DBI-1.642-0.yml
DBI-1.642/
DBI-1.642/DBI.pm
DBI-1.642/dbipport.h
DBI-1.642/INSTALL
DBI-1.642/dbixs_rev.pl
DBI-1.642/Perl.xs
DBI-1.642/dbivport.h
DBI-1.642/LICENSE
DBI-1.642/dbi_sql.h
DBI-1.642/Changes
DBI-1.642/dbilogstrip.PL
DBI-1.642/MANIFEST
DBI-1.642/ex/
DBI-1.642/dbiprof.PL
DBI-1.642/Driver.xst
DBI-1.642/t/
DBI-1.642/DBI.xs
DBI-1.642/test.pl
DBI-1.642/README.md
DBI-1.642/dbd_xsh.h
DBI-1.642/typemap
DBI-1.642/dbixs_rev.h
DBI-1.642/dbiproxy.PL
DBI-1.642/DBIXS.h
DBI-1.642/META.yml
DBI-1.642/lib/
DBI-1.642/Makefile.PL
DBI-1.642/Driver_xst.h
DBI-1.642/META.json
DBI-1.642/lib/DBI/
DBI-1.642/lib/Bundle/
DBI-1.642/lib/DBD/
DBI-1.642/lib/Win32/
DBI-1.642/lib/Win32/DBIODBC.pm
DBI-1.642/lib/DBD/DBM.pm
DBI-1.642/lib/DBD/NullP.pm
DBI-1.642/lib/DBD/File/
DBI-1.642/lib/DBD/Proxy.pm
DBI-1.642/lib/DBD/ExampleP.pm
DBI-1.642/lib/DBD/Gofer/
DBI-1.642/lib/DBD/File.pm
DBI-1.642/lib/DBD/Mem.pm
DBI-1.642/lib/DBD/Gofer.pm
DBI-1.642/lib/DBD/Sponge.pm
DBI-1.642/lib/DBD/Gofer/Transport/
DBI-1.642/lib/DBD/Gofer/Policy/
DBI-1.642/lib/DBD/Gofer/Policy/classic.pm
DBI-1.642/lib/DBD/Gofer/Policy/pedantic.pm
DBI-1.642/lib/DBD/Gofer/Policy/Base.pm
DBI-1.642/lib/DBD/Gofer/Policy/rush.pm
DBI-1.642/lib/DBD/Gofer/Transport/pipeone.pm
DBI-1.642/lib/DBD/Gofer/Transport/null.pm
DBI-1.642/lib/DBD/Gofer/Transport/stream.pm
DBI-1.642/lib/DBD/Gofer/Transport/corostream.pm
DBI-1.642/lib/DBD/Gofer/Transport/Base.pm
DBI-1.642/lib/DBD/File/Developers.pod
DBI-1.642/lib/DBD/File/Roadmap.pod
DBI-1.642/lib/DBD/File/HowTo.pod
DBI-1.642/lib/Bundle/DBI.pm
DBI-1.642/lib/DBI/ProfileDumper.pm
DBI-1.642/lib/DBI/Util/
DBI-1.642/lib/DBI/PurePerl.pm
DBI-1.642/lib/DBI/Profile.pm
DBI-1.642/lib/DBI/Gofer/
DBI-1.642/lib/DBI/ProfileData.pm
DBI-1.642/lib/DBI/Const/
DBI-1.642/lib/DBI/DBD.pm
DBI-1.642/lib/DBI/W32ODBC.pm
DBI-1.642/lib/DBI/ProxyServer.pm
DBI-1.642/lib/DBI/DBD/
DBI-1.642/lib/DBI/ProfileSubs.pm
DBI-1.642/lib/DBI/ProfileDumper/
DBI-1.642/lib/DBI/SQL/
DBI-1.642/lib/DBI/SQL/Nano.pm
DBI-1.642/lib/DBI/ProfileDumper/Apache.pm
DBI-1.642/lib/DBI/DBD/SqlEngine/
DBI-1.642/lib/DBI/DBD/Metadata.pm
DBI-1.642/lib/DBI/DBD/SqlEngine.pm
DBI-1.642/lib/DBI/DBD/SqlEngine/Developers.pod
DBI-1.642/lib/DBI/DBD/SqlEngine/HowTo.pod
DBI-1.642/lib/DBI/Const/GetInfoType.pm
DBI-1.642/lib/DBI/Const/GetInfoReturn.pm
DBI-1.642/lib/DBI/Const/GetInfo/
DBI-1.642/lib/DBI/Const/GetInfo/ODBC.pm
DBI-1.642/lib/DBI/Const/GetInfo/ANSI.pm
DBI-1.642/lib/DBI/Gofer/Serializer/
DBI-1.642/lib/DBI/Gofer/Transport/
DBI-1.642/lib/DBI/Gofer/Execute.pm
DBI-1.642/lib/DBI/Gofer/Response.pm
DBI-1.642/lib/DBI/Gofer/Request.pm
DBI-1.642/lib/DBI/Gofer/Transport/pipeone.pm
DBI-1.642/lib/DBI/Gofer/Transport/stream.pm
DBI-1.642/lib/DBI/Gofer/Transport/Base.pm
DBI-1.642/lib/DBI/Gofer/Serializer/DataDumper.pm
DBI-1.642/lib/DBI/Gofer/Serializer/Storable.pm
DBI-1.642/lib/DBI/Gofer/Serializer/Base.pm
DBI-1.642/lib/DBI/Util/_accessor.pm
DBI-1.642/lib/DBI/Util/CacheMemory.pm
DBI-1.642/t/pod.t
DBI-1.642/t/90sql_type_cast.t
DBI-1.642/t/80proxy.t
DBI-1.642/t/51dbm_file.t
DBI-1.642/t/16destroy.t
DBI-1.642/t/lib.pl
DBI-1.642/t/73cachedkids.t
DBI-1.642/t/40profile.t
DBI-1.642/t/02dbidrv.t
DBI-1.642/t/86gofer_fail.t
DBI-1.642/t/53sqlengine_adv.t
DBI-1.642/t/06attrs.t
DBI-1.642/t/65transact.t
DBI-1.642/t/01basics.t
DBI-1.642/t/48dbi_dbd_sqlengine.t
DBI-1.642/t/03handle.t
DBI-1.642/t/05concathash.t
DBI-1.642/t/41prof_dump.t
DBI-1.642/t/14utf8.t
DBI-1.642/t/07kids.t
DBI-1.642/t/11fetch.t
DBI-1.642/t/19fhtrace.t
DBI-1.642/t/91_store_warning.t
DBI-1.642/t/87gofer_cache.t
DBI-1.642/t/54_dbd_mem.t
DBI-1.642/t/72childhandles.t
DBI-1.642/t/49dbd_file.t
DBI-1.642/t/85gofer.t
DBI-1.642/t/12quote.t
DBI-1.642/t/04mods.t
DBI-1.642/t/10examp.t
DBI-1.642/t/52dbm_complex.t
DBI-1.642/t/35thrclone.t
DBI-1.642/t/50dbm_simple.t
DBI-1.642/t/15array.t
DBI-1.642/t/31methcache.t
DBI-1.642/t/09trace.t
DBI-1.642/t/60preparse.t
DBI-1.642/t/20meta.t
DBI-1.642/t/pod-coverage.t
DBI-1.642/t/70callbacks.t
DBI-1.642/t/42prof_data.t
DBI-1.642/t/13taint.t
DBI-1.642/t/43prof_env.t
DBI-1.642/t/30subclass.t
DBI-1.642/t/08keeperr.t
DBI-1.642/ex/profile.pl
DBI-1.642/ex/corogofer.pl
DBI-1.642/ex/perl_dbi_nulls_test.pl
Configuring T/TI/TIMB/DBI-1.642.tar.gz with Makefile.PL
Your perl was compiled with gcc (version 4.6.3), okay.
Use of uninitialized value $DBI::DBD::Config{"cc"} in string eq at lib/DBI/DBD.pm line 3315.
Creating test wrappers for DBD::Gofer:
t/zvg_01basics.t
t/zvg_02dbidrv.t
t/zvg_03handle.t
t/zvg_04mods.t
t/zvg_05concathash.t
t/zvg_06attrs.t
t/zvg_07kids.t
t/zvg_08keeperr.t
t/zvg_09trace.t
t/zvg_10examp.t
t/zvg_11fetch.t
t/zvg_12quote.t
t/zvg_13taint.t
t/zvg_14utf8.t
t/zvg_15array.t
t/zvg_16destroy.t
t/zvg_19fhtrace.t
t/zvg_20meta.t
t/zvg_30subclass.t
t/zvg_31methcache.t
t/zvg_35thrclone.t (use threads)
t/zvg_40profile.t
t/zvg_41prof_dump.t
t/zvg_42prof_data.t
t/zvg_43prof_env.t
t/zvg_48dbi_dbd_sqlengine.t
t/zvg_49dbd_file.t
t/zvg_50dbm_simple.t
t/zvg_51dbm_file.t
t/zvg_52dbm_complex.t
t/zvg_53sqlengine_adv.t
t/zvg_54_dbd_mem.t
t/zvg_60preparse.t
t/zvg_65transact.t
t/zvg_70callbacks.t
t/zvg_72childhandles.t
t/zvg_73cachedkids.t
t/zvg_80proxy.t
t/zvg_85gofer.t
t/zvg_86gofer_fail.t
t/zvg_87gofer_cache.t
t/zvg_90sql_type_cast.t
t/zvg_91_store_warning.t
Creating test wrappers for DBI::SQL::Nano:
t/zvn_48dbi_dbd_sqlengine.t
t/zvn_49dbd_file.t
t/zvn_50dbm_simple.t
t/zvn_51dbm_file.t
t/zvn_52dbm_complex.t
t/zvn_85gofer.t
Creating test wrappers for DBI::PurePerl:
t/zvp_01basics.t
t/zvp_02dbidrv.t
t/zvp_03handle.t
t/zvp_04mods.t
t/zvp_05concathash.t
t/zvp_06attrs.t
t/zvp_07kids.t
t/zvp_08keeperr.t
t/zvp_09trace.t
t/zvp_10examp.t
t/zvp_11fetch.t
t/zvp_12quote.t
t/zvp_13taint.t
t/zvp_14utf8.t
t/zvp_15array.t
t/zvp_16destroy.t
t/zvp_19fhtrace.t
t/zvp_20meta.t
t/zvp_30subclass.t
t/zvp_31methcache.t
t/zvp_35thrclone.t (use threads)
t/zvp_40profile.t
t/zvp_41prof_dump.t
t/zvp_42prof_data.t
t/zvp_43prof_env.t
t/zvp_48dbi_dbd_sqlengine.t
t/zvp_49dbd_file.t
t/zvp_50dbm_simple.t
t/zvp_51dbm_file.t
t/zvp_52dbm_complex.t
t/zvp_53sqlengine_adv.t
t/zvp_54_dbd_mem.t
t/zvp_60preparse.t
t/zvp_65transact.t
t/zvp_70callbacks.t
t/zvp_72childhandles.t
t/zvp_73cachedkids.t
t/zvp_80proxy.t
t/zvp_85gofer.t
t/zvp_86gofer_fail.t
t/zvp_87gofer_cache.t
t/zvp_90sql_type_cast.t
t/zvp_91_store_warning.t
Creating test wrappers for DBD::Gofer + DBI::SQL::Nano:
t/zvxgn_48dbi_dbd_sqlengine.t
t/zvxgn_49dbd_file.t
t/zvxgn_50dbm_simple.t
t/zvxgn_51dbm_file.t
t/zvxgn_52dbm_complex.t
t/zvxgn_85gofer.t
Creating test wrappers for DBD::Gofer + DBI::PurePerl:
t/zvxgp_01basics.t
t/zvxgp_02dbidrv.t
t/zvxgp_03handle.t
t/zvxgp_04mods.t
t/zvxgp_05concathash.t
t/zvxgp_06attrs.t
t/zvxgp_07kids.t
t/zvxgp_08keeperr.t
t/zvxgp_09trace.t
t/zvxgp_10examp.t
t/zvxgp_11fetch.t
t/zvxgp_12quote.t
t/zvxgp_13taint.t
t/zvxgp_14utf8.t
t/zvxgp_15array.t
t/zvxgp_16destroy.t
t/zvxgp_19fhtrace.t
t/zvxgp_20meta.t
t/zvxgp_30subclass.t
t/zvxgp_31methcache.t
t/zvxgp_35thrclone.t (use threads)
t/zvxgp_40profile.t
t/zvxgp_41prof_dump.t
t/zvxgp_42prof_data.t
t/zvxgp_43prof_env.t
t/zvxgp_48dbi_dbd_sqlengine.t
t/zvxgp_49dbd_file.t
t/zvxgp_50dbm_simple.t
t/zvxgp_51dbm_file.t
t/zvxgp_52dbm_complex.t
t/zvxgp_53sqlengine_adv.t
t/zvxgp_54_dbd_mem.t
t/zvxgp_60preparse.t
t/zvxgp_65transact.t
t/zvxgp_70callbacks.t
t/zvxgp_72childhandles.t
t/zvxgp_73cachedkids.t
t/zvxgp_80proxy.t
t/zvxgp_85gofer.t
t/zvxgp_86gofer_fail.t
t/zvxgp_87gofer_cache.t
t/zvxgp_90sql_type_cast.t
t/zvxgp_91_store_warning.t
Creating test wrappers for DBI::SQL::Nano + DBI::PurePerl:
t/zvxnp_48dbi_dbd_sqlengine.t
t/zvxnp_49dbd_file.t
t/zvxnp_50dbm_simple.t
t/zvxnp_51dbm_file.t
t/zvxnp_52dbm_complex.t
t/zvxnp_85gofer.t
Creating test wrappers for DBD::Gofer + DBI::SQL::Nano + DBI::PurePerl:
t/zvxgnp_48dbi_dbd_sqlengine.t
t/zvxgnp_49dbd_file.t
t/zvxgnp_50dbm_simple.t
t/zvxgnp_51dbm_file.t
t/zvxgnp_52dbm_complex.t
t/zvxgnp_85gofer.t
Checking if your kit is complete...
Looks good
Use of uninitialized value $m[8] in join or string at C:/Perl64/site/lib/ExtUtils/MM_Unix.pm line 343.
I see you're using perl 5.028001 on MSWin32-x64-multi-thread, okay.
Remember to actually *read* the README file!
Use 'make' to build the software (dmake or nmake on Windows).
Then 'make test' to execute self tests.
Then 'make install' to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.
Windows users need to use the correct make command.
That may be nmake or dmake depending on which Perl you are using.
If using the Win32 ActiveState build then it is recommended that you
use the ppm utility to fetch and install a prebuilt DBI instead.
Generating a dmake-style Makefile
Writing Makefile for DBI
Writing MYMETA.yml and MYMETA.json
TIMB/DBI-1.642.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK
Running make for T/TI/TIMB/DBI-1.642.tar.gz
'dmake' is not recognized as an internal or external command,
operable program or batch file.
TIMB/DBI-1.642.tar.gz
dmake -- NOT OK
Failed during this command:
TIMB/DBI-1.642.tar.gz : make NO
cpan>```
Previously, ActiveState Perl would automatically install dmake and MinGW for you, see “ppm.bat install failed: Can't find any package that provides MinGW”.
I tried to install perl version 5.28.1 using the new ActiveState Platform, see notice at the PPM index:
Notice! PPM is being replaced with the ActiveState Platform, which
enhances PPM’s build and deploy capabilities. Create your free
Platform account to download ActivePerl or customize Perl with the
packages you require and get automatic updates.
but there is no MinGW package when I choose "Add packages" from the "Configuration" tab at my Perl project from the ActiveState Platform.
However, for the old PPM with perl version 5.24 there is a MinGW package.
Also, if I try run from the Command Prompt:
>ppm install MinGW
ppm install failed: Can't find any package that provides MinGW
I would recommend using Strawberry Perl until this problem with ActivePerl is fixed.

Installing cpan Modules in cygwin fails

I am trying to install different Perl Modules from CPAN in a cygwin-32bit enviroment and always get Errors of the same kind. This one is from trying to install Net::SSLeay, did make, install and tried force install too, nothing seemed to work.
drmariad#drmariad-MOBL ~/.cpan/build/Net-SSLeay-1.70-eDSzRW$ make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
chmod 755 /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int/auto//Net/SSLeay/SSLeay.dll
/bin/find /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int/auto/ -xdev -name \*.dll /bin/rebase -sOT -
/bin/find: paths must precede expression: /bin/rebase
Usage: /bin/find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
Makefile:731: recipe for target 'pure_install' failed
make: *** [pure_install] Error 1
Most of the time it is the bin/find fails message i get in the installations, but i don't know how to change that behaviour. I got errors and failures with most of the modules i tryed to install.
My update-to-date Cygwin comes with
ExtUtils::MakeMaker 6.57_05
ExtUtils::MM_Cygwin 6.57_07
That's odd for a few reason, but what we care about is that version of MM_Cygwin is buggy.
sub install {
my($self, %attribs) = #_;
my $s = ExtUtils::MM_Unix::install($self, %attribs);
return '' unless $s;
return $s unless %{$self->{XS}};
my $INSTALLDIRS = $self->{INSTALLDIRS};
my $INSTALLLIB = $self->{"INSTALL". ($INSTALLDIRS eq 'perl' ? 'ARCHLIB' : uc($INSTALLDIRS)."ARCH")};
my $dop = "\$\(DESTDIR\)$INSTALLLIB/auto/";
my $dll = "$dop/$self->{FULLEXT}/$self->{BASEEXT}.$self->{DLEXT}";
$s =~ s|^(pure_install :: pure_\$\(INSTALLDIRS\)_install\n\t)\$\(NOECHO\) \$\(NOOP\)\n|$1\$(CHMOD) \$(PERM_RWX) $dll\n\t/bin/find $dop -xdev -name \\*.$self->{DLEXT} /bin/rebase -sOT -\n|m if (( $Config{myarchname} eq 'i686-cygwin') and not ( exists $ENV{CYGPORT_PACKAGE_VERSION} ));
$s;
}
You could add the missing | to /usr/lib/perl5/5.14/ExtUtils/MM_Cygwin.pm as a quick permanent fix.
Alternatively, Cygwin has a package named perl-ExtUtils-MakeMaker that upgrade the distribution to 7.04_01.
...Except the bug is still present there. If you have this package installed, the file to fix is /usr/lib/perl5/vendor_perl/5.14/ExtUtils/MM_Cygwin.pm.
Alternatively, you can upgrade ExtUtils::MakeMaker to the latest dev release (which uses a completely different command).
cpan B/BI/BINGOS/ExtUtils-MakeMaker-7.05_22.tar.gz

How can I use an Ada module in a Perl program using XS?

I started learning Ada recently and knowing that Ada and C object files can be linked together to build a multilingual program or library, is it possible to call Ada code from Perl using XS?
Yes!
In fact, any language that can be called from C can be used from Perl using XS. Here's a solution to how to do it with an Ada module and ExtUtils::MakeMaker.
Setting things up
Module tree
Let's start by creating a module tree using h2xs:
$ h2xs -A -n MyAdaModule
Then let's create a subdirectory to hold our Ada files:
$ cd MyAdaModule
$ mkdir src
Here is the module's specification: src/hello.ads
procedure hello;
... and the body: src/hello.adb
with Ada.Text_IO;
use Ada.Text_IO;
procedure hello is
begin
Put_Line("Hi from Ada!");
end;
Don't forget to update the MANIFEST.
Writing the XS file
Let's write the body of MyAdaModule.xs now. It's pretty much like using a function from a C library:
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "ppport.h"
extern void adainit();
extern void adafinal();
MODULE = MyAdaModule PACKAGE = MyAdaModule
void say_hello()
CODE:
adainit();
hello();
adafinal();
From the gnat documentation we know that we need to call adainit() and adafinal() to initialise and then clean up. These calls surround hello() here but they would probably be in a better place in some other function in your XS file. They would then be called from a BEGIN and END block in your Perl module.
Time to compile!
Ada library
First, we don't want to delegate all the magic linking and binding to MakeMaker so let's create a makefile in the src/ directory that will compile our Ada code into a static library.
To make this library, hello.a, we just have to follow the gnat documentation:
use gnatmake -c to generate a hello.ali and a hello.o;
use hello.ali with gnatbind with the -n switch. This will generate b~hello.adb and b~hello.ads which contain binding code;
compile b~hello.adb into an object file: b~hello.o.
group hello.o and b~hello.o together into an archive with ar
So, in short, we will use this makefile:
all: hello.a
hello.a: hello.o b~hello.o
ar rcs $# $^
hello.o: hello.adb hello.ads
gnatmake -c -o $# $<
b~hello.o: b~hello.adb b~hello.ads
gnatmake -c -o $# $<
b~hello.adb: hello.ali
gnatbind -n $<
hello.ali: hello.o
clean:
rm -rf *.o *.ali *.a b~*
Don't forget to update the MANIFEST.
Makefile.PL
Finally, the MakeFile.PL file needs some editing. It has to call the above makefile to build our library and then use it in the final linking phase. This is done by setting MYEXTLIB to src/hello.a and by adding a rule in the postamble section.
In our case, we also need to link with libgnat (for Ada.Text_IO) which should reside somewhere on your system. This is done by editing LIBS. In this example the path is hardcoded but you should probably figure out a more portable way to find libgnat.
use 5.018001;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'MyAdaModule',
VERSION_FROM => 'lib/MyAdaModule.pm', # finds $VERSION
PREREQ_PM => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? # Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/MyAdaModule.pm', # retrieve abstract from module
AUTHOR => 'A. U. Thor <author#nonet>') : ()),
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => '-I.', # e.g., '-I. -I/usr/include/other'
LIBS => ['-L/usr/lib/gcc/i686-pc-linux-gnu/4.8.2/adalib/ -lgnat'],
MYEXTLIB => 'src/hello.a',
);
sub MY::postamble {
join("\n",
"\$(MYEXTLIB)::",
"\tmake -C src/",
"",
"clean::",
"\tmake -C src/ clean",
);
}
Now try
$ perl Makefile.PL
$ make
$ make test
And surprise: the test doesn't pass! The hello() symbol doesn't exist. Inspecting the MyAdaLib.so generated by make with the nm tool reveals that some symbols have been renamed. In my case, they were prefixed with _ada_. So I'd have to call _ada_hello() instead of hello(). This can be corrected in src/ada.ads using the Export pragma:
pragma Export
(Convention => C,
Entity => hello,
External_Name => "hello" );
From what I understood, this should be done for all public symbols as it ensures the representation of types, records, etc, is understood from a C program.
Now, you should be able to call hello() from the XSUB. Enjoy!

running PostgreSQL client in C from Cygwin

I'm trying to build a very simple PostgreSQL client in C over Cygwin.
Here's what I've done so far:
I've downloaded the PostgreSQL source code version 9.1.2 (to match the same version that is running on my server)
I've configured and compiled the source code from Cygwin. The compilation seemed to go smoothly.
From what I can tell, the header files are in:
/cygdrive/c/workspace/src/postgresql-9.1.2/src/interfaces/libpq, and
/cygdrive/c/workspace/src/postgresql-9.1.2/src/include
The libraries are in:
/cygdrive/c/workspace/src/postgresql-9.1.2/src/interfaces/libpq
From here, I compiled and linked the client program using the makefile below:
testlibpq: testlibpq.c
gcc -o testlibpq -I /cygdrive/c/workspace/src/postgresql-9.1.2/src/interfaces/libpq -I /cygdrive/c/workspace/src/postgresql-9.1.2/src/include -L /cygdrive/c/workspace/src/postgresql-9.1.2/src/interfaces/libpq testlibpq.c -Bstatic -lpq
The compilation and the linking succeeded without errors or warnings.
However, when I try to run the program, I get the following error:
$ ./testlibpq
/cygdrive/c/Users/dleclair/Dropbox/denis/src/testlibpq/testlibpq.exe: error while loading shared libraries: cygpq.dll: cannot open shared object file: No such file or directory
I haven't figured out how to fix this. Any pointers would be greatly appreciated.
Oh, one more thing, I found the folder that cygpq.dll was sitting in and set my LD_LIBRARY_PATH to point to it but it still gave me the same result.
dleclair#dleclair-win7l ~/Dropbox/denis/src/testlibpq
$ ls /cygdrive/c/workspace/src/postgresql-9.1.2/src/interfaces/libpq
bcc32.mak encnames.o fe-connect.o fe-misc.o fe-protocol3.o ip.o libpq-events.c md5.c pgstrcasecmp.c pqsignal.c thread.o
blibpqdll.def exports.txt fe-exec.c fe-print.c fe-secure.c libpq.a libpq-events.h md5.o pgstrcasecmp.o pqsignal.h wchar.c
chklocale.c fe-auth.c fe-exec.o fe-print.o fe-secure.o libpq.rc.in libpq-events.o nls.mk po pqsignal.o wchar.o
chklocale.o fe-auth.h fe-lobj.c fe-protocol2.c inet_net_ntop.c libpqddll.def libpq-fe.h noblock.c pqexpbuffer.c pthread-win32.c win32.c
cygpq.dll fe-auth.o fe-lobj.o fe-protocol2.o inet_net_ntop.o libpq-dist.rc libpq-int.h noblock.o pqexpbuffer.h README win32.h
encnames.c fe-connect.c fe-misc.c fe-protocol3.c ip.c libpqdll.def Makefile pg_service.conf.sample pqexpbuffer.o thread.c win32.mak
dleclair#dleclair-win7l ~/Dropbox/denis/src/testlibpq
$ echo $LD_LIBRARY_PATH
/cygdrive/c/workspace/src/postgresql-9.1.2/src/interfaces/libpq
dleclair#dleclair-win7l ~/Dropbox/denis/src/testlibpq
Normally on unix/linux systems after building the source a make install is done which copies the headers to standard locations like /usr/local/include and /usr/local/lib. You may have to do that on cygwin to to get the DLL in the search path.
Or you can just locate the DLL yourself and put it on the search path or in the same folder as your executable.