[Pkg-javascript-devel] Bug#897061: libuv1: FTBFS on hurd-i386: PATH_MAX undefined (and kfreebsd as well)
Samuel Thibault
sthibault at debian.org
Fri Apr 27 20:39:04 BST 2018
Package: libuv1
Version: 1.18.0-3
Severity: important
Tags: patch
Hello,
libuv1 currently FTBFS on hurd-i386 because it unconditionally uses
PATH_MAX. The attached patch fixes this.
Also, the symbols file is only accurate for the Linux port, here is a
fix for that too. Some symbols are really Linux-only in the source
code, they pose problem on kfreebsd as seen in buildd logs, so the patch
should fix the build there too.
Samuel
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-debug'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.16.0 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libuv1 depends on:
ii libc6 2.27-3
libuv1 recommends no packages.
libuv1 suggests no packages.
-- no debconf information
--
Samuel
<d> bah à défaut de ligne TGV, ils ont un GR
-+- #ens-mim - comment ça, paumé ?! -+-
-------------- next part --------------
Index: libuv1-1.18.0/src/unix/fs.c
===================================================================
--- libuv1-1.18.0.orig/src/unix/fs.c
+++ libuv1-1.18.0/src/unix/fs.c
@@ -436,8 +436,14 @@ static ssize_t uv__fs_pathmax_size(const
static ssize_t uv__fs_readlink(uv_fs_t* req) {
ssize_t len;
char* buf;
+ struct stat st;
+ int ret;
- len = uv__fs_pathmax_size(req->path);
+ ret = lstat(req->path, &st);
+ if (ret != 0) {
+ return -1;
+ }
+ len = st.st_size;
buf = uv__malloc(len + 1);
if (buf == NULL) {
@@ -451,7 +457,6 @@ static ssize_t uv__fs_readlink(uv_fs_t*
len = readlink(req->path, buf, len);
#endif
-
if (len == -1) {
uv__free(buf);
return -1;
@@ -464,9 +469,16 @@ static ssize_t uv__fs_readlink(uv_fs_t*
}
static ssize_t uv__fs_realpath(uv_fs_t* req) {
- ssize_t len;
char* buf;
+#if _POSIX_VERSION >= 200809L
+ buf = realpath(req->path, NULL);
+ if (buf == NULL) {
+ return -1;
+ }
+#else
+ ssize_t len;
+
len = uv__fs_pathmax_size(req->path);
buf = uv__malloc(len + 1);
@@ -479,6 +491,7 @@ static ssize_t uv__fs_realpath(uv_fs_t*
uv__free(buf);
return -1;
}
+#endif
req->ptr = buf;
-------------- next part --------------
--- debian/libuv1.symbols.orig 2018-04-27 19:23:52.000000000 +0000
+++ debian/libuv1.symbols 2018-04-27 19:37:32.000000000 +0000
@@ -1,5 +1,5 @@
libuv.so.1 libuv1 #MINVER#
- uv__accept4 at Base 1.11.0
+ (arch=linux-any)uv__accept4 at Base 1.11.0
uv__accept at Base 1.11.0
uv__async_close at Base 1.11.0
uv__async_fork at Base 1.18.0
@@ -12,37 +12,37 @@
uv__close_nocheckstdio at Base 1.11.0
uv__count_bufs at Base 1.11.0
uv__dup2_cloexec at Base 1.11.0
- uv__dup3 at Base 1.11.0
+ (arch=linux-any)uv__dup3 at Base 1.11.0
uv__dup at Base 1.11.0
- uv__epoll_create1 at Base 1.11.0
- uv__epoll_create at Base 1.11.0
- uv__epoll_ctl at Base 1.11.0
- uv__epoll_pwait at Base 1.11.0
- uv__epoll_wait at Base 1.11.0
- uv__eventfd2 at Base 1.11.0
- uv__eventfd at Base 1.11.0
+ (arch=linux-any)uv__epoll_create1 at Base 1.11.0
+ (arch=linux-any)uv__epoll_create at Base 1.11.0
+ (arch=linux-any)uv__epoll_ctl at Base 1.11.0
+ (arch=linux-any)uv__epoll_pwait at Base 1.11.0
+ (arch=linux-any)uv__epoll_wait at Base 1.11.0
+ (arch=linux-any)uv__eventfd2 at Base 1.11.0
+ (arch=linux-any)uv__eventfd at Base 1.11.0
uv__free at Base 1.11.0
- uv__fs_event_close at Base 1.11.0
+ (arch=!hurd-any)uv__fs_event_close at Base 1.11.0
uv__fs_poll_close at Base 1.11.0
uv__fs_scandir_cleanup at Base 1.11.0
uv__getaddrinfo_translate_error at Base 1.11.0
uv__getiovmax at Base 1.11.0
uv__getpwuid_r at Base 1.11.0
uv__handle_type at Base 1.11.0
- uv__hrtime at Base 1.11.0
+ (arch=!hurd-any)uv__hrtime at Base 1.11.0
uv__idle_close at Base 1.11.0
- uv__inotify_add_watch at Base 1.11.0
- uv__inotify_fork at Base 1.18.0
- uv__inotify_init1 at Base 1.11.0
- uv__inotify_init at Base 1.11.0
- uv__inotify_rm_watch at Base 1.11.0
+ (arch=linux-any)uv__inotify_add_watch at Base 1.11.0
+ (arch=linux-any)uv__inotify_fork at Base 1.18.0
+ (arch=linux-any)uv__inotify_init1 at Base 1.11.0
+ (arch=linux-any)uv__inotify_init at Base 1.11.0
+ (arch=linux-any)uv__inotify_rm_watch at Base 1.11.0
uv__io_active at Base 1.11.0
- uv__io_check_fd at Base 1.11.0
+ (arch=!hurd-any)uv__io_check_fd at Base 1.11.0
uv__io_close at Base 1.11.0
uv__io_feed at Base 1.11.0
- uv__io_fork at Base 1.18.0
+ (arch=!hurd-any)uv__io_fork at Base 1.18.0
uv__io_init at Base 1.11.0
- uv__io_poll at Base 1.11.0
+ (arch=!hurd-any)uv__io_poll at Base 1.11.0
uv__io_start at Base 1.11.0
uv__io_stop at Base 1.11.0
uv__loop_close at Base 1.11.0
@@ -56,26 +56,26 @@
uv__nonblock_ioctl at Base 1.11.0
uv__open_cloexec at Base 1.11.0
uv__open_file at Base 1.11.0
- uv__pipe2 at Base 1.11.0
+ (arch=linux-any)uv__pipe2 at Base 1.11.0
uv__pipe_close at Base 1.11.0
- uv__platform_invalidate_fd at Base 1.11.0
- uv__platform_loop_delete at Base 1.11.0
- uv__platform_loop_init at Base 1.11.0
+ (arch=!hurd-any)uv__platform_invalidate_fd at Base 1.11.0
+ (arch=!hurd-any)uv__platform_loop_delete at Base 1.11.0
+ (arch=!hurd-any)uv__platform_loop_init at Base 1.11.0
uv__poll_close at Base 1.11.0
- uv__preadv at Base 1.11.0
+ (arch=linux-any)uv__preadv at Base 1.11.0
uv__prepare_close at Base 1.11.0
uv__process_close at Base 1.11.0
- uv__pwritev at Base 1.11.0
+ (arch=linux-any)uv__pwritev at Base 1.11.0
uv__realloc at Base 1.11.0
- uv__recvmmsg at Base 1.11.0
+ (arch=linux-any)uv__recvmmsg at Base 1.11.0
uv__recvmsg at Base 1.11.0
uv__run_check at Base 1.11.0
uv__run_idle at Base 1.11.0
uv__run_prepare at Base 1.11.0
uv__run_timers at Base 1.11.0
- uv__sendmmsg at Base 1.11.0
+ (arch=linux-any)uv__sendmmsg at Base 1.11.0
uv__server_io at Base 1.11.0
- uv__set_process_title at Base 1.11.0
+ (arch=!hurd-any !kfreebsd-any)uv__set_process_title at Base 1.11.0
uv__signal_close at Base 1.11.0
uv__signal_global_once_init at Base 1.11.0
uv__signal_loop_cleanup at Base 1.11.0
@@ -102,7 +102,7 @@
uv__udp_recv_stop at Base 1.11.0
uv__udp_send at Base 1.11.0
uv__udp_try_send at Base 1.11.0
- uv__utimesat at Base 1.11.0
+ (arch=linux-any)uv__utimesat at Base 1.11.0
uv__work_done at Base 1.11.0
uv__work_submit at Base 1.11.0
uv_accept at Base 1.4.2
More information about the Pkg-javascript-devel
mailing list