Issue installing semaphore in FreeBSD


#1

I’m currently trying to install sentry in FreeBSD but for some reason, one package is breaking and make it impossible to install.
% rustc --version
rustc 1.27.0
% cargo --version
cargo 1.27.0
% uname -a
FreeBSD svrsentry 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug 9 11:55:48 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
% clang --version
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin

β€” metamorphic β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o metamorphic metamorphic.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” misuse β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o misuse misuse.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” scalarmult2 β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o scalarmult2 scalarmult2.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” randombytes β€”
/bin/sh …/…/libtool --tag=CC --mode=link cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o randombytes randombytes.o …/…/src/libsodium/libsodium.la
β€” scalarmult β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o scalarmult scalarmult.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” scalarmult5 β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o scalarmult5 scalarmult5.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” scalarmult7 β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o scalarmult7 scalarmult7.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” scalarmult6 β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o scalarmult6 scalarmult6.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” pwhash_argon2i β€”
/bin/sh …/…/libtool --tag=CC --mode=link cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o pwhash_argon2i pwhash_argon2i.o …/…/src/libsodium/libsodium.la
β€” pwhash_argon2id β€”
/bin/sh …/…/libtool --tag=CC --mode=link cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o pwhash_argon2id pwhash_argon2id.o …/…/src/libsodium/libsodium.la
β€” secretbox2 β€”
/bin/sh …/…/libtool --tag=CC --mode=link cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o secretbox2 secretbox2.o …/…/src/libsodium/libsodium.la
β€” secretbox7 β€”
β€” secretbox β€”
β€” secretbox7 β€”
/bin/sh …/…/libtool --tag=CC --mode=link cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o secretbox7 secretbox7.o …/…/src/libsodium/libsodium.la
β€” secretbox β€”
/bin/sh …/…/libtool --tag=CC --mode=link cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o secretbox secretbox.o …/…/src/libsodium/libsodium.la
β€” secretbox8 β€”
/bin/sh …/…/libtool --tag=CC --mode=link cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o secretbox8 secretbox8.o …/…/src/libsodium/libsodium.la
β€” secretbox_easy β€”
/bin/sh …/…/libtool --tag=CC --mode=link cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o secretbox_easy secretbox_easy.o …/…/src/libsodium/libsodium.la
β€” randombytes β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o randombytes randombytes.o …/…/src/libsodium/.libs/libsodium.a -pthread
/usr/bin/ld: …/…/src/libsodium/.libs/libsodium.a(librdrand_la-randombytes_salsa20_random.o): relocation R_X86_64_TPOFF32 against `a local symbol’ can not be used when making a shared object; recompile with -fPIC
…/…/src/libsodium/.libs/libsodium.a: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [randombytes] Error code 1

make[3]: stopped in /tmp/tmpQnKziw/rustsrc/cabi/target/release/build/rust_sodium-sys-4ebf664e5b18d7f2/out/source/libsodium-1.0.16/test/default
β€” pwhash_argon2i β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o pwhash_argon2i pwhash_argon2i.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” pwhash_argon2id β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o pwhash_argon2id pwhash_argon2id.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” secretbox2 β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o secretbox2 secretbox2.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” secretbox β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o secretbox secretbox.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” secretbox7 β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o secretbox7 secretbox7.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” secretbox8 β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o secretbox8 secretbox8.o …/…/src/libsodium/.libs/libsodium.a -pthread
β€” secretbox_easy β€”
libtool: link: cc -O2 -pthread -fvisibility=hidden -fPIC -fPIE -fno-strict-aliasing -fno-strict-overflow -fstack-protector -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,noexecstack -o secretbox_easy secretbox_easy.o …/…/src/libsodium/.libs/libsodium.a -pthread
1 error

make[3]: stopped in /tmp/tmpQnKziw/rustsrc/cabi/target/release/build/rust_sodium-sys-4ebf664e5b18d7f2/out/source/libsodium-1.0.16/test/default
*** [check-am] Error code 2

make[2]: stopped in /tmp/tmpQnKziw/rustsrc/cabi/target/release/build/rust_sodium-sys-4ebf664e5b18d7f2/out/source/libsodium-1.0.16/test/default
1 error

make[2]: stopped in /tmp/tmpQnKziw/rustsrc/cabi/target/release/build/rust_sodium-sys-4ebf664e5b18d7f2/out/source/libsodium-1.0.16/test/default
*** [check-recursive] Error code 1

make[1]: stopped in /tmp/tmpQnKziw/rustsrc/cabi/target/release/build/rust_sodium-sys-4ebf664e5b18d7f2/out/source/libsodium-1.0.16/test
1 error

make[1]: stopped in /tmp/tmpQnKziw/rustsrc/cabi/target/release/build/rust_sodium-sys-4ebf664e5b18d7f2/out/source/libsodium-1.0.16/test
*** [check-recursive] Error code 1

make: stopped in /tmp/tmpQnKziw/rustsrc/cabi/target/release/build/rust_sodium-sys-4ebf664e5b18d7f2/out/source/libsodium-1.0.16

make: stopped in /tmp/tmpQnKziw/rustsrc/cabi/target/release/build/rust_sodium-sys-4ebf664e5b18d7f2/out/source/libsodium-1.0.16

1 error

', /home/sentry/.cargo/registry/src/github.com-1ecc6299db9ec823/rust_sodium-sys-0.9.0/build.rs:405:9
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::begin_panic_fmt
6: build_script_build::get_libsodium
at /home/sentry/.cargo/registry/src/github.com-1ecc6299db9ec823/rust_sodium-sys-0.9.0/build.rs:405
7: build_script_build::main
at /home/sentry/.cargo/registry/src/github.com-1ecc6299db9ec823/rust_sodium-sys-0.9.0/build.rs:70
8: std::rt::lang_start::{{closure}}
9: std::panicking::try::do_call
10: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
11: std::rt::lang_start_internal
12: main
13: _start
14:


Failed building wheel for semaphore
Running setup.py clean for semaphore
Failed to build semaphore


#2

We don’t support FreeBSD.


#3

Would appreciate any help to patch this error thanks


#4

There’s nothing we can help with, we don’t support FreeBSD.


#5

Just as an FYI, I got Sentry 9.0.0 working on my FreeBSD 11 box, the simple workaround to the libsodium build error seen above is to install the FreeBSD security/libsodium port, and then install Sentry with:

RUST_SODIUM_LIB_DIR=/usr/local/lib pip install -U sentry

Overall, the build dependencies you’ll need to install from FreeBSD ports before installing Sentry are:

databases/postgresql11-client
devel/py-virtualenv@py27
graphics/jpeg
lang/rust
security/libsodium
textproc/libxml2
textproc/libxslt

The only other glitch is an error:

   redis-py-cluster 1.3.6 has requirement redis==2.10.6, but you'll have redis 2.10.5 which is incompatible.

But I’ve seen that on a Linux install too. The fix that worked for me was to downgrade redis-py-cluster slightly to a version that
sentry is OK with, and is OK with the version of redis that sentry wants:

pip install -U redis-py-cluster==1.3.4

Once I got it up, it looks and acts just like the Linux install I did on another machine.