CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: DBI:
Compiled DBD::Oracle throwing Segmentation Fault (core dumped)



Mar 6, 2013, 11:34 PM

Post #1 of 3 (20535 views)
Compiled DBD::Oracle throwing Segmentation Fault (core dumped) Can't Post

Hello Everyone,

Am trying to compile DBD:Oracle particular version and its dependencies so that it works with Oracle 11gR2 client.

Here are the steps I did and issue towards end:

Downloaded ExtUtils-MakeMaker-6.56, DBI-1.54 and DBD-Oracle-1.24

My Perl Version - v5.8.8 built for sun4-solaris-thread-multi-64int

<Setting up environment>
# export PERL5LIB=/opt/myperl/lib/

<oracle_home is set to 11gR2 64-bit client>
# export ORACLE_HOME=/oracle11g/app/ora11g/product/11.2.0/client_1/

<LD_LIBRARY_PATH is set to 11gR2 32-bit client this is because am using 32-bit perl and hence for compilation of this will be required>
export LD_LIBRARY_PATH=/ora11gR2/app/ora11gR2/product/11.2.0/client_1/lib/

<Installing ExtUtils-MakeMaker>
# cd ExtUtils-MakeMaker-6.56
# perl Makefile.PL
# make
# make install
<Installing DBI-1.54>
# cd DBI-1.54
# perl Makefile.PL
# make
gcc -c -D_REENTRANT -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"1.54\" -DXS_VERSION=\"1.54\" -fPIC "-I/opt/myperl/lib/5.8.8/sun4-solaris-thread-multi-64int/CORE" -W -Wall -Wpointer-arith -Wbad-function-cast -Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn -Wno-unused-parameter Perl.c
sh: gcc: not found
*** Error code 1
make: Fatal error: Command failed for target `Perl.o'

<Installed gcc in /usr/local/bin
# gcc -v
Thread model: posix
gcc version 3.4.6

# export PATH=/usr/local/bin/:$PATH
# make
# make install

<Installing DBD-Oracle-1.24>
# cd DBD-Oracle-1.24
# perl Makefile.PL
Oracle version (11.2) Unable to locate an, or other suitable *.mk file in your Oracle installation. (I looked in /oracle11g/app/ora11g/product/11.2.0/client_1/rdbms/demo/ /oracle11g/app/ora11g/product/11.2.0/client_1/precomp/demo/proc/ /oracle11g/app/ora11g/product/11.2.0/client_1/precomp/demo/proc/ /oracle11g/app/ora11g/product/11.2.0/client_1/proc/lib/ /oracle11g/app/ora11g/product/11.2.0/client_1/proc16/lib/ /usr/share/oracle/11.2/client/ /usr/share/oracle/11.2/client64/ under /oracle11g/app/ora11g/product/11.2.0/client_1) The (or file is part of the Oracle RDBMS product. The (or file is part of the Oracle Pro*C product. You need to build DBD::Oracle on a system which has one of these Oracle components installed. (Other *.mk files such as the env_*.mk files will not work.) Alternatively you can use Oracle Instant Client. In the unlikely event that a suitable *.mk file is installed somewhere non-standard you can specify where it is using the -m option: perl Makefile.PL -m /path/to/ See the appropriate README file for your OS for more information and some alternatives. at Makefile.PL line 1095.

Followed ReadMe and then used flag -l
# perl Makefile.PL -l
# make
# make install

Now with all these compiled and installed modules I try to connect to database with a simple perl file and it throws 'Segmentation Fault' error.

# perl
Segmentation Fault (core dumped)
# pstack core
core 'core' of 20119: perl
fef4fdd4 XS_DBD__Oracle__dr_init_oci (137110, 374910, 247b28, 2, 140d4c, 373a08) + ac
00092d80 Perl_pp_entersub (137110, 247b2c, 80, 0, 247b24, 0) + 5c0
0008a4dc Perl_runops_standard (137110, ff400000, 0, 800000, 12c, 1cb0b0) + 2c
0002a458 S_run_body (137110, 1, 137110, 0, ff272a00, 2) + 13c
0002a0a0 perl_run (137110, 1, 2, ffbff9d4, 134c00, 2) + 8c 0002698c main (2, ffbff9d4, ffbff9e0, 1370f8, ff270100, 0) + b8 0002676c _start (0, 0, 0, 0, 0, 0) + 5c

What could be the cause of this issue? Compilation was good, so am not sure what might be am missing here?

Comments / Suggestions please?

Thanks in advance.

Regards - Neuron


Mar 13, 2013, 11:43 PM

Post #2 of 3 (20491 views)
Re: [Neuron9] Compiled DBD::Oracle throwing Segmentation Fault (core dumped) [In reply to] Can't Post

Any Suggestions?


Mar 18, 2013, 11:29 PM

Post #3 of 3 (20454 views)
Re: [Neuron9] Compiled DBD::Oracle throwing Segmentation Fault (core dumped) [In reply to] Can't Post

Can someone help me is this the correct set of folks am posting question to? Should I post to some other Forum section?



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives