Hello,

Aaron M. Ucko, le mer. 15 nov. 2017 20:21:02 -0500, a ecrit:
> The build of libstorj for hurd-i386 (admittedly not a release
> architecture) failed because libuv had undefined references to symbols
> it should have defined internally:
> 
> /usr/lib/i386-gnu/libuv.so: undefined reference to `uv__io_check_fd'
> /usr/lib/i386-gnu/libuv.so: undefined reference to `uv__platform_loop_delete'
> /usr/lib/i386-gnu/libuv.so: undefined reference to `uv__hrtime'
> /usr/lib/i386-gnu/libuv.so: undefined reference to 
> `uv__platform_invalidate_fd'
> /usr/lib/i386-gnu/libuv.so: undefined reference to `uv__io_poll'
> /usr/lib/i386-gnu/libuv.so: undefined reference to `uv__platform_loop_init'
> /usr/lib/i386-gnu/libuv.so: undefined reference to `uv__fs_event_close'

We have the same issue with cmake (which is very problematic of course
:) ). The attached patch is fixing it.

Samuel
Index: libuv1-1.20.3/Makefile.am
===================================================================
--- libuv1-1.20.3.orig/Makefile.am
+++ libuv1-1.20.3/Makefile.am
@@ -389,6 +389,12 @@ libuv_la_SOURCES += src/unix/bsd-ifaddrs
 test_run_tests_LDFLAGS += -lutil
 endif
 
+if HURD
+libuv_la_SOURCES += src/unix/no-fsevents.c \
+                    src/unix/posix-hrtime.c \
+                    src/unix/posix-poll.c
+endif
+
 if LINUX
 include_HEADERS += include/uv-linux.h
 libuv_la_CFLAGS += -D_GNU_SOURCE
Index: libuv1-1.20.3/configure.ac
===================================================================
--- libuv1-1.20.3.orig/configure.ac
+++ libuv1-1.20.3/configure.ac
@@ -56,6 +56,7 @@ AM_CONDITIONAL([CYGWIN],   [AS_CASE([$ho
 AM_CONDITIONAL([DARWIN],   [AS_CASE([$host_os],[darwin*],       [true], [false])])
 AM_CONDITIONAL([DRAGONFLY],[AS_CASE([$host_os],[dragonfly*],    [true], [false])])
 AM_CONDITIONAL([FREEBSD],  [AS_CASE([$host_os],[*freebsd*],     [true], [false])])
+AM_CONDITIONAL([HURD],     [AS_CASE([$host_os],[gnu*],          [true], [false])])
 AM_CONDITIONAL([LINUX],    [AS_CASE([$host_os],[linux*],        [true], [false])])
 AM_CONDITIONAL([MSYS],     [AS_CASE([$host_os],[msys*],         [true], [false])])
 AM_CONDITIONAL([NETBSD],   [AS_CASE([$host_os],[netbsd*],       [true], [false])])
Index: libuv1-1.20.3/debian/libuv1.symbols
===================================================================
--- libuv1-1.20.3.orig/debian/libuv1.symbols
+++ libuv1-1.20.3/debian/libuv1.symbols
@@ -22,14 +22,14 @@ libuv.so.1 libuv1 #MINVER#
  (arch=linux-any)uv__eventfd2@Base 1.11.0
  (arch=linux-any)uv__eventfd@Base 1.11.0
  uv__free@Base 1.11.0
- (arch=!hurd-any)uv__fs_event_close@Base 1.11.0
+ uv__fs_event_close@Base 1.11.0
  uv__fs_poll_close@Base 1.11.0
  uv__fs_scandir_cleanup@Base 1.11.0
  uv__getaddrinfo_translate_error@Base 1.11.0
  uv__getiovmax@Base 1.11.0
  uv__getpwuid_r@Base 1.11.0
  uv__handle_type@Base 1.11.0
- (arch=!hurd-any)uv__hrtime@Base 1.11.0
+ uv__hrtime@Base 1.11.0
  uv__idle_close@Base 1.11.0
  (arch=linux-any)uv__inotify_add_watch@Base 1.11.0
  (arch=linux-any)uv__inotify_fork@Base 1.18.0
@@ -37,12 +37,12 @@ libuv.so.1 libuv1 #MINVER#
  (arch=linux-any)uv__inotify_init@Base 1.11.0
  (arch=linux-any)uv__inotify_rm_watch@Base 1.11.0
  uv__io_active@Base 1.11.0
- (arch=!hurd-any)uv__io_check_fd@Base 1.11.0
+ uv__io_check_fd@Base 1.11.0
  uv__io_close@Base 1.11.0
  uv__io_feed@Base 1.11.0
- (arch=!hurd-any)uv__io_fork@Base 1.18.0
+ uv__io_fork@Base 1.18.0
  uv__io_init@Base 1.11.0
- (arch=!hurd-any)uv__io_poll@Base 1.11.0
+ uv__io_poll@Base 1.11.0
  uv__io_start@Base 1.11.0
  uv__io_stop@Base 1.11.0
  uv__loop_close@Base 1.11.0
@@ -58,9 +58,9 @@ libuv.so.1 libuv1 #MINVER#
  uv__open_file@Base 1.11.0
  (arch=linux-any)uv__pipe2@Base 1.11.0
  uv__pipe_close@Base 1.11.0
- (arch=!hurd-any)uv__platform_invalidate_fd@Base 1.11.0
- (arch=!hurd-any)uv__platform_loop_delete@Base 1.11.0
- (arch=!hurd-any)uv__platform_loop_init@Base 1.11.0
+ uv__platform_invalidate_fd@Base 1.11.0
+ uv__platform_loop_delete@Base 1.11.0
+ uv__platform_loop_init@Base 1.11.0
  uv__poll_close@Base 1.11.0
  (arch=linux-any)uv__preadv@Base 1.11.0
  uv__prepare_close@Base 1.11.0
@@ -146,9 +146,9 @@ libuv.so.1 libuv1 #MINVER#
  uv_fs_close@Base 1.4.2
  uv_fs_copyfile@Base 1.18.0
  uv_fs_event_getpath@Base 1.4.2
- (arch=!hurd-any)uv_fs_event_init@Base 1.4.2
- (arch=!hurd-any)uv_fs_event_start@Base 1.4.2
- (arch=!hurd-any)uv_fs_event_stop@Base 1.4.2
+ uv_fs_event_init@Base 1.4.2
+ uv_fs_event_start@Base 1.4.2
+ uv_fs_event_stop@Base 1.4.2
  uv_fs_fchmod@Base 1.4.2
  uv_fs_fchown@Base 1.4.2
  uv_fs_fdatasync@Base 1.4.2
Index: libuv1-1.20.3/include/uv-unix.h
===================================================================
--- libuv1-1.20.3.orig/include/uv-unix.h
+++ libuv1-1.20.3/include/uv-unix.h
@@ -64,6 +64,8 @@
 # include "uv-bsd.h"
 #elif defined(__CYGWIN__) || defined(__MSYS__)
 # include "uv-posix.h"
+#elif defined(__GNU__)
+# include "uv-posix.h"
 #endif
 
 #ifndef PTHREAD_BARRIER_SERIAL_THREAD

Reply via email to