cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl - Unable to link curl library in Oracle 11g

From: A. V. Josh <vegasluxor_at_gmail.com>
Date: Wed, 20 Feb 2013 12:03:14 +0530

Thanks for your help, but I am still not able to link curl header files in
oracle 11g setup. Able to create .c & .o files but not executable.
I am using AIX box. As per your suggestion linked to lib path where
libcurl.a exist.

Is there any other way to check if linking is working fine? just by
command? Is there difference between 32bit & 64bit libraries ? I am using
object mode=64 when compiling.

$MY_ORA/bin/oraxlc -q64 -o fms_uploader fms_uploader.o -L$ORA_PATH /lib/
-lm -lld -L/lib -lm -lld -L$LIB_PATH_CURL -lm -lld -lclntsh
-L/lib/libcurl.a -lm -lld -L/lib/libcurl.la -lld -lm `cat $ORA_PATH
/lib/sysliblist` -lm -lc_r -lpthreads -lm -lcurl

Error:

Pro*C/C++: Release 11.2.0.3.0 - Production on Wed Feb 20 11:43:18 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights
reserved.

System default option values taken from:
/oracle11g/app/product/11gR2/dbhome/precomp/admin/pcscfg.cfg

ld: 0711-317 ERROR: Undefined symbol: .curl_easy_cleanup
ld: 0711-317 ERROR: Undefined symbol: .curl_global_cleanup
ld: 0711-317 ERROR: Undefined symbol: .curl_global_init
ld: 0711-317 ERROR: Undefined symbol: .curl_easy_init
ld: 0711-317 ERROR: Undefined symbol: .curl_slist_append
ld: 0711-317 ERROR: Undefined symbol: .curl_easy_setopt
ld: 0711-317 ERROR: Undefined symbol: .curl_easy_perform
ld: 0711-317 ERROR: Undefined symbol: .curl_easy_strerror
ld: 0711-317 ERROR: Undefined symbol: .curl_easy_getinfo
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.

Please advise.
Thanks.
----------------------------------------------------------------

On Tue, Feb 19, 2013 at 4:40 PM, Michael Schlenker <msc_at_contact.de> wrote:

> Am 19.02.2013 09:10, schrieb A. V. Josh:
> > Pro*C code works fine on Oracle 10g but when migrated to Oracle 11g its
> > not compiling.
> > Unable to link to curl library. Difference in compiling is earlier in
> > 10g it was pointing to oracle lib32 folder but in 11g lib32 is not
> > exist, so it is pointing to lib.
> >
> >
> > Error:
> > -------------------------------------------------------------------------
> >
> > Pro*C/C++: Release 11.2.0.3.0 - Production on Mon Feb 18 17:19:38 2013
> >
> > Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights
> > reserved.
> >
> > System default option values taken from:
> > /oracle11g/app/product/11gR2/dbhome/precomp/admin/pcscfg.cfg
> >
> > ld: 0711-317 ERROR: Undefined symbol: .curl_easy_cleanup
> > ld: 0711-317 ERROR: Undefined symbol: .curl_global_cleanup
> > ld: 0711-317 ERROR: Undefined symbol: .curl_global_init
> > ld: 0711-317 ERROR: Undefined symbol: .curl_easy_init
> > ld: 0711-317 ERROR: Undefined symbol: .curl_slist_append
> > ld: 0711-317 ERROR: Undefined symbol: .curl_easy_setopt
> > ld: 0711-317 ERROR: Undefined symbol: .curl_easy_perform
> > ld: 0711-317 ERROR: Undefined symbol: .curl_easy_strerror
> > ld: 0711-317 ERROR: Undefined symbol: .curl_easy_getinfo
> > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> > information.
> > -------------------------------------------------------------------------
> >
> > Make file:
> >
> > -------------------------------------------------------------------------
> > ORA_PATH=/oracle11g/app/product/11gR2/dbhome
> > INCLUDE_CURL=/usr/include/curl
> >
> > $ORA_PATH/bin/proc proc_code userid=a/b_at_c sqlcheck=semantics
> > include=$INCLUDE_CURL DEFINE=__64BIT__ PROCFLAGS="DEFINE=__64BIT__"
> >
> > $ORA_PATH/bin/oraxlc -O3 -I. -I$ORA_PATH/precomp/public
> > -I$ORA_PATH/rdbms/public -I$ORA_PATH/rdbms/demo -I$ORA_PATH/plsql
> > -I$ORA_PATH/network -I$INCLUDE_CURL -c proc_code.c
> >
> > $ORA_PATH/bin/oraxlc -o proc_code proc_code.o -L$ORA_PATH/lib/
> > -lclntsh -lld -lm `cat $ORA_PATH/lib/sysliblist` -lm -lc_r -lpthreads
> > -lm -lcurl
> > -------------------------------------------------------------------------
> >
> > Using curl version: $Id: curl.h,v 1.370 2008-10-17 03:59:02 yangtse Exp
> $
> >
> > Not sure why it is not able to link? Would appreciate any help.
> > Thanks!
> >
> Ok, from your information, i would assume you use the Oracle proc/c
> precompiler on some AIX machine to link and build some program that uses
> libcurl via the IBM xlc compiler.
>
> As you set /usr/include/curl as include path which is outside the
> typical oracle install location, there should probably a similar -L<path
> to your libcurl.a> file somewhere.
>
> It has probably nothing to do with Oracle 11 vs 10, but all with the
> machine on which you build. So check if you have any libcurl installed
> and adjust your link path.
>
> Michael
>
> --
> Michael Schlenker
> Software Architect
>
> CONTACT Software GmbH Tel.: +49 (421) 20153-80
> Wiener Straße 1-3 Fax: +49 (421) 20153-41
> 28359 Bremen
> http://www.contact.de/ E-Mail: msc@contact.de
>
> Sitz der Gesellschaft: Bremen
> Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe
> Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-20