Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to compile DBD::Oracle [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jrittenh
Tux's lil' helper
Tux's lil' helper


Joined: 10 Feb 2005
Posts: 92

PostPosted: Tue May 14, 2013 3:45 pm    Post subject: Unable to compile DBD::Oracle [Solved] Reply with quote

I'm fairly confident this is probably a configuration issue, but I'm unable to compile DBD::Oracle, either via g-cpan, or directly from source. All the checks are fine, but fails at:

Failed Step:
Running Mkbootstrap for DBD::Oracle ()
/usr/bin/perl5.12.4 /usr/lib64/perl5/vendor_perl/5.12.4/ExtUtils/xsubpp  -typemap /usr/lib64/perl5/5.12.4/ExtUtils/typemap -typemap typemap  Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c


with the following messages:

Error:
In file included from dbdimp.c:21:0:
Oracle.h:37:17: fatal error: oci.h: No such file or directory
compilation terminated.
In file included from oci8.c:12:0:
Oracle.h:37:17: fatal error: oci.h: No such file or directory
compilation terminated.


I've tried dropping oci.h in various places in the code directory itself when compiling manually, but it hasn't helped, and really, I'd prefer to get it working through g-cpan anyway. I've installed dev-db/oracle-instantclient-basic and dev-db/oracle-instantclient-sqlplus (and dev-db/oracle-instantclient-jdbc and dev-db/oracle-instantclient-odbc in an attempt to find something to make DBD::Oracle work). Any ideas are appreciated. I've included the full build log and all the emerge info below.

/var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/temp/build.log:
 * Package:    perl-gcpan/DBD-Oracle-1.62
 * Repository: x-jrittenh
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   sandbox
>>> Unpacking source...
>>> Unpacking DBD-Oracle-1.62.tar.gz to /var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/work
>>> Source unpacked in /var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/work
>>> Preparing source in /var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/work/DBD-Oracle-1.62 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/work/DBD-Oracle-1.62 ...
 * Using ExtUtils::MakeMaker
 * perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor INSTALLMAN3DIR=none DESTDIR=/var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/image/
Using DBI 1.623 (for perl 5.012004 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/vendor_perl/5.12.4/x86_64-linux-thread-multi/auto/DBI/

Configuring DBD::Oracle for perl 5.012004 on linux (x86_64-linux-thread-multi)

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

Installing on a linux, Ver#3.7
Using Oracle in /usr/lib64/oracle/11.2.0.3/client
DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
Oracle version 11.2.0.3 (11.2)
Found /usr/lib64/oracle/11.2.0.3/client/rdbms/demo/demo_xe.mk
Using /usr/lib64/oracle/11.2.0.3/client/rdbms/demo/demo_xe.mk
Looks like Oracle XE (/usr/lib64/oracle/11.2.0.3/client/rdbms/demo/demo_xe.mk)
Reading /usr/lib64/oracle/11.2.0.3/client/rdbms/demo/demo_xe.mk
Your LD_LIBRARY_PATH env var is set to '/usr/lib64/oracle/11.2.0.3/client/lib'

client_version=11.2


DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.3\" -DORA_OCI_102 -DORA_OCI_112


Checking for functioning wait.ph


System: perl5.012004 linux lib-1653 3.7.10-gentoo #1 smp tue mar 12 11:28:03 edt 2013 x86_64 intel(r) core(tm) i7-3770 cpu @ 3.40ghz genuineintel gnulinux
Compiler:   x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Linker:     /usr/bin/ld
Sysliblist:
Oracle makefiles would have used these definitions but we override them:
  CC:       /usr/bin/gcc
  LDFLAGS:  -g
           [-g]
Linking with -L/usr/lib64/oracle/11.2.0.3/client/lib -locci -lclntsh -lpthread

Checking if your kit is complete...
Looks good
LD_RUN_PATH=/usr/lib64/oracle/11.2.0.3/client/lib
Using DBD::Oracle 1.62.
Using DBD::Oracle 1.62.
Using DBI 1.623 (for perl 5.012004 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/vendor_perl/5.12.4/x86_64-linux-thread-multi/auto/DBI/
Writing Makefile for DBD::Oracle
Writing MYMETA.yml and MYMETA.json

***  If you have problems...
     read all the log printed above, and the README and README.help.txt files.
     (Of course, you have read README by now anyway, haven't you?)

>>> Source configured.
>>> Compiling source in /var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/work/DBD-Oracle-1.62 ...
 * emake OTHERLDFLAGS=-Wl,-O1 -Wl,--as-needed
make -j9 'OTHERLDFLAGS=-Wl,-O1 -Wl,--as-needed'
/usr/bin/perl5.12.4 -p -e "s/~DRIVER~/Oracle/g" /usr/lib64/perl5/vendor_perl/5.12.4/x86_64-linux-thread-multi/auto/DBI/Driver.xst > Oracle.xsi
x86_64-pc-linux-gnu-gcc -c  -I/usr/lib64/perl5/vendor_perl/5.12.4/x86_64-linux-thread-multi/auto/DBI -I/usr/lib64/oracle/11.2.0.3/client/ -DLINUX -D_GNU_SOURCE -D_REENTRANT -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=native -O2 -pipe   -DVERSION=\"1.62\" -DXS_VERSION=\"1.62\" -fPIC "-I/usr/lib64/perl5/5.12.4/x86_64-linux-thread-multi/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.3\" -DORA_OCI_102 -DORA_OCI_112 dbdimp.c
x86_64-pc-linux-gnu-gcc -c  -I/usr/lib64/perl5/vendor_perl/5.12.4/x86_64-linux-thread-multi/auto/DBI -I/usr/lib64/oracle/11.2.0.3/client/ -DLINUX -D_GNU_SOURCE -D_REENTRANT -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=native -O2 -pipe   -DVERSION=\"1.62\" -DXS_VERSION=\"1.62\" -fPIC "-I/usr/lib64/perl5/5.12.4/x86_64-linux-thread-multi/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.3\" -DORA_OCI_102 -DORA_OCI_112 oci8.c
Running Mkbootstrap for DBD::Oracle ()
/usr/bin/perl5.12.4 /usr/lib64/perl5/vendor_perl/5.12.4/ExtUtils/xsubpp  -typemap /usr/lib64/perl5/5.12.4/ExtUtils/typemap -typemap typemap  Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c
In file included from oci8.c:12:0:
Oracle.h:37:17: fatal error: oci.h: No such file or directory
compilation terminated.
make: *** [oci8.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from dbdimp.c:21:0:
Oracle.h:37:17: fatal error: oci.h: No such file or directory
compilation terminated.
make: *** [dbdimp.o] Error 1
chmod 644 Oracle.bs
cp lib/DBD/Oracle/Troubleshooting/Cygwin.pod blib/lib/DBD/Oracle/Troubleshooting/Cygwin.pod
cp lib/DBD/Oracle.pm blib/lib/DBD/Oracle.pm
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp lib/DBD/Oracle/Troubleshooting/Hpux.pod blib/lib/DBD/Oracle/Troubleshooting/Hpux.pod
cp lib/DBD/Oracle/Troubleshooting/Vms.pod blib/lib/DBD/Oracle/Troubleshooting/Vms.pod
cp lib/DBD/Oracle/Troubleshooting/Linux.pod blib/lib/DBD/Oracle/Troubleshooting/Linux.pod
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
cp lib/DBD/Oracle/Troubleshooting.pod blib/lib/DBD/Oracle/Troubleshooting.pod
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp lib/DBD/Oracle/Troubleshooting/Sun.pod blib/lib/DBD/Oracle/Troubleshooting/Sun.pod
cp lib/DBD/Oracle/Troubleshooting/Macos.pod blib/lib/DBD/Oracle/Troubleshooting/Macos.pod
cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm
cp lib/DBD/Oracle/Troubleshooting/Aix.pod blib/lib/DBD/Oracle/Troubleshooting/Aix.pod
cp lib/DBD/Oracle/Troubleshooting/Win64.pod blib/lib/DBD/Oracle/Troubleshooting/Win64.pod
cp lib/DBD/Oracle/Troubleshooting/Win32.pod blib/lib/DBD/Oracle/Troubleshooting/Win32.pod
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
emake failed
 * ERROR: perl-gcpan/DBD-Oracle-1.62 failed (compile phase):
 *   Compilation failed
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 2573:  Called perl-module_src_compile
 *   environment, line 2192:  Called die
 * The specific snippet of code:
 *               emake "$@" || die "Compilation failed";
 *
 * If you need support, post the output of `emerge --info '=perl-gcpan/DBD-Oracle-1.62'`,
 * the complete build log and the output of `emerge -pqv '=perl-gcpan/DBD-Oracle-1.62'`.
 * This ebuild is from an overlay named 'x-jrittenh': '/usr/local/portage/jrittenh/'
 * The complete build log is located at '/var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/temp/environment'.
 * Working directory: '/var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/work/DBD-Oracle-1.62'
 * S: '/var/tmp/portage/perl-gcpan/DBD-Oracle-1.62/work/DBD-Oracle-1.62'


emerge --info '=perl-gcpan/DBD-Oracle-1.62':
Portage 2.1.11.62 (default/linux/amd64/13.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.7.10-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.7.10-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:     8118088 total,    287348 free
KiB Swap:    8388604 total,   8364480 free
Timestamp of tree: Tue, 14 May 2013 06:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-jrittenh sunrise mpd steam-overlay desktop-effects bleeding-edge bitcoin
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE dlj-1.1 sun-bcla-java-vm googleearth AdobeFlash-10 AdobeFlash-10.1 AdobeFlash-10.3 google-chrome AdobeFlash-11.x Intel-SDP"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --keep-going --quiet-build=y --jobs=5"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" ftp://ftp.ussg.iu.edu/pub/linux/gentoo/ http://mirror.mcs.anl.gov/pub/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ http://lug.mtu.edu/gentoo/ ftp://lug.mtpu.edu/gentoo/ "
LANG="en_US.utf8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/jrittenh /var/lib/layman/sunrise /var/lib/layman/mpd /var/lib/layman/steam /var/lib/layman/desktop-effects /var/lib/layman/bleeding-edge /var/lib/layman/bitcoin"
SYNC="rsync://rsync25.us.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 ao apache2 artworkextra aspell bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdr cleartype cli colord consolekit cracklib crypt css cups curl custom-optimization cxx dbus dri dts dv dvd dvdr eds emboss emerald encode esd evo exif fam ffmpeg firefox flac fortran fuse gd gdbm gif gimp git gnome gnome-keyring gnome-online-accounts gnutls gpm gsm gstreamer gtk gtkspell guile hddtemp iconv icu id3tag ipv6 jack java jbig jpeg jpeg2k lame lcms ldap libnotify libsecret lm_sensors mad mmx mng modplug modules mono moonlight mp3 mp4 mpeg mudflap multilib musepack mysql nautilus ncurses networking nls nptl nsplugin nspluginwrapper ogg opengl openmp pam pango pcre pdf perl php png policykit ppds pulseaudio python qt3support qt4 quicktime raw readline rss samba schroedinger sdl session socialweb speechd speex spell sqlite sse sse2 sse3 ssh ssl startup-notification subversion svg syslog tcpd theora tiff truetype udev udisks unicode upower usb v4l v4l2 vcd vcdinfo vcdx vorbis wav wavpack webgl wma wxwidgets x264 xcb xcomposite xinerama xml xprint xulrunner xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


emerge -pqv '=perl-gcpan/DBD-Oracle-1.62':
[ebuild  N    ] perl-gcpan/DBD-Oracle-1.62


Last edited by jrittenh on Tue May 14, 2013 7:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue May 14, 2013 4:10 pm    Post subject: Reply with quote

Quote:
I've installed dev-db/oracle-instantclient-basic and dev-db/oracle-instantclient-sqlplus (and dev-db/oracle-instantclient-jdbc and dev-db/oracle-instantclient-odbc in an attempt to find something to make DBD::Oracle work).


Have you tried installing oracle-instantclient-sdk?
The missing header file 'oci.h' is part of the 'sdk' package.
Back to top
View user's profile Send private message
jrittenh
Tux's lil' helper
Tux's lil' helper


Joined: 10 Feb 2005
Posts: 92

PostPosted: Tue May 14, 2013 4:22 pm    Post subject: Reply with quote

I believe that's supposed to be a part of oracle-instantclient-basic, and I have oci.h installed under /usr/lib64/oracle/11.2.0.3/client/rdbms/public/oci.h (and client/include is symlinked to rdbms/public). If I compare the SDK zip files ./include directory to /usr/lib64/oracle/11.2.0.3/client/include, the only difference is the SDK includes an ldap file.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue May 14, 2013 5:45 pm    Post subject: Reply with quote

OK, I can reproduce your problem.

I just installed dev-db/oracle-instantclient-basic-11.2.0.3 and dev-db/oracle-instantclient-sqlplus-11.2.0.3.
When I try to install DBD::Oracle 1.36 with "perl Makefile.PL" and "make", I get the error message that "oci.h" is missing.

The reason is that Makefile.PL does not write the correct Oracle include path to Makefile.

A quick fix is to set the include path manually:

Code:
export C_INCLUDE_PATH="/usr/lib64/oracle/11.2.0.3/client/include"
perl Makefile.PL
make
make install


I guess this trick will also work for ORACLE::DBD 1.62.
Back to top
View user's profile Send private message
jrittenh
Tux's lil' helper
Tux's lil' helper


Joined: 10 Feb 2005
Posts: 92

PostPosted: Tue May 14, 2013 7:38 pm    Post subject: Reply with quote

Awesome...exporting the C_INCLUDE_PATH worked for g-cpan as well. Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum