Skip to content
Snippets Groups Projects
Closed (moved) Tor doesn't build under musl-libc
  • View options
  • Tor doesn't build under musl-libc

  • View options
  • Closed (moved) Issue created by Trac

    Tor's common/sandbox.c is making use of an internal header, bits/signum.h which is causing compilation failures under musl-libc.

    This should result in issues even under glibc...

    Relevant log snippet is below

    x86_64-gentoo-linux-musl-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I./src/ext -Isrc/ext -I./src/ext/trunnel -I./src/trunnel -I./src/common -Isrc/common -I./src/ext/trunnel -I./src/trun nel -I./src/or -Isrc/or -DSHARE_DATADIR=""/usr/share"" -DLOCALSTATEDIR=""/var/lib"" -DBINDIR=""/usr/bin"" -I./src/common -march=core-avx-i -O2 -fstack-protector-all -fom it-frame-pointer -fasynchronous-unwind-tables -Wall -fno-strict-aliasing -c -o src/common/sandbox.o src/common/sandbox.c src/common/sandbox.c:51:25: fatal error: bits/signum.h: No such file or directory #include <bits/signum.h> ^ compilation terminated. Makefile:2967: recipe for target 'src/common/sandbox.o' failed make[1]: *** [src/common/sandbox.o] Error 1 make[1]: Leaving directory '/var/tmp/portage/net-misc/tor-0.2.6.10/work/tor-0.2.6.10' Makefile:1688: recipe for target 'all' failed make: *** [all] Error 2

    A patch I have used to make it build is below as well.

    --- a/src/common/sandbox.c 2015-07-10 17:54:28.000000000 +0200 +++ b/src/common/sandbox.c 2015-08-31 18:33:17.178104105 +0200 @@ -48,7 +48,7 @@ #include <sys/epoll.h> #include <sys/prctl.h> #include <linux/futex.h> -#include <bits/signum.h> +#include <sys/file.h>

    #include <stdarg.h> #include <seccomp.h> --- a/src/common/sandbox.h 2015-06-22 19:42:28.000000000 +0200 +++ b/src/common/sandbox.h 2015-08-31 18:33:01.806151831 +0200 @@ -41,6 +41,7 @@

    #ifndef __USE_GNU #define __USE_GNU +#define _GNU_SOURCE #endif #include <sys/ucontext.h> #include <seccomp.h>

    Trac:
    Username: jamestk

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading