Error using DBD::Oracle with instantclient 11.2 - oracle

I Want to use perl module DBD::Oracle on Mac OS X 10.8.
I installed DBI through CPAN.
Downloaded the Oracle instant client 11.2 (basic, sqlplus and jdk).
Extracted it to /usr/local/oracle.
$ ls /usr/local/oracle/instantclient_11_2/
BASIC_README libnnz11.dylib ojdbc6.jar
SQLPLUS_README libocci.dylib.11.1 sdk
adrci libociei.dylib sqlplus
genezi libocijdbc11.dylib uidrvci
glogin.sql libsqlplus.dylib xstreams.jar
libclntsh.dylib libsqlplusic.dylib
libclntsh.dylib.11.1 ojdbc5.jar
Then installed DBD::Oracle.
Now when I want to use DBD::Oracle it gives an error.
install_driver(Oracle) failed: Can't load '/Library/Perl/5.12/darwin-thread-multi-
2level/auto/DBD/Oracle/Oracle.bundle' for module DBD::Oracle:
dlopen(/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/Oracle/Oracle.bundle, 1):
Library not loaded: /ade/b/2649109290/oracle/rdbms/lib/libclntsh.dylib.11.1
Referenced from: /Library/Perl/5.12/darwin-thread-multi-
2level/auto/DBD/Oracle/Oracle.bundle
Reason: image not found at /System/Library/Perl/5.12/darwin-thread-multi-
2level/DynaLoader.pm line 204.
I have DYLD_LIBRARY_PATH=/usr/local/oracle/instaclient_11_2
I have not a clue what I am doing wrong.
SOLVED:
I got the same error when trying to run sqlplus. I added my oracle client directory to my global PATH variable and it is working now.
Saw they did the same in this tutorial: http://www.janhellevik.no/?p=521

Check this one out: perl DBD::Oracle Module installtion
Above information is about Linux Environment. But you might get some clues on how to go about configuring DBD::Oracle on MAC OSX.
On linux, you need "Basic, SQLPLUS and Devel" binaries of the oracle instant client. Here is the directory listing on my Linux box:
# pwd
/usr/lib/oracle/11.2/client64/lib
# ls -l
total 185232
-rw-r--r-- 1 root root 368 Sep 17 2011 glogin.sql
lrwxrwxrwx 1 root root 17 Jul 9 2012 libclntsh.so -> libclntsh.so.11.1
-rw-r--r-- 1 root root 52761218 Sep 17 2011 libclntsh.so.11.1
-rw-r--r-- 1 root root 7955322 Sep 17 2011 libnnz11.so
lrwxrwxrwx 1 root root 15 Jul 9 2012 libocci.so -> libocci.so.11.1
-rw-r--r-- 1 root root 1971762 Sep 17 2011 libocci.so.11.1
-rw-r--r-- 1 root root 118408281 Sep 17 2011 libociei.so
-rw-r--r-- 1 root root 164836 Sep 17 2011 libocijdbc11.so
-rw-r--r-- 1 root root 1503303 Sep 17 2011 libsqlplusic.so
-rw-r--r-- 1 root root 1477446 Sep 17 2011 libsqlplus.so
-rw-r--r-- 1 root root 2095661 Sep 17 2011 ojdbc5.jar
-rw-r--r-- 1 root root 2714016 Sep 17 2011 ojdbc6.jar
-rw-r--r-- 1 root root 300666 Sep 17 2011 ottclasses.zip
-rw-r--r-- 1 root root 66779 Sep 17 2011 xstreams.jar
and here is the list of oracle instant client RPMs that I installed:
# rpm -qa | grep -i oracle
oracle-instantclient11.2-basic-11.2.0.3.0-1
oracle-instantclient11.2-devel-11.2.0.3.0-1
oracle-instantclient11.2-sqlplus-11.2.0.3.0-1
Hope this helps.

Related

/lib/x86_64-linux-gnu/libm.so.6: undefined reference to `__strtof128_nan#GLIBC_PRIVATE'

I use catkin_make to compile a ros project, but it failed.
it shows that there are some problems when linking the library.
[ 98%] Linking CXX executable /home/kyxz2021/fleet/devel/lib/data_parser/data_parser_node
/lib/x86_64-linux-gnu/libm.so.6: undefined reference to `__strtof128_nan#GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status
i searched the error, someone said it might due to the inconsistency between libm version and libc version, but it is not the knot here.
***#ubuntu:~$ ll /lib/x86_64-linux-gnu/libm.so.6
lrwxrwxrwx 1 root root 12 May 16 20:52 /lib/x86_64-linux-gnu/libm.so.6 -> libm-2.23.so
***#ubuntu:~$ ll /lib/x86_64-linux-gnu/libc*
-rwxr-xr-x 1 root root 1868984 Jun 5 2020 /lib/x86_64-linux-gnu/libc-2.23.so*
lrwxrwxrwx 1 root root 14 Feb 11 2016 /lib/x86_64-linux-gnu/libcap.so.2 -> libcap.so.2.24
-rw-r--r-- 1 root root 23128 Oct 23 2015 /lib/x86_64-linux-gnu/libcap.so.2.24
lrwxrwxrwx 1 root root 21 Feb 11 2016 /lib/x86_64-linux-gnu/libcgmanager.so.0 -> libcgmanager.so.0.0.0
-rw-r--r-- 1 root root 141248 Jan 18 2016 /lib/x86_64-linux-gnu/libcgmanager.so.0.0.0
-rw-r--r-- 1 root root 190856 Jun 5 2020 /lib/x86_64-linux-gnu/libcidn-2.23.so
lrwxrwxrwx 1 root root 15 Jun 5 2020 /lib/x86_64-linux-gnu/libcidn.so.1 -> libcidn-2.23.so
lrwxrwxrwx 1 root root 17 Jan 22 2020 /lib/x86_64-linux-gnu/libcom_err.so.2 -> libcom_err.so.2.1
-rw-r--r-- 1 root root 14648 Jan 22 2020 /lib/x86_64-linux-gnu/libcom_err.so.2.1
-rw-r--r-- 1 root root 39224 Jun 5 2020 /lib/x86_64-linux-gnu/libcrypt-2.23.so
-rw-r--r-- 1 root root 2366112 Feb 17 10:21 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
lrwxrwxrwx 1 root root 22 Feb 11 2016 /lib/x86_64-linux-gnu/libcryptsetup.so.4 -> libcryptsetup.so.4.6.0
-rw-r--r-- 1 root root 158920 Sep 6 2017 /lib/x86_64-linux-gnu/libcryptsetup.so.4.6.0
lrwxrwxrwx 1 root root 16 Jun 5 2020 /lib/x86_64-linux-gnu/libcrypt.so.1 -> libcrypt-2.23.so
lrwxrwxrwx 1 root root 12 Jun 5 2020 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.23.so*
And the output of nm -AD /lib/x86_64-linux-gnu/lib{c,m}-2.23.so | grep __strtof128_nan is shown below.
***#ubuntu:~$ nm -AD /lib/x86_64-linux-gnu/lib{c,m}-2.23.so | grep __strtof128_nan
/lib/x86_64-linux-gnu/libm-2.23.so: U __strtof128_nan
i don't know how to solve the problem, i'd be appreciated if someone could help me.
This particular error seems to be from not having float128 support (aka quadmath). Check that your gcc version and libraries are new enough and have the right links. Since it's not a compile but linking error, perhaps you need to link against -lquadmath. But also, since your error msg seems to show the compilation target as custom code, do you need to be using quadmath?

"/etc/sudoers is world writable” on Mac OS Mojave

I have gone through a lot of google results. Let me explain what I have tried first. I am currently working on a corporate laptop. Mac OS Mojave 10.14.6.
Error that I get:
sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
ls -le /etc
-rwxrwxrwx 1 root wheel 179 Aug 18 2018 shells
drwxrwxrwx 4 root wheel 128 Aug 18 2018 snmp
drwxrwxrwx 5 root wheel 160 Nov 11 2019 ssh
drwxrwxrwx 6 root wheel 192 Nov 11 2019 ssl
-rwxrwxrwx 1 root wheel 257 Aug 18 2018 sudo_lecture
-rwxrwxrwx 1 root wheel 1630 Mar 11 11:51 sudoers
drwxrwxrwx 2 root wheel 64 Aug 18 2018 sudoers.d
drwxrwxrwx 4 root admin 128 Dec 25 2018 symantec
-rw-rw-rw-# 1 01244861 wheel 47 Feb 2 18:13 sysctl.conf
-rwxrwxrwx 1 root wheel 96 Aug 21 2018 syslog.conf
-rwxrwxrwx 1 root wheel 1316 Aug 18 2018 ttys
drwxrwxrwx 6 root wheel 192 Aug 18 2018 wfs
-rwxrwxrwx 1 root wheel 0 Aug 18 2018 xtab
-rwxrwxrwx 1 root wheel 126 Aug 18 2018 zprofile
-rwxrwxrwx 1 root wheel 207 Aug 18 2018 zshrc
I have changed permission using chmod 440 /etc/sudoers and chmod 777 /etc/sudoers and also using info and manually updating from the file properties.
I am using iTerm2 as my terminal.
echo $PATH
/Users/01244861/.yarn/bin:/Users/01244861/.nvm/versions/node/v10.13.0/bin:/usr/local/opt/node#10/bin:/usr/local/opt/node#10/bin:/usr/local/opt/node#10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/go/bin
echo $SHELL
/bin/zsh
My user permissions:
Is there anything else that I can do to fix this?
Thanks

Sybase 12.5 vs 15.0 client connect libraries: 10x slower insert using 15.0 when inserting into 15.7 ASE

I maintain some legacy code that runs on RH Linux that sends inserts over the network to a client's Sybase. We were using Sybase 12.5 libraries and have just migrated to use Sybase 15.0 client libraries.
My application logs the time at which it sends the insert over the network and also the time it get the acknowledgment back from the target Sybase. When using 12.5 libraries the time was ~5 ms, now with the 15.5 libraries it's roughly 50 ms.
The only change I've made on the application side is to specify the location of the interfaces file on the command line. Previously the file was located in the default location - the location of the Sybase installation. Now it's located where the application is deployed, hence the need to specify the location explicitly.
Would anyone have any idea what is causing the dramatic change in speed, or have hints on where I could look or ideas on how to trace the root cause?
Please forgive the lack of technical details. I'm not a DB admin but a developer using a compiled library to connect to Sybase and don't have access to the nitty-gritty internals. That being said, I'm using the same internal library in both cases, it's only the Sybase librairies that are different.
My Sybase 12.5 and 15 installations look like this:
$ ls -l /opt/sybase/
total 48
-rw-r--r-- 1 root root 555 Jul 2 2019 ASE150.csh
-rw-r--r-- 1 root root 259 Jul 2 2019 ASE150.env
-rw-r--r-- 1 root root 388 Jul 2 2019 ASE150.sh
drwxr-xr-x 10 root root 4096 Feb 2 2017 OCS-15_0
-rw-r--r-- 1 root root 555 Jul 2 2019 SYBASE.csh
-rw-r--r-- 1 root root 259 Jul 2 2019 SYBASE.env
-rw-r--r-- 1 root root 388 Jul 2 2019 SYBASE.sh
drwxr-xr-x 58 root root 4096 Jul 2 2019 charsets
drwxr-xr-x 3 root root 4096 Jul 2 2019 collate
drwxr-xr-x 2 root root 4096 Nov 23 20:55 config
-rw-r--r-- 1 root root 1239 Jul 2 2019 interfaces
drwxr-xr-x 5 root root 4096 Nov 23 20:55 locales
$ ls -l ~/12_5/sybase/
total 28
drwxrwxr-x 4 oadc oadc 4096 Nov 29 2017 OCS-12_5
drwxrwxr-x 58 oadc oadc 4096 Nov 29 2017 charsets
drwxrwxr-x 2 oadc oadc 4096 Mar 16 09:45 config
drwxrwxr-x 2 oadc oadc 4096 Mar 16 09:45 include
-r-xr-xr-x 1 oadc oadc 1184 Mar 16 09:45 interfaces
drwxrwxr-x 2 oadc oadc 4096 Mar 16 09:45 lib
drwxrwxr-x 5 oadc oadc 4096 Mar 16 09:45 locales
EDIT
After some more digging it looks like the libraries under OCS-12-5 are not actually for 12_5 but for 15_5!
$ strings sybase/OCS-12_5lib/libsybct*.a | grep "Sybase Client-Library"
Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64/BUILD1550-003/64bit/OPT/Mon Oct 5 23:16:48 2009
Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64 Native Threads/BUILD1550-003/64bit/OPT/Tue Oct 6 00:06:57 2009
Which means that my assumption that 12.5 was faster than 15.0 is wrong. What is actually happening is that 15.5 is faster than 15.0. Which makes more sense.
I'm not going to go hunt down the idiot that submitted these files into a directory labelled OCS-12-5 ...
After some more digging it looks like the libraries under OCS-12-5 are not actually for 12_5 but for 15_5!
$ strings sybase/OCS-12_5lib/libsybct*.a | grep "Sybase Client-Library" Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64/BUILD1550-003/64bit/OPT/Mon Oct 5 23:16:48 2009 Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64 Native Threads/BUILD1550-003/64bit/OPT/Tue Oct 6 00:06:57 2009
Which means that my assumption that 12.5 was faster than 15.0 is wrong. What is actually happening is that 15.5 is faster than 15.0. Which makes more sense.
I've updated the question with this new information.

how to check for shared library dependancies in petalinux

I have successfully cross compiled a sample application for Zynq Zedboard using arm-linux-gnueabi. I am running petalinux on it. However running the application xiSample gives the following error:
./xiSample: error while loading shared libraries: /usr/lib/libm3api.so.2: internal error
Further, ls -l on /usr/lib/ gives:
root#xiAPI:/usr/lib# ls -l
lrwxrwxrwx 1 root root 42 Mar 13 2018 ld-linux-
armhf.so.3 -> /usr/arm-linux-gnueabihf/lib/sf/ld-2.23.so
-rwxr-xr-x 1 root root 45556 Mar 13 2018 libjbig.so.2
-rwxr-xr-x 1 root root 15284 Mar 13 2018
libjbig85.so.2.0
-rwxr-xr-x 1 root root 222748 Mar 13 2018 libjpeg.so.8
-rwxr-xr-x 1 root root 222748 Mar 13 2018
libjpeg.so.8.1.2
-rwxr-xr-x 1 root root 193248 Mar 13 2018 liblzma.so.5
-rwxr-xr-x 1 root root 193248 Mar 13 2018
liblzma.so.5.2.3
lrwxrwxrwx 1 root root 13 Jan 1 00:54 libm3api.so -
> libm3api.so.2
lrwxrwxrwx 1 root root 17 Jan 1 00:58 libm3api.so.0
-> libm3api.so.0.0.0
-rwxr-xr-x 1 root root 19850208 Jan 1 00:54
libm3api.so.0.0.0
lrwxrwxrwx 1 root root 17 Jan 1 00:58 libm3api.so.2
-> libm3api.so.2.0.0
-rwxr-xr-x 1 root root 23453232 Jan 1 00:54
libm3api.so.2.0.0
-rwxr-xr-x 1 root root 441068 Mar 13 2018 libtiff.so.5
-rwxr-xr-x 1 root root 441068 Mar 13 2018
libtiff.so.5.3.0
-rwxr-xr-x 1 root root 9760 Mar 13 2018
libtiffxx.so.5
-rwxr-xr-x 1 root root 9760 Mar 13 2018
libtiffxx.so.5.3.0
-rwxr-xr-x 1 root root 106100 Mar 13 2018 libz.so.1
-rwxr-xr-x 1 root root 106100 Mar 13 2018
libz.so.1.2.11
lrwxrwxrwx 1 root root 18 Jan 1 00:56 m3api ->
/opt/XIMEA/include
drwxr-xr-x 3 root root 4096 Feb 22 2018 opkg
How can I find the shared libraries my executable needs, as petalinux does not contain ldd or file.
EDIT: I am having trouble further isolating error. Any suggestion on what might be causing this? I think it is a linking error.
In Petalinux environment, this is what you can do:
readelf -d xiSample | grep NEEDED
This will list the required dynamic dependencies.
A similar answer here: https://unix.stackexchange.com/questions/120015/how-to-find-out-the-dynamic-libraries-executables-loads-when-run

Subclipse not recognizing my JavaHL

I keep getting the following error:
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = "/usr/lib/x86_64-linux-gnu/jni"
Although the library path is correct:
user#localhost /usr/lib/x86_64-linux-gnu/jni $ ls -l
total 336
lrwxrwxrwx 1 root root 24 Apr 6 02:06 libatk-wrapper.so -> libatk-wrapper.so.0.0.18
lrwxrwxrwx 1 root root 24 Apr 6 02:06 libatk-wrapper.so.0 -> libatk-wrapper.so.0.0.18
-rw-r--r-- 1 root root 85168 Sep 20 2012 libatk-wrapper.so.0.0.18
lrwxrwxrwx 1 root root 23 Sep 28 2012 libsvnjavahl-1.so -> libsvnjavahl-1.so.0.0.0
lrwxrwxrwx 1 root root 23 Sep 28 2012 libsvnjavahl-1.so.0 -> libsvnjavahl-1.so.0.0.0
-rw-r--r-- 1 root root 256104 Sep 28 2012 libsvnjavahl-1.so.0.0.0
The above was installed with apt-get install libsvn-java on ubuntu 12.10. Basically this package here.
The installed version of svn is 1.7.5.
The installed version of subclipse is 1.8.19.
I understand that the required svn version for subclipse 1.8.x to work is 1.7.x.
How can I make subclipse recognize my installed JavaHL library?
Okay I have found it...
The problem was in my eclipse.ini file, which looked like this:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-Xms40m
-Xmx512m
-vmargs
-Djava.library.path="/usr/lib/x86_64-linux-gnu/jni"
I had to remove the extra quotes: -Djava.library.path="/usr/lib/x86_64-linux-gnu/jni" to -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni.
That fixed it.

Resources