Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: connecting to mssql on rhel7 with new mssql driver

by vcoderv2 (Novice)
on Sep 27, 2017 at 20:25 UTC ( [id://1200229]=note: print w/replies, xml ) Need Help??


in reply to Re^3: connecting to mssql on rhel7 with new mssql driver
in thread connecting to mssql on rhel7 with new mssql driver

Thanks guys -- I have not installed modules before.. so appreciate your patience :) I had our sa install gcc: devtoolset-6 .. Getting different errors now... :(
What do you think? TYVM
>make gcc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=8 -I/usr/include -I/usr/include -I. -I/efs/dist +/perl5/DBI/1.616/.exec/x86-64.rhel.7/5.10/lib/perl5/auto/DBI -D_REENT +RANT -D_GNU_SOURCE -DAPPLLIB_EXP="/efs/dist/perl5/defaults/5.10/.exec +/x86-64.linux.2.6/5.10/lib/perl5:/efs/dist/perl5/defaults/5.10/.exec/ +x86-64.linux.2.6/lib/perl5:/efs/dist/perl5/defaults/5.10/common/lib/p +erl5" -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_B +ITS=64 -O -DVERSION=\"1.56\" -DXS_VERSION=\"1.56\" -fPIC "-I/efs/di +st/perl5/core/5.10.0-ml01/.exec/x86-64.linux.2.6/lib/perl5/CORE" -DH +AVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEO +F_LONG_INT=8 -I/usr/include -I/usr/include ConvertUTF.c gcc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=8 -I/usr/include -I/usr/include -I. -I/efs/dist +/perl5/DBI/1.616/.exec/x86-64.rhel.7/5.10/lib/perl5/auto/DBI -D_REENT +RANT -D_GNU_SOURCE -DAPPLLIB_EXP="/efs/dist/perl5/defaults/5.10/.exec +/x86-64.linux.2.6/5.10/lib/perl5:/efs/dist/perl5/defaults/5.10/.exec/ +x86-64.linux.2.6/lib/perl5:/efs/dist/perl5/defaults/5.10/common/lib/p +erl5" -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_B +ITS=64 -O -DVERSION=\"1.56\" -DXS_VERSION=\"1.56\" -fPIC "-I/efs/di +st/perl5/core/5.10.0-ml01/.exec/x86-64.linux.2.6/lib/perl5/CORE" -DH +AVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEO +F_LONG_INT=8 -I/usr/include -I/usr/include ODBC.c gcc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=8 -I/usr/include -I/usr/include -I. -I/efs/dist +/perl5/DBI/1.616/.exec/x86-64.rhel.7/5.10/lib/perl5/auto/DBI -D_REENT +RANT -D_GNU_SOURCE -DAPPLLIB_EXP="/efs/dist/perl5/defaults/5.10/.exec +/x86-64.linux.2.6/5.10/lib/perl5:/efs/dist/perl5/defaults/5.10/.exec/ +x86-64.linux.2.6/lib/perl5:/efs/dist/perl5/defaults/5.10/common/lib/p +erl5" -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_B +ITS=64 -O -DVERSION=\"1.56\" -DXS_VERSION=\"1.56\" -fPIC "-I/efs/di +st/perl5/core/5.10.0-ml01/.exec/x86-64.linux.2.6/lib/perl5/CORE" -DH +AVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEO +F_LONG_INT=8 -I/usr/include -I/usr/include dbdimp.c dbdimp.c: In function 'odbc_db_STORE_attrib': dbdimp.c:4742:22: warning: cast to pointer from integer of different s +ize [-Wint-to-pointer-cast] vParam = (SQLPOINTER)pars->atrue; ^ dbdimp.c:4744:22: warning: cast to pointer from integer of different s +ize [-Wint-to-pointer-cast] vParam = (SQLPOINTER)pars->afalse; ^ dbdimp.c:4997:18: warning: cast to pointer from integer of different s +ize [-Wint-to-pointer-cast] vParam = (SQLPOINTER)(on ? pars->atrue : pars->afalse); ^ dbdimp.c:5002:18: warning: cast to pointer from integer of different s +ize [-Wint-to-pointer-cast] vParam = (SQLPOINTER)(on ? pars->atrue : pars->afalse); ^ dbdimp.c:5022:27: warning: cast to pointer from integer of different s +ize [-Wint-to-pointer-cast] if (vParam == (SQLPOINTER)pars->atrue) { ^ gcc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=8 -I/usr/include -I/usr/include -I. -I/efs/dist +/perl5/DBI/1.616/.exec/x86-64.rhel.7/5.10/lib/perl5/auto/DBI -D_REENT +RANT -D_GNU_SOURCE -DAPPLLIB_EXP="/efs/dist/perl5/defaults/5.10/.exec +/x86-64.linux.2.6/5.10/lib/perl5:/efs/dist/perl5/defaults/5.10/.exec/ +x86-64.linux.2.6/lib/perl5:/efs/dist/perl5/defaults/5.10/common/lib/p +erl5" -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_B +ITS=64 -O -DVERSION=\"1.56\" -DXS_VERSION=\"1.56\" -fPIC "-I/efs/di +st/perl5/core/5.10.0-ml01/.exec/x86-64.linux.2.6/lib/perl5/CORE" -DH +AVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEO +F_LONG_INT=8 -I/usr/include -I/usr/include unicode_helper.c Running Mkbootstrap for DBD::ODBC () chmod 644 ODBC.bs rm -f blib/arch/auto/DBD/ODBC/ODBC.so LD_RUN_PATH="/usr/lib64" gcc -shared -O ConvertUTF.o ODBC.o dbdimp.o + unicode_helper.o -o blib/arch/auto/DBD/ODBC/ODBC.so \ -L/usr/lib64 -lodbc \ /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld +: cannot find -lodbc collect2: error: ld returned 1 exit status make: *** [blib/arch/auto/DBD/ODBC/ODBC.so] Error 1

Replies are listed 'Best First'.
Re^5: connecting to mssql on rhel7 with new mssql driver
by choroba (Cardinal) on Sep 27, 2017 at 20:37 UTC
    > cannot find -lodbc

    It seems the header file is missing. Install the dev package for the odbc library.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

      Actually, what that is saying is it cannot find libodbc.so in the list of paths provided for linking (-L/usr/lib64). That is strange as an earlier post showed:

      042 odbc_config reports --prefix=/usr 043 odbc_config reports --include-prefix=/usr/include 044 odbc_config reports --lib-prefix=/usr/lib64 045 ODBC INC dir set to /usr/include via odbc_config 046 ODBC LIB dir set to /usr/lib64 via odbc_config 047 Using ODBCHOME /usr

      Look for libodbc* files in /usr/lib64 to see what exists. Better still, post ls -la /usr/lib64/libodbc* here.

        ls -la /usr/lib64/libodbc*
        lrwxrwxrwx 1 root root 18 Aug 29 19:54 /usr/lib64/libodbccr.so -> libodbccr.so.2.0.0
        lrwxrwxrwx 1 root root 18 Aug 29 19:53 /usr/lib64/libodbccr.so.2 -> libodbccr.so.2.0.0
        -rwxr-xr-x 1 root root 44776 Jul 15 2015 /usr/lib64/libodbccr.so.2.0.0
        lrwxrwxrwx 1 root root 24 Aug 29 19:54 /usr/lib64/libodbcdrvcfg1S.so -> libodbcdrvcfg1S.so.2.0.0
        lrwxrwxrwx 1 root root 24 Aug 29 19:53 /usr/lib64/libodbcdrvcfg1S.so.2 -> libodbcdrvcfg1S.so.2.0.0
        -rwxr-xr-x 1 root root 7016 Jul 15 2015 /usr/lib64/libodbcdrvcfg1S.so.2.0.0
        lrwxrwxrwx 1 root root 24 Aug 29 19:54 /usr/lib64/libodbcdrvcfg2S.so -> libodbcdrvcfg2S.so.2.0.0
        lrwxrwxrwx 1 root root 24 Aug 29 19:53 /usr/lib64/libodbcdrvcfg2S.so.2 -> libodbcdrvcfg2S.so.2.0.0
        -rwxr-xr-x 1 root root 6912 Jul 15 2015 /usr/lib64/libodbcdrvcfg2S.so.2.0.0
        lrwxrwxrwx 1 root root 20 Aug 29 19:53 /usr/lib64/libodbcinst.so.2 -> libodbcinst.so.2.0.0
        -rwxr-xr-x 1 root root 74616 Jul 15 2015 /usr/lib64/libodbcinst.so.2.0.0
        lrwxrwxrwx 1 root root 21 Aug 29 19:54 /usr/lib64/libodbcminiS.so -> libodbcminiS.so.2.0.0
        lrwxrwxrwx 1 root root 21 Aug 29 19:53 /usr/lib64/libodbcminiS.so.2 -> libodbcminiS.so.2.0.0
        -rwxr-xr-x 1 root root 7008 Jul 15 2015 /usr/lib64/libodbcminiS.so.2.0.0
        lrwxrwxrwx 1 root root 19 Aug 29 19:53 /usr/lib64/libodbcmyS.so -> libodbcmyS.so.2.0.0
        lrwxrwxrwx 1 root root 19 Aug 29 19:53 /usr/lib64/libodbcmyS.so.2 -> libodbcmyS.so.2.0.0
        -rwxr-xr-x 1 root root 11144 Jul 15 2015 /usr/lib64/libodbcmyS.so.2.0.0
        lrwxrwxrwx 1 root root 19 Aug 29 19:54 /usr/lib64/libodbcnnS.so -> libodbcnnS.so.2.0.0
        lrwxrwxrwx 1 root root 19 Aug 29 19:53 /usr/lib64/libodbcnnS.so.2 -> libodbcnnS.so.2.0.0
        -rwxr-xr-x 1 root root 7016 Jul 15 2015 /usr/lib64/libodbcnnS.so.2.0.0
        lrwxrwxrwx 1 root root 21 Aug 29 19:53 /usr/lib64/libodbcpsqlS.so -> libodbcpsqlS.so.2.0.0
        lrwxrwxrwx 1 root root 21 Aug 29 19:53 /usr/lib64/libodbcpsqlS.so.2 -> libodbcpsqlS.so.2.0.0
        -rwxr-xr-x 1 root root 11192 Jul 15 2015 /usr/lib64/libodbcpsqlS.so.2.0.0
        lrwxrwxrwx 1 root root 16 Aug 29 19:53 /usr/lib64/libodbc.so.2 -> libodbc.so.2.0.0
        -rwxr-xr-x 1 root root 429728 Jul 15 2015 /usr/lib64/libodbc.so.2.0.0
        lrwxrwxrwx 1 root root 20 Aug 29 19:54 /usr/lib64/libodbctxtS.so -> libodbctxtS.so.2.0.0
        lrwxrwxrwx 1 root root 20 Aug 29 19:53 /usr/lib64/libodbctxtS.so.2 -> libodbctxtS.so.2.0.0
        -rwxr-xr-x 1 root root 11152 Jul 15 2015 /usr/lib64/libodbctxtS.so.2.0.0
      can you advise which package I need to have sa install? Thank you
        Probably unixODBC-devel?

        ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
Re^5: connecting to mssql on rhel7 with new mssql driver
by hippo (Bishop) on Sep 29, 2017 at 13:11 UTC
    /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld: cannot find -lodbc

    Why are you not using the system ld? This should be /usr/bin/ld on RHEL7. Are you sure that the gcc toolchain has been installed properly?

    Try running ls -lZH /usr/bin/{gcc,ld} and see if they exist OK.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1200229]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-23 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found