DBD-Oracle (1.74 or 1.76) with oracle instantclient 11.2 on win10 wsl ubuntu
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
I found this question while investigating a similar issue.From what I see here: https://github.com/microsoft/WSL/issues/2294There 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.sqluser@machine:~$ /usr/bin/sqlplus -S /nolog @mydefine.sqlDEFINE _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 suroot@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-0root@machine:DBD-Oracle-1.80-0# perl Makefile.PL...root@machine:DBD-Oracle-1.80-0# makeroot@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/sqlplusroot@machine:DBD-Oracle-1.80-0# exitexituser@machine:~$