Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DBD-Oracle (1.74 or 1.76) with oracle instantclient 11.2 on win10 wsl ubuntu

I am trying to install DBD::Oracle, either 1.74 or 1.76 on an ubuntu wsl bash on windows 10.

I am on a 64 architecture, and sqlplus64 is working and I can connect to my database!

Installation with cpanm or installing with carton or trying to compile with perl Makeperl.pm -l does not work and always results in the same error.

Using Oracle in /usr/lib/oracle/11.2/client64 -> FAIL Timed out (> 60s). Use --verbose to retry. -> N/A

I have tried following:

  1. I have tried to elevate folder permissions but no luck.
  2. I am behind a corporate proxy other packages have installed fine, but I also tried with mobile connection on the wild internet, no luck either.

Here is my build.log

cpanm (Menlo) 1.9019 on perl 5.018002 built for x86_64-linux
Work directory is /home/user1/.cpanm/work/1558699904.1138
You have make /usr/bin/make
You have LWP: 6.39
You have LWP::Protocol::https: 6.07
You have /bin/tar: tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
--> Working on /mnt/c/project/
Entering /mnt/c/project
Configuring /mnt/c/project
-> OK
Checking if you have Try::Tiny 0.24 ... Yes (0.27)
Checking if you have Tie::IxHash 1.23 ... Yes (1.23)
Checking if you have Image::Size 3.300 ... Yes (3.300)
Checking if you have Dancer2 0.203001 ... Yes (0.203001)
Checking if you have HTTP::Request 0 ... Yes (6.11)
Checking if you have Test::Fixture::DBI 0 ... Yes (0.09)
Checking if you have Net::SSLeay 1.88 ... Yes (1.88)
Checking if you have Plack::Middleware::CrossOrigin 0.012 ... Yes (0.012)
Checking if you have Date::Format 2.24 ... Yes (2.24)
Checking if you have Dancer2::Plugin::Database 2.16 ... Yes (2.17)
Checking if you have MIME::Lite 3.030 ... Yes (3.030)
Checking if you have Crypt::JWT 0.018 ... Yes (0.018)
Checking if you have JSON 0 ... Yes (2.90)
Checking if you have LockFile::Simple 0.208 ... Yes (0.208)
Checking if you have DBD::Oracle 1.74 ... No
Checking if you have Date::Language 1.10 ... Yes (1.10)
Checking if you have HTML::TreeBuilder 5.03 ... Yes (5.03)
Checking if you have Date::DayOfWeek 1.22 ... Yes (1.22)
Checking if you have Data::Serializer 0.60 ... Yes (0.60)
Checking if you have Date::Manip 6.54 ... Yes (6.56)
Checking if you have Locale::Maketext 0 ... Yes (1.23)
Checking if you have Time::Piece 0 ... Yes (1.20_01)
Checking if you have Redis 1.991 ... Yes (1.991)
Checking if you have Unicode::String 2.09 ... Yes (2.10)
Checking if you have LWP::Protocol::https 6.06 ... Yes (6.06)
Checking if you have Date::Calc 6.4 ... Yes (6.4)
Checking if you have Test::More 0 ... Yes (0.98)
Checking if you have MooX::Types::MooseLike 0.29 ... Yes (0.29)
Checking if you have MIME::Types 2.13 ... Yes (2.13)
Checking if you have LWP::UserAgent 0 ... Yes (6.15)
Checking if you have Algorithm::Diff 1.1903 ... Yes (1.1903)
Checking if you have Moo 2.002004 ... Yes (2.002004)
Checking if you have Starman 0.4014 ... Yes (0.4014)
==> Found dependencies: DBD::Oracle
Searching DBD::Oracle on mirror index /mnt/c/project/local/cache/modules/02packages.details.txt ...
--> Working on DBD::Oracle
Fetching http://cpan.metacpan.org/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.74.tar.gz
-> OK
Unpacking DBD-Oracle-1.74.tar.gz
Copying DBD-Oracle-1.74.tar.gz to /mnt/c/project/local/cache/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.74.tar.gz
Entering DBD-Oracle-1.74
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.18)
Checking if you have DBI 1.51 ... Yes (1.631)
Configuring DBD-Oracle-1.74
Running Makefile.PL
Multiple copies of Driver.xst found in: /mnt/c/project/local/lib/perl5/x86_64-linux/auto/DBI/ /home/user1/.plenv/versions/5.18.2/lib/perl5/site_perl/5.18.2/x86_64-linux/auto/DBI/ at Makefile.PL line 39.
Using DBI 1.631 (for perl 5.018002 on x86_64-linux) installed in /mnt/c/project/local/lib/perl5/x86_64-linux/auto/DBI/

Configuring DBD::Oracle for perl 5.018002 on linux (x86_64-linux)

Remember to actually *READ* the README file! Especially if you have any problems.

Installing on a linux, Ver#4.4
Using Oracle in /usr/lib/oracle/11.2/client64
-> FAIL Timed out (> 60s). Use --verbose to retry.
-> N/A
Checking dependencies from META.json ...
Checking if you have DBI 1.51 ... Yes (1.631)
Checking if you have warnings 0 ... Yes (1.18)
Checking if you have Exporter 0 ... Yes (5.68)
Checking if you have strict 0 ... Yes (1.07)
Checking if you have DynaLoader 0 ... Yes (1.18)
-> FAIL Configure failed for DBD-Oracle-1.74. See /home/user1/.cpanm/work/1558699904.1138/build.log for details.
-> FAIL Installing the dependencies failed: Module 'DBD::Oracle' is not installed
-> FAIL Bailing out the installation for /mnt/c/project/.

Running perl Makefile.PL -F -v (force verbose) stops after it outputs PATH:

Using DBI 1.642 (for perl 5.018002 on x86_64-linux) installed in /home/user1/.plenv/versions/5.18.2/lib/perl5/site_perl/5.18.2/x86_64-linux/auto/DBI/

Configuring DBD::Oracle for perl 5.018002 on linux (x86_64-linux)

Remember to actually *READ* the README file! Especially if you have any problems.

Installing on a linux, Ver#4.4
Using Oracle in /usr/lib/oracle/11.2/client64
PATH=/usr/lib/oracle/11.2/client64/bin:/usr/lib/oracle/11.2/client64:/home/user1/.plenv/versions/5.18.2/bin:/home/user1/.plenv/libexec:/home/user1/.plenv/plugins/perl-build/bin:/home/user1/.plenv/shims:/home/user1/.plenv/bin:/home/user1/.nodenv/shims:/home/user1/.nodenv/bin:/home/user1/.rbenv/shims:/home/user1/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgsc:/mnt/c/Program Files (x86)/Nmap:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath_target_937390:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/user1/AppData/Local/Microsoft/WindowsApps

Latest output with cpanm --verbose --build-timeout

$ cpanm DBD::[email protected] --verbose --build-timeout 3600
cpanm (App::cpanminus) 1.7044 on perl 5.018002 built for x86_64-linux
Work directory is /home/user1/.cpanm/work/1559491379.298
You have make /usr/bin/make
You have LWP 6.39
You have /bin/tar: tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching DBD::Oracle (== 1.74) on cpanmetadb ...
--> Working on DBD::Oracle
Fetching http://backpan.perl.org/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.74.tar.gz ... OK
Unpacking DBD-Oracle-1.74.tar.gz
DBD-Oracle-1.74/
DBD-Oracle-1.74/lib/
DBD-Oracle-1.74/lib/DBD/
DBD-Oracle-1.74/lib/DBD/Oracle.pm
DBD-Oracle-1.74/lib/DBD/Oracle/
DBD-Oracle-1.74/lib/DBD/Oracle/GetInfo.pm
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Win32.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Vms.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Hpux.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Aix.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Sun.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Macos.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Linux.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Cygwin.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Win64.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Object.pm
DBD-Oracle-1.74/oci.def
DBD-Oracle-1.74/Makefile.PL
DBD-Oracle-1.74/MANIFEST
DBD-Oracle-1.74/ocitrace.h
DBD-Oracle-1.74/Changes
DBD-Oracle-1.74/LICENSE
DBD-Oracle-1.74/README.help.txt
DBD-Oracle-1.74/README.mkdn
DBD-Oracle-1.74/CONTRIBUTING.mkd
DBD-Oracle-1.74/INSTALL
DBD-Oracle-1.74/Oracle.xs
DBD-Oracle-1.74/CONTRIBUTORS
DBD-Oracle-1.74/META.json
DBD-Oracle-1.74/oci8.c
DBD-Oracle-1.74/META.yml
DBD-Oracle-1.74/Oracle.h
DBD-Oracle-1.74/dbivport.h
DBD-Oracle-1.74/typemap
DBD-Oracle-1.74/t/
DBD-Oracle-1.74/t/23wide_db_al32utf8.t
DBD-Oracle-1.74/t/00versions.t
DBD-Oracle-1.74/t/22nchar_al32utf8.t
DBD-Oracle-1.74/t/31lob.t
DBD-Oracle-1.74/t/lib/
DBD-Oracle-1.74/t/lib/ExecuteArray.pm
DBD-Oracle-1.74/t/10general.t
DBD-Oracle-1.74/t/28array_bind.t
DBD-Oracle-1.74/t/26exe_array.t
DBD-Oracle-1.74/t/14threads.t
DBD-Oracle-1.74/t/rt74753-utf8-encoded.t
DBD-Oracle-1.74/t/23wide_db.t
DBD-Oracle-1.74/t/22nchar_utf8.t
DBD-Oracle-1.74/t/31lob_extended.t
DBD-Oracle-1.74/t/000-report-versions-tiny.t
DBD-Oracle-1.74/t/12impdata.t
DBD-Oracle-1.74/t/36lob_leak.t
DBD-Oracle-1.74/t/24implicit_utf8.t
DBD-Oracle-1.74/t/38taf.t
DBD-Oracle-1.74/t/21nchar.t
DBD-Oracle-1.74/t/70meta.t
DBD-Oracle-1.74/t/15nls.t
DBD-Oracle-1.74/t/39attr.t
DBD-Oracle-1.74/t/rt85886.t
DBD-Oracle-1.74/t/34pres_lobs.t
DBD-Oracle-1.74/t/56embbeded.t
DBD-Oracle-1.74/t/40ph_type.t
DBD-Oracle-1.74/t/55nested.t
DBD-Oracle-1.74/t/30long.t
DBD-Oracle-1.74/t/32xmltype.t
DBD-Oracle-1.74/t/58object.t
DBD-Oracle-1.74/t/50cursor.t
DBD-Oracle-1.74/t/80ora_charset.t
DBD-Oracle-1.74/t/51scroll.t
DBD-Oracle-1.74/t/01base.t
DBD-Oracle-1.74/t/20select.t
DBD-Oracle-1.74/t/nchar_test_lib.pl
DBD-Oracle-1.74/t/23wide_db_8bit.t
DBD-Oracle-1.74/t/60reauth.t
DBD-Oracle-1.74/t/rt13865.t
DBD-Oracle-1.74/t/25plsql.t
DBD-Oracle-1.74/examples/
DBD-Oracle-1.74/examples/japh
DBD-Oracle-1.74/examples/oradump.pl
DBD-Oracle-1.74/examples/ora_explain.pl
DBD-Oracle-1.74/examples/commit.pl
DBD-Oracle-1.74/examples/bind.pl
DBD-Oracle-1.74/examples/curref.pl
DBD-Oracle-1.74/examples/ex.pl
DBD-Oracle-1.74/examples/read_long_via_blob_read.pl
DBD-Oracle-1.74/examples/tabinfo.pl
DBD-Oracle-1.74/examples/proc.pl
DBD-Oracle-1.74/examples/sql
DBD-Oracle-1.74/examples/mktable.pl
DBD-Oracle-1.74/examples/inserting_longs.pl
DBD-Oracle-1.74/examples/README
DBD-Oracle-1.74/mkta.pl
DBD-Oracle-1.74/Todo
DBD-Oracle-1.74/dbdimp.h
DBD-Oracle-1.74/hints/
DBD-Oracle-1.74/hints/macos_syms.pl
DBD-Oracle-1.74/hints/macos_bundle.syms
DBD-Oracle-1.74/hints/macos_lib.syms
DBD-Oracle-1.74/hints/dgux.pl
DBD-Oracle-1.74/hints/svr4.pl
DBD-Oracle-1.74/dbdimp.c
DBD-Oracle-1.74/README
Entering DBD-Oracle-1.74
Checking configure dependencies from META.json
Checking if you have DBI 1.51 ... Yes (1.642)
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.36)
Running Makefile.PL
Configuring DBD-Oracle-1.74 ... Using DBI 1.642 (for perl 5.018002 on x86_64-linux) installed in /home/user1/.plenv/versions/5.18.2/lib/perl5/site_perl/5.18.2/x86_64-linux/auto/DBI/

Configuring DBD::Oracle for perl 5.018002 on linux (x86_64-linux)

Remember to actually *READ* the README file! Especially if you have any problems.

Installing on a linux, Ver#4.4
Using Oracle in /usr/lib/oracle/11.2/client64
BLINKIN CURSOR LONGER THAN 5 HOURS ...
like image 654
mahatmanich Avatar asked May 24 '19 13:05

mahatmanich


2 Answers

From what I have seen here https://github.com/perl-carton/carton/issues/139 this could be the issue.

Add --build-timeout with a very large value to avoid timeout, also you can try with cpan instead of cpanm.

EDIT:

There are three arguments concerning timeout for different parts of the build:

--configure-timeout, --build-timeout, --test-timeout

They should be passed as arguments to cpanm.

Source: https://metacpan.org/pod/distribution/App-cpanminus/bin/cpanm

like image 107
8 revs, 2 users 84% Avatar answered Nov 12 '22 12:11

8 revs, 2 users 84%


I found this question while investigating a similar issue. From what I see here: https://github.com/microsoft/WSL/issues/2294 There is an issue with "assignment of the result of a subprocess to a variable hangs"

I reviewed the Makefile.PL and ~line 1635 I found

        open FH, ">define.sql" or warn "Can't create define.sql: $!";
        print FH "DEFINE _SQLPLUS_RELEASE\nQUIT\n";
        close FH;
        my $sqlplus_release = `$sqlplus_exe -S /nolog \@define.sql 2>&1`;

I ran a quick test locally

user@machine:~$ echo -e "DEFINE _SQLPLUS_RELEASE\nQUIT\n" > mydefine.sql
user@machine:~$ /usr/bin/sqlplus -S /nolog @mydefine.sql
DEFINE _SQLPLUS_RELEASE = "1903000000" (CHAR)
user@machine:~$ perl -e 'print `/usr/bin/sqlplus -S /nolog \@mydefine.sql`'
    <hangs forever>

SO... now we know there's an issue when sqlplus exists the output cannot be assigned to a variable.

After reviewing Makefile.PL, sqlplus is only being used to determine the version of oracle installed. I decided to try a hack to get around the issue. This worked for me, but your mileage may vary. You will need to vary the commands for your oracle client installation.

  • Rename the sqlplus executable so it cannot be used.
  • Install the (previously downloaded) DBD:Oracle source manually
  • Rename the sqlplus executable so it is available again.

user@machine:~$ sudo su
root@machine:~# mv /usr/lib/oracle/19.3/client64/bin/sqlplus /usr/lib/oracle/19.3/client64/bin/sqlplusx 
root@machine:~# cd /home/user/.cpan/build/DBD-Oracle-1.80-0
root@machine:DBD-Oracle-1.80-0# perl Makefile.PL
...
root@machine:DBD-Oracle-1.80-0# make
root@machine:DBD-Oracle-1.80-0# make install
... SUCCESS ...
root@machine:DBD-Oracle-1.80-0# mv /usr/lib/oracle/19.3/client64/bin/sqlplusx /usr/lib/oracle/19.3/client64/bin/sqlplus
root@machine:DBD-Oracle-1.80-0# exit
exit
user@machine:~$
like image 39
NerdWrangler Avatar answered Nov 12 '22 11:11

NerdWrangler