Bugs item #2278188, was opened at 2008-11-13 20:41
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2278188&group_id=976
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: compile or build problem
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Christian Krause (chkr)
Assigned to: Daniel Stenberg (bagder)
Summary: compile problem: Curl_sec_send/read undefined
Initial Comment:
When compiling curl using the following configuration:
--disable-ftp
--with-gssapi (heimdal kerberos)
--without-krb4
I get the following compile error:
gcc -g0 -O2 -Wno-system-headers -o .libs/curl main.o hugehelp.o urlglob.o writeout.o writeenv.o getpass.o homedir.o curlutil.o strtoofft.o strdup.o rawstr.o -L/usr/lib -L/usr/kerberos/lib ../lib/.libs/libcurl.so -lz -Wl,--rpath -Wl,/usr/local/lib
../lib/.libs/libcurl.so: undefined reference to `Curl_sec_send'
../lib/.libs/libcurl.so: undefined reference to `Curl_sec_read'
collect2: ld returned 1 exit status
make[2]: *** [curl] Error 1
make[2]: Leaving directory `/tmp/curl-7.19.2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/curl-7.19.2/src'
make: *** [all-recursive] Error 1
The cause of the problem is:
- whether the functions Curl_sec_send/read are defined is determined by the following #ifdefs in lib/security.c:
#ifndef CURL_DISABLE_FTP
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
- on the other hand, they are used in lib/sendf.c e.g. in Curl_write
- sendf.c seems to #define these functions to "-1" under certain circumstances:
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
#include "krb4.h"
#else
#define Curl_sec_send(a,b,c,d) -1
#define Curl_sec_read(a,b,c,d) -1
#endif
So it seems, that the defines which turn the definition on or off don't match the defines in sendf.c.
So if the secure read/send is only used for ftp then the following patch solves the compile issue:
--- lib/sendf.c (.../vendor/curl/7.19.2) (revision 186192)
+++ lib/sendf.c (.../trunk/fwcomponents/curl) (revision 186192)
@@ -47,7 +47,7 @@
#define _MPRINTF_REPLACE /* use the internal *printf() functions */
#include <curl/mprintf.h>
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+#if !defined(CURL_DISABLE_FTP) && ((defined HAVE_KRB4) || defined(HAVE_GSSAPI))
#include "krb4.h"
#else
#define Curl_sec_send(a,b,c,d) -1
Best regards,
Christian
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2278188&group_id=976
Received on 2008-11-13