-
Notifications
You must be signed in to change notification settings - Fork 202
Build problems on OpenBSD #347
Copy link
Copy link
Closed
Description
; make
cd build; cmake ../ -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Building in Release mode
-- Building with Clang 13.0.0 on OpenBSD-7.2
-- C flags:
-- C Debug flags: -g -ggdb -O0 -fno-omit-frame-pointer
-- C Release flags: -O3 -DNDEBUG -g
-- BUILD_WITH_ASAN: OFF
-- USE_EXTERNAL_FFI: OFF
-- Performing Test UV_LINT_W4
-- Performing Test UV_LINT_W4 - Failed
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER_MSVC
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER_MSVC - Failed
-- Performing Test UV_LINT_NO_CONDITIONAL_CONSTANT_MSVC
-- Performing Test UV_LINT_NO_CONDITIONAL_CONSTANT_MSVC - Failed
-- Performing Test UV_LINT_NO_NONSTANDARD_MSVC
-- Performing Test UV_LINT_NO_NONSTANDARD_MSVC - Failed
-- Performing Test UV_LINT_NO_NONSTANDARD_EMPTY_TU_MSVC
-- Performing Test UV_LINT_NO_NONSTANDARD_EMPTY_TU_MSVC - Failed
-- Performing Test UV_LINT_NO_NONSTANDARD_FILE_SCOPE_MSVC
-- Performing Test UV_LINT_NO_NONSTANDARD_FILE_SCOPE_MSVC - Failed
-- Performing Test UV_LINT_NO_NONSTANDARD_NONSTATIC_DLIMPORT_MSVC
-- Performing Test UV_LINT_NO_NONSTANDARD_NONSTATIC_DLIMPORT_MSVC - Failed
-- Performing Test UV_LINT_NO_HIDES_LOCAL
-- Performing Test UV_LINT_NO_HIDES_LOCAL - Failed
-- Performing Test UV_LINT_NO_HIDES_PARAM
-- Performing Test UV_LINT_NO_HIDES_PARAM - Failed
-- Performing Test UV_LINT_NO_HIDES_GLOBAL
-- Performing Test UV_LINT_NO_HIDES_GLOBAL - Failed
-- Performing Test UV_LINT_NO_CONDITIONAL_ASSIGNMENT_MSVC
-- Performing Test UV_LINT_NO_CONDITIONAL_ASSIGNMENT_MSVC - Failed
-- Performing Test UV_LINT_NO_UNSAFE_MSVC
-- Performing Test UV_LINT_NO_UNSAFE_MSVC - Failed
-- Performing Test UV_LINT_WALL
-- Performing Test UV_LINT_WALL - Success
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER - Success
-- Performing Test UV_LINT_STRICT_PROTOTYPES
-- Performing Test UV_LINT_STRICT_PROTOTYPES - Success
-- Performing Test UV_LINT_EXTRA
-- Performing Test UV_LINT_EXTRA - Success
-- Performing Test UV_LINT_UTF8_MSVC
-- Performing Test UV_LINT_UTF8_MSVC - Failed
-- Performing Test UV_F_STRICT_ALIASING
-- Performing Test UV_F_STRICT_ALIASING - Success
-- summary of build options:
Install prefix: /usr/local
Target system: OpenBSD
Compiler:
C compiler: /usr/bin/cc (Clang)
CFLAGS:
-- The CXX compiler identification is Clang 13.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
----
Generator: Unix Makefiles
Compiler: Clang
Build Type: Release
LTO: ON
Flags: -Dd_m3HasTracer -Wall -Wextra -Wparentheses -Wundef -Wpointer-arith -Wstrict-aliasing=2 -Werror=implicit-function-declaration -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -Dd_m3HasWASI
Debug flags: -g -ggdb -O0 -fno-omit-frame-pointer -ggdb -O0
Release flags: -O3 -Wfatal-errors -fomit-frame-pointer -fno-stack-check -fno-stack-protector -march=native
----
-- Found CURL: /usr/local/lib/libcurl.so.26.17 (found version "7.86.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/unix/software/txiki.js/build
cmake --build build -j
make: option requires an argument -- j
usage: make [-BeiknpqrSst] [-C directory] [-D variable] [-d flags] [-f mk]
[-I directory] [-j max_processes] [-m directory] [-V variable]
[NAME=value] [target ...]
*** Error 2 in /home/unix/software/txiki.js (Makefile:7 'build')
;
Basically, the "-j $(shell nproc)" parts are Linux-specific. I don't think that there is an equivalent on OpenBSD or Unices in general.
After removing these parts, there is a new problem:
; make
cmake --build build
[ 0%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_api_libc.c.o
[ 1%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_api_wasi.c.o
/home/unix/software/txiki.js/deps/wasm3/source/m3_api_wasi.c:47:16: fatal error: 'sys/random.h' file not found
# include <sys/random.h>
^~~~~~~~~~~~~~
1 error generated.
*** Error 1 in build (deps/wasm3/source/CMakeFiles/m3.dir/build.make:90 'deps/wasm3/source/CMakeFiles/m3.dir/m3_api_wasi.c.o': cd /home/unix...)
*** Error 2 in build (CMakeFiles/Makefile2:1121 'deps/wasm3/source/CMakeFiles/m3.dir/all': /usr/bin/make -s -f deps/wasm3/source/CMakeFiles/...)
*** Error 2 in build (Makefile:136 'all': /usr/bin/make -s -f CMakeFiles/Makefile2 all)
*** Error 2 in /home/unix/software/txiki.js (Makefile:7 'build')
;
This is the problem with the upstream wasm3, though. I will report it there & probably suggest to use https://man.openbsd.org/arc4random.3 instead. Will keep you updated once that is fixed!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels