On Thu, Jun 07, 2012 at 08:35:07AM +0100, Alan Buckley wrote:
> I seemed to get the same errors on both:
> 
> sockwatch.o: In function `socketwatch_register':
> sockwatch.c:(.text+0x9c): undefined reference to `__get_ro_socket'
> sockwatch.o: In function `socketwatch_deregister':
> sockwatch.c:(.text+0x164): undefined reference to `__get_ro_socket'

These are caused by an old version of GCCSDK.  You need 4.1.2 or later. See:
http://www.riscos.info/index.php/UnixLib

For some reason Nettle built for me fine without needing zlib, though it may
have got built with other things.  It would probably be safer to build with
zlib...  but zlib won't build as-is at the moment.  Here's my patch to fix
that (I'm not committing it in case it conflicts with what someone else has
done).

Theo
Index: network/nettle/GNUmakefile.p
===================================================================
--- network/nettle/GNUmakefile.p        (revision 5849)
+++ network/nettle/GNUmakefile.p        (working copy)
@@ -17,7 +17,7 @@
  CONFIG = -DWITH_SSH
  
 -LIBS = -L/home/riscos/gccsdk/env/lib -lssh2 -lgcrypt -lgpg-error -lcrypto
-+LIBS = -lssh2 -lgcrypt -lgpg-error -lcrypto
++LIBS = -lssh2 -lgcrypt -lgpg-error -lcrypto -lz
  OBJS = chardefn.o choices.o dnslib.o globals.o init.o keyboard.o lineedit.o \
         main.o misc.o hotlist.o nettle.o process.o socket.o quit.o seln.o \
         wimp.o zapgen.o fortify.o sockwatch.o messages.o termlist.o url.o \
Index: libraries/libssh2/depends
===================================================================
--- libraries/libssh2/depends   (revision 5849)
+++ libraries/libssh2/depends   (working copy)
@@ -1 +1,2 @@
 libssl0.9.8
+zlib1g
Index: libraries/compress/zlib1g/configure.p
===================================================================
--- libraries/compress/zlib1g/configure.p       (revision 5849)
+++ libraries/compress/zlib1g/configure.p       (working copy)
@@ -1,34 +1,36 @@
---- configure.org      2010-01-10 18:03:32.000000000 +0100
-+++ configure  2010-01-10 18:01:05.000000000 +0100
-@@ -180,11 +180,11 @@
-   esac
+--- configure.orig     2012-05-02 05:17:08.000000000 +0100
++++ configure  2012-06-04 12:15:31.000000000 +0100
+@@ -328,6 +328,7 @@
  fi
  
-+
+ # destination names for shared library if not defined above
 +if test $shared -eq 1; then
  SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
  SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
  SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
--
+@@ -335,7 +336,6 @@
+ echo >> configure.log
+ 
+ # see if shared library build supported
 -if test $shared -eq 1; then
-   echo Checking for shared library support...
+   echo Checking for shared library support... | tee -a configure.log
    # we must test in two steps (cc then ld), required at least on SunOS 4.x
-   if test "`($CC -w -c $SFLAGS $test.c) 2>&1`" = "" &&
-@@ -220,18 +220,20 @@
+   if try $CC -w -c $SFLAGS $test.c &&
+@@ -381,18 +381,20 @@
+ echo >> configure.log
  
- EOF
- 
+ # check for large file support, and if none, check for fseeko()
 -cat > $test.c <<EOF
 -#include <sys/types.h>
 -off64_t dummy = 0;
 -EOF
--if test "`($CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c) 2>&1`" = ""; then
+-if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then
 -  CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1"
 -  SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1"
 -  ALL="${ALL} all64"
 -  TEST="${TEST} test64"
--  echo "Checking for off64_t... Yes."
--  echo "Checking for fseeko... Yes."
+-  echo "Checking for off64_t... Yes." | tee -a configure.log
+-  echo "Checking for fseeko... Yes." | tee -a configure.log
 -else
 +# Stop LARGEFILE64_SOURCE definition for RISC OS as the current
 +# version of gcc doesn't support fopen64 or fseeko64
@@ -36,23 +38,23 @@
 +##include <sys/types.h>
 +#off64_t dummy = 0;
 +#EOF
-+#if test "`($CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c) 2>&1`" = ""; then
++#if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then
 +#  CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1"
 +#  SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1"
 +#  ALL="${ALL} all64"
 +#  TEST="${TEST} test64"
-+#  echo "Checking for off64_t... Yes."
-+#  echo "Checking for fseeko... Yes."
++#  echo "Checking for off64_t... Yes." | tee -a configure.log
++#  echo "Checking for fseeko... Yes." | tee -a configure.log
 +#else
-   echo "Checking for off64_t... No."
+   echo "Checking for off64_t... No." | tee -a configure.log
+   echo >> configure.log
    cat > $test.c <<EOF
- #include <stdio.h>
-@@ -247,7 +249,7 @@
+@@ -409,7 +411,7 @@
      SFLAGS="${SFLAGS} -DNO_FSEEKO"
-     echo "Checking for fseeko... No."
+     echo "Checking for fseeko... No." | tee -a configure.log
    fi
 -fi
 +#fi
  
- cat > $test.c <<EOF
- #include <unistd.h>
+ echo >> configure.log
+ 
_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

Reply via email to