[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[gftp] build problem on HPUX 11.00



Hi,

i tried to compile gftp-2.0.17 on HPUX 11.00 with gnome-2.4 environment, but
this fails with the following error message:

...
checking for pthread_create in -lpthread... no
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lc_r... no

Error: Cannot find the pthread libraries. If you don't have them installed,
your X libraries probably aren't thread safe either. You can download the
pthread library and the thread safe X libraries from my webpage at
http://www.gftp.org/. Note the pthread library and the thread safe
X libraries on my webpage are for Linux libc5 machines ONLY

the only workaround for this problem was to modify the configure script:

--- configure.orig      2004-04-14 12:32:02.000000000 +0200
+++ configure   2004-04-14 11:05:42.000000000 +0200
@@ -5029,10 +5029,11 @@
       echo "http://www.gftp.org/. Note the pthread library and the thread safe" ;
       echo "X libraries on my webpage are for Linux libc5 machines ONLY" ;
       echo ;
-      exit
+###      exit
     fi

-    PTHREAD_CFLAGS="-D_REENTRANT"
+    #PTHREAD_CFLAGS="-D_REENTRANT"
+    PTHREAD_CFLAGS="-D_REENTRANT -lpthread -lrt"

     # I took some of these from the glib 1.3.3 configure.in
     case $host in

after solving this problem more or less, a further problem occurs:
the compilation stops with:

/usr/ccs/bin/ld: Unsatisfied symbols:
   strtoll (first referenced in ../../lib/libgftp.a(misc.o)) (code)

I solved this problem by adding the folling to lib/misc.c:

--- misc.c.orig 2004-04-14 12:15:54.000000000 +0200
+++ misc.c      2004-04-14 12:16:46.000000000 +0200
@@ -1222,6 +1222,18 @@
   return (ret);
 }

+
+/* HPUX does not have strtoll().  This is a *poor* simulation */
+#ifndef HAVE_STRTOLL
+long long int
+strtoll(const char *ptr, char **endptr, int base)
+{
+   return (long long int)strtod(ptr, endptr);
+}
+#endif
+
+
+
 off_t
 gftp_parse_file_size (char *str)
 {

the existance of the strtoll() could be checked in configure.in with

AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])

could someone take a look at this patch and commit it ?.

thanks Martin