Skip to content

Support Freebsd #732

@sjolicoeur

Description

@sjolicoeur

I would be great to be able to run vector in FreeBSD ( or any other *BSD ). So I tried to do the manual steps and encountered a few errors. The first one was solved by using gnu-make (gmake) instead of bsd-make. I am not familiar with Rust, but I hope that this can help bring vector to FreeBSD. (it shouldn't be too far from MacOS support, I hope).

Platform: FreeBSD 11.2-RELEASE-p10
cargo 1.35.0
vector Source Version: 0.4.0-dev
Env options: RUST_BACKTRACE=1

error:

 Compiling jemalloc-sys v0.3.0
error: failed to run custom build command for `leveldb-sys v2.0.1`
process didn't exit successfully: `/tmp/vector/vector-master/target/debug/build/leveldb-sys-cd5040109e6341dc/build-script-build` (exit code: 101)
--- stdout
[build] Started
[snappy] Cleaning
test -z "libsnappy.la" || rm -f libsnappy.la
rm -f "./so_locations"
rm -rf .libs _libs
 rm -f snappy_unittest
rm -f *.o
rm -f *.lo
rm -f *.tab.c
test -z "snappy-stubs-public.h" || rm -f snappy-stubs-public.h
test . = "." || test -z "" || rm -f
rm -f config.h stamp-h1
rm -f libtool config.lt
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f config.status config.cache config.log  configure.lineno config.status.lineno
rm -rf ./.deps
rm -f Makefile
[snappy] Configuring
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-freebsd11.2
checking host system type... x86_64-unknown-freebsd11.2
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking dependency style of cc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert x86_64-unknown-freebsd11.2 file names to x86_64-unknown-freebsd11.2 format... func_convert_file_noop
checking how to convert x86_64-unknown-freebsd11.2 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd11.2 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... no
checking for c++... c++
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking how to run the C++ preprocessor... c++ -E
checking for ld used by c++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking for c++ option to produce PIC... -fPIC -DPIC
checking if c++ PIC flag -fPIC -DPIC works... yes
checking if c++ static flag -static works... yes
checking if c++ supports -c -o file.o... yes
checking if c++ supports -c -o file.o... (cached) yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... freebsd11.2 ld.so
checking how to hardcode library paths into programs... immediate
checking whether byte ordering is bigendian... no
checking for size_t... yes
checking for ssize_t... yes
checking for stdint.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking byteswap.h usability... no
checking byteswap.h presence... no
checking for byteswap.h... no
checking sys/byteswap.h usability... no
checking sys/byteswap.h presence... no
checking for sys/byteswap.h... no
checking sys/endian.h usability... yes
checking sys/endian.h presence... yes
checking for sys/endian.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for mmap... yes
checking for 'gtest-config'... checking for gtest-config... no
no
checking for pkg-config... no
checking for gflags... no
checking if the compiler supports __builtin_expect... yes
checking if the compiler supports __builtin_ctzll... yes
checking for zlibVersion in -lz... yes
checking for lzo1x_1_15_compress in -llzo2... no
checking for lzf_compress in -llzf... no
checking for fastlz_compress in -lfastlz... no
checking for qlz_compress in -lquicklz... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating snappy-stubs-public.h
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
[snappy] Building
make  all-am
/bin/sh ./libtool --tag=CXX    --mode=compile c++ -DHAVE_CONFIG_H -I.      -fPIC -MT snappy.lo -MD -MP -MF .deps/snappy.Tpo -c -o snappy.lo snappy.cc
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -fPIC -MT snappy.lo -MD -MP -MF .deps/snappy.Tpo -c snappy.cc  -fPIC -DPIC -o .libs/snappy.o
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -fPIC -MT snappy.lo -MD -MP -MF .deps/snappy.Tpo -c snappy.cc -o snappy.o >/dev/null 2>&1
mv -f .deps/snappy.Tpo .deps/snappy.Plo
/bin/sh ./libtool --tag=CXX    --mode=compile c++ -DHAVE_CONFIG_H -I.      -fPIC -MT snappy-sinksource.lo -MD -MP -MF .deps/snappy-sinksource.Tpo -c -o snappy-sinksource.lo snappy-sinksource.cc
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -fPIC -MT snappy-sinksource.lo -MD -MP -MF .deps/snappy-sinksource.Tpo -c snappy-sinksource.cc  -fPIC -DPIC -o .libs/snappy-sinksource.o
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -fPIC -MT snappy-sinksource.lo -MD -MP -MF .deps/snappy-sinksource.Tpo -c snappy-sinksource.cc -o snappy-sinksource.o >/dev/null 2>&1
mv -f .deps/snappy-sinksource.Tpo .deps/snappy-sinksource.Plo
/bin/sh ./libtool --tag=CXX    --mode=compile c++ -DHAVE_CONFIG_H -I.      -fPIC -MT snappy-stubs-internal.lo -MD -MP -MF .deps/snappy-stubs-internal.Tpo -c -o snappy-stubs-internal.lo snappy-stubs-internal.cc
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -fPIC -MT snappy-stubs-internal.lo -MD -MP -MF .deps/snappy-stubs-internal.Tpo -c snappy-stubs-internal.cc  -fPIC -DPIC -o .libs/snappy-stubs-internal.o
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -fPIC -MT snappy-stubs-internal.lo -MD -MP -MF .deps/snappy-stubs-internal.Tpo -c snappy-stubs-internal.cc -o snappy-stubs-internal.o >/dev/null 2>&1
mv -f .deps/snappy-stubs-internal.Tpo .deps/snappy-stubs-internal.Plo
/bin/sh ./libtool --tag=CXX    --mode=compile c++ -DHAVE_CONFIG_H -I.      -fPIC -MT snappy-c.lo -MD -MP -MF .deps/snappy-c.Tpo -c -o snappy-c.lo snappy-c.cc
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -fPIC -MT snappy-c.lo -MD -MP -MF .deps/snappy-c.Tpo -c snappy-c.cc  -fPIC -DPIC -o .libs/snappy-c.o
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -fPIC -MT snappy-c.lo -MD -MP -MF .deps/snappy-c.Tpo -c snappy-c.cc -o snappy-c.o >/dev/null 2>&1
mv -f .deps/snappy-c.Tpo .deps/snappy-c.Plo
/bin/sh ./libtool --tag=CXX    --mode=link c++   -fPIC -version-info 3:1:2  -o libsnappy.la -rpath /usr/local/lib snappy.lo snappy-sinksource.lo  snappy-stubs-internal.lo snappy-c.lo
libtool: link: c++  -fPIC -DPIC -shared -nostdlib /usr/lib/crti.o /usr/lib/crtbeginS.o  .libs/snappy.o .libs/snappy-sinksource.o .libs/snappy-stubs-internal.o .libs/snappy-c.o   -L/usr/lib -lc++ -lm -lc -lgcc -lgcc_s /usr/lib/crtendS.o /usr/lib/crtn.o    -Wl,-soname -Wl,libsnappy.so.3 -o .libs/libsnappy.so.3
libtool: link: (cd ".libs" && rm -f "libsnappy.so" && ln -s "libsnappy.so.3" "libsnappy.so")
libtool: link: (cd ".libs" && rm -f "libsnappy.so" && ln -s "libsnappy.so.3" "libsnappy.so")
libtool: link: ar cru .libs/libsnappy.a  snappy.o snappy-sinksource.o snappy-stubs-internal.o snappy-c.o
libtool: link: ranlib .libs/libsnappy.a
libtool: link: ( cd ".libs" && rm -f "libsnappy.la" && ln -s "../libsnappy.la" "libsnappy.la" )
c++ -DHAVE_CONFIG_H -I.      -fPIC -MT snappy_unittest-snappy_unittest.o -MD -MP -MF .deps/snappy_unittest-snappy_unittest.Tpo -c -o snappy_unittest-snappy_unittest.o `test -f 'snappy_unittest.cc' || echo './'`snappy_unittest.cc
mv -f .deps/snappy_unittest-snappy_unittest.Tpo .deps/snappy_unittest-snappy_unittest.Po
c++ -DHAVE_CONFIG_H -I.      -fPIC -MT snappy_unittest-snappy-test.o -MD -MP -MF .deps/snappy_unittest-snappy-test.Tpo -c -o snappy_unittest-snappy-test.o `test -f 'snappy-test.cc' || echo './'`snappy-test.cc
mv -f .deps/snappy_unittest-snappy-test.Tpo .deps/snappy_unittest-snappy-test.Po
/bin/sh ./libtool --tag=CXX    --mode=link c++   -fPIC   -o snappy_unittest snappy_unittest-snappy_unittest.o  snappy_unittest-snappy-test.o libsnappy.la -lz
libtool: link: c++ -fPIC -o .libs/snappy_unittest snappy_unittest-snappy_unittest.o snappy_unittest-snappy-test.o  ./.libs/libsnappy.so -lz -Wl,-rpath -Wl,/usr/local/lib
[build] Copying output files
[build] Copying the `build_detect_platform` template
[leveldb] Cleaning

make[1]: stopped in /root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18
[leveldb] Building command
[leveldb] Building

make[1]: stopped in /root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18
[leveldb] Build finished
[build] Copying output files

--- stderr
In file included from snappy_unittest.cc:39:
./snappy-test.h:135:20: warning: control reaches end of non-void function [-Wreturn-type]
  int Defaults() { }
                   ^
./snappy-test.h:161:3: warning: control may reach end of non-void function [-Wreturn-type]
  }
  ^
./snappy-test.h:179:3: warning: control may reach end of non-void function [-Wreturn-type]
  }
  ^
snappy_unittest.cc:165:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
snappy_unittest.cc:959:24: warning: implicit conversion from 'int' to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type' (aka 'char') changes value from 128 to -128 [-Wconstant-conversion]
  compressed.push_back(128);
             ~~~~~~~~~ ^~~
snappy_unittest.cc:960:24: warning: implicit conversion from 'int' to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type' (aka 'char') changes value from 128 to -128 [-Wconstant-conversion]
  compressed.push_back(128);
             ~~~~~~~~~ ^~~
snappy_unittest.cc:961:24: warning: implicit conversion from 'int' to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type' (aka 'char') changes value from 128 to -128 [-Wconstant-conversion]
  compressed.push_back(128);
             ~~~~~~~~~ ^~~
snappy_unittest.cc:962:24: warning: implicit conversion from 'int' to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type' (aka 'char') changes value from 128 to -128 [-Wconstant-conversion]
  compressed.push_back(128);
             ~~~~~~~~~ ^~~
snappy_unittest.cc:963:24: warning: implicit conversion from 'int' to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type' (aka 'char') changes value from 128 to -128 [-Wconstant-conversion]
  compressed.push_back(128);
             ~~~~~~~~~ ^~~
9 warnings generated.
In file included from snappy-test.cc:31:
./snappy-test.h:135:20: warning: control reaches end of non-void function [-Wreturn-type]
  int Defaults() { }
                   ^
./snappy-test.h:161:3: warning: control may reach end of non-void function [-Wreturn-type]
  }
  ^
./snappy-test.h:179:3: warning: control may reach end of non-void function [-Wreturn-type]
  }
  ^
3 warnings generated.
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 19: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 21: Could not find build_config.mk
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 36: Missing dependency operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 38: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 74: Missing dependency operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 76: Missing dependency operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 81: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 93: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 98: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 198: Missing dependency operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 221: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 227: Need an operator
make[1]: Fatal errors encountered -- cannot continuemake[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 19: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 21: Could not find build_config.mk
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 36: Missing dependency operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 38: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 74: Missing dependency operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 76: Missing dependency operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 81: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 93: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 98: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 198: Missing dependency operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 221: Need an operator
make[1]: "/root/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/leveldb-sys-2.0.1/deps/leveldb-1.18/Makefile" line 227: Need an operator
make[1]: Fatal errors encountered -- cannot continuethread 'main' panicked at 'copy of output files failed', src/libcore/option.rs:1034:5
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::continue_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::option::expect_failed
   9: core::option::Option<T>::expect
             at /wrkdirs/usr/ports/lang/rust/work/rustc-1.35.0-src/src/libcore/option.rs:312
  10: build_script_build::build_leveldb
             at ./src/build.rs:115
  11: build_script_build::main
             at ./src/build.rs:178
  12: std::rt::lang_start::{{closure}}
             at /wrkdirs/usr/ports/lang/rust/work/rustc-1.35.0-src/src/libstd/rt.rs:64
  13: std::panicking::try::do_call
  14: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  15: std::rt::lang_start_internal
  16: std::rt::lang_start
             at /wrkdirs/usr/ports/lang/rust/work/rustc-1.35.0-src/src/libstd/rt.rs:64
  17: main
  18: _start
  19: <unknown>

warning: build failed, waiting for other jobs to finish...
error: build failed
gmake: *** [Makefile:22: build] Error 101

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: taskGeneric non-code related tasks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions