curl-library
Libcurl linking problems in Solaris and AIX ("Unknown non-configure build target!")
Date: Wed, 19 May 2010 13:13:46 +0530
Hi All,
We are trying to get our cross-platform product working with libcurl. While
we are able to get it up and
running in Linux easily enough we are hitting an issue in Solaris and AIX.
*********************************
Building Foo Product Engine.....
**********************************
/bin/rm -rf libfoo_utils.a foo_util.o foo_target.o foo_api.o foo_discover.o
foo_input.o foo_session.o xmltag.o
CC -g -I../..//utils/header/generic -I../..//utils/header/sun4_5.8 -DSVR4
-mt +d -DSOLARIS -D_REENTRANT -mt -D_SUNSTUDIO9 -D_sun4_5p8_SWEPOS2 -KPIC -c
../..//utils/foo_product/engine/generic//foo_util.cpp
CC -g -I../..//utils/header/generic -I../..//utils/header/sun4_5.8 -DSVR4
-mt +d -DSOLARIS -D_REENTRANT -mt -D_SUNSTUDIO9 -D_sun4_5p8_SWEPOS2 -KPIC -c
../..//utils/foo_product/engine/generic//foo_target.cpp
CC -g -h libfoo_utils.a -norunpath -xildoff -G -z defs foo_util.o
foo_target.o -L. -L../..//utils//logging/sun4_5.8_S
-L../..//utils//local_lib/sun4_5.8_S -L../..//tps//sun4_5.8_S/lib
-L../..//tps//emcelm/unix/lib1.1/generic/ -lpthread -lintl -lw -lsocket
-lCstd -lCrun -mt -llogging_foo -lutil_foo -ext_stl_foo -lprocess_foo -lnsl
-ldl -lc -Bstatic -o libfoo_utils.a
CC -g -I. -I../..//utils/header/generic -I../..//utils/header/sun4_5.8
-I../..//utils/header/generic/curl -DMPFS_ENABLED -DSVR4 -mt +d -DSOLARIS
-D_REENTRANT -mt -D_SUNSTUDIO9 -D_sun4_5p8_SWEPOS2 -KPIC -c
../..//utils/foo_product/engine/generic//foo_api.cpp
"../..//utils/header/generic/curl/curl/curlbuild.h", line 556: Warning:
#error "Unknown non-configure build target!".
"../..//utils/header/generic/curl/curl/curlbuild.h", line 557: Error: Error
is not defined.
"../..//utils/header/generic/curl/curlrules.h", line 80: Warning: #error
"CURL_SIZEOF_LONG definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 81: Error: "," expected
instead of "Error".
"../..//utils/header/generic/curl/curlrules.h", line 85: Warning: #error
"CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 90: Warning: #error
"CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 95: Warning: #error
"CURL_TYPEOF_CURL_OFF_T definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 100: Warning: #error
"CURL_FORMAT_CURL_OFF_T definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 105: Warning: #error
"CURL_FORMAT_CURL_OFF_TU definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 110: Warning: #error
"CURL_FORMAT_OFF_T definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 115: Warning: #error
"CURL_SIZEOF_CURL_OFF_T definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 120: Warning: #error
"CURL_SUFFIX_CURL_OFF_T definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 125: Warning: #error
"CURL_SUFFIX_CURL_OFF_TU definition is missing!".
"../..//utils/header/generic/curl/curlrules.h", line 154: Error: curl_off_t
is not defined.
"../..//utils/header/generic/curl/curlrules.h", line 154: Error:
CURL_SIZEOF_CURL_OFF_T is not defined.
"../..//utils/header/generic/curl/curlrules.h", line 154: Error: An integer
constant expression is required within the array subscript operator.
"../..//utils/header/generic/curl/curlrules.h", line 164: Error: curl_off_t
is not defined.
"../..//utils/header/generic/curl/curlrules.h", line 164: Error: An integer
constant expression is required within the array subscript operator.
"../..//utils/header/generic/curl/curlrules.h", line 174: Error:
curl_socklen_t is not defined.
"../..//utils/header/generic/curl/curlrules.h", line 174: Error:
CURL_SIZEOF_CURL_SOCKLEN_T is not defined.
"../..//utils/header/generic/curl/curlrules.h", line 174: Error: An integer
constant expression is required within the array subscript operator.
"../..//utils/header/generic/curl/curlrules.h", line 184: Error:
curl_socklen_t is not defined.
"../..//utils/header/generic/curl/curlrules.h", line 184: Error: An integer
constant expression is required within the array subscript operator.
"../..//utils/header/generic/curl/curl.h", line 208: Error: curl_off_t is
not defined.
13 Error(s) and 11 Warning(s) detected.
make: *** [foo_api.o] Error 13
Foo Product Engine Build Failed......
File foo_api.cpp has the curl api calls. From what I can make out looking
into the curlbuild.h it looks like there is no check for the solaris CC
compiler and hence it falls into the "Unknown non-configure build target!".
This unsupported compiler scenario in turn results in all the CURL
definitions not getting defined and the build fails.
How do we fix this scenario? We are able to build libcurl itself in the same
solaris machine as is without any changes in the libcurl code but the
linking part fails.
As a quick hack we are able to resolve this issue by defining the compiler
as GCC and the hardware as i386.
SOLARIS:
foo_api.o : foo_api.cpp
CC -g -I. -I$(UTILS_GENERIC_HEADER_DIR) -I$(UTILS_OS_HEADER_DIR)
-I$(BASEDIR)/utils/header/generic/curl -DMPFS_ENABLED -DSVR4 -mt +d
-DSOLARIS -D_REENTRANT -mt -D_SUNSTUDIO9 -D_sun4_5p8_SWEPOS2 *-D__GNUC__
-D__i386__* -KPIC -c $(ENGINE_SRC_FILES)/foo_api.cpp
Similarly for AIX
AIX:
foo_api.o : foo_api.cpp
xlC_r7 -g -I. -I$(utils)/foo_product/engine/ibm6k_5l_64 -I$(utils)/
foo_product /engine//ibm6k_4.3.0_64 -I$(utils)/ foo_product /engine/ibm6k
-I$(ENGINE_SRC_FILES) -I$(UTILS_OS_HEADER_DIR)
-I$(UTILS_OS_HEADER_DIR)/../ibm6k_5l_64
-I$(UTILS_OS_HEADER_DIR)/../ibm6k_4.3.0_64 -I$(UTILS_OS_HEADER_DIR)/../ibm6k
-I$(UTILS_OS_HEADER_DIR)/../generic -I$(BASEDIR)/utils/header/generic/curl
-I$(TPS_OS_COMPONENT_DATA_DIR) -D_ALL_SOURCE -D_THREAD_SAFE
-D_XOPEN_SOURCE_EXTENDED=1 -qrtti=dynamic -qlanglvl=newexcp -Dibm6k
-D_AIX_PTHREADS_D7 -D_UNKNOWN_COMPILER -D_ibm6k_5l_64_SWEPOS2 *-D__370__
-D__IBMC__* -c $(ENGINE_SRC_FILES)/foo_api.cpp -o foo_api.o
The actual hardware environment are
bash-3.2# uname -a
AIX xorn1 2 5 000F860D4C00
bash-3.2# uname -p
powerpc
xorn2# uname -a
SunOS xorn2 5.8 Generic_117350-62 sun4u sparc SUNW,Sun-Fire-V440
xorn2# uname -p
sparc
Any and all help are much appreciated.
Thanks and Regards
Partha
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-19