gab-ai-inc / defiant-browser

Welcome to the free speech Internet.
Mozilla Public License 2.0
108 stars 24 forks source link

Build on voidlinux not working because of dependency on old #44

Closed porky11 closed 3 years ago

porky11 commented 4 years ago

Description

Build does not work on voidlinux.

Steps to Reproduce

  1. Do the steps required for building
  2. When running npm run build, it fails with the following error message:

Actual result:

   Compiling syn v0.14.9
error: failed to run custom build command for `openssl-sys v0.9.48`

Caused by:
  process didn't exit successfully: `defiant-browser/src/out/Component/gen/adblock/out/release/build/openssl-sys-d3ee5cb6ed2e8e1e/build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
cargo:rustc-link-lib=ssl
cargo:rustc-link-lib=crypto
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-Wall" "-Wextra" "-E" "build/expando.c"
exit code: 0
cargo:rustc-cfg=osslconf="OPENSSL_NO_BUF_FREELISTS"
cargo:rustc-cfg=osslconf="OPENSSL_NO_COMP"
cargo:rustc-cfg=osslconf="OPENSSL_NO_KRB5"
cargo:rustc-cfg=osslconf="OPENSSL_NO_PSK"
cargo:rustc-cfg=osslconf="OPENSSL_NO_RFC3779"
cargo:rustc-cfg=osslconf="OPENSSL_NO_SRP"
cargo:rustc-cfg=osslconf="OPENSSL_NO_SSL3_METHOD"
cargo:conf=OPENSSL_NO_BUF_FREELISTS,OPENSSL_NO_COMP,OPENSSL_NO_KRB5,OPENSSL_NO_PSK,OPENSSL_NO_RFC3779,OPENSSL_NO_SRP,OPENSSL_NO_SSL3_METHOD
cargo:rustc-cfg=libressl
cargo:rustc-cfg=libressl251
cargo:rustc-cfg=libressl261
cargo:rustc-cfg=libressl270
cargo:rustc-cfg=libressl271
cargo:rustc-cfg=libressl273
cargo:rustc-cfg=libressl280
cargo:rustc-cfg=libressl281
cargo:rustc-cfg=libressl291
cargo:libressl_version_number=3000200f

--- stderr
thread 'main' panicked at '

This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
through 2.9.x, but a different version of OpenSSL was found. The build is now aborting
due to this version mismatch.

', defiant-browser/src/out/Component/../../brave/build/rustup/0.1.3/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.48/build/main.rs:239:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
None
Traceback (most recent call last):
  File "../../brave/script/cargo.py", line 111, in <module>
    sys.exit(main())
  File "../../brave/script/cargo.py", line 105, in main
    build(parse_args())
  File "../../brave/script/cargo.py", line 80, in build
    raise e
subprocess.CalledProcessError: Command '['cargo', 'build', '--release', '--manifest-path=../../brave/vendor/adblock_rust_ffi/Cargo.toml', '--target-dir=gen/adblock/out', '--target=x86_64-unknown-linux-gnu']' returned non-zero exit status 101
[563/35975] CXX obj/skia/skia/Transform.o
ninja: build stopped: subcommand failed.

Expected result:

No errors.

Reproduces how often:

It is reproduced everytime.

Brave version (brave://version info)

Hash of defiant browser: e2b56882d773b2a68389c1c1351ba0392ef3ecb6

Version/Channel Information:

I didn't try other channels. This seems to be the most recent one.

Other Additional Information:

This does not apply.

Miscellaneous Information:

freespeech4ever commented 4 years ago

This is a baked source dump (defiant-core and defiant-browser) from the last build 1.10.99 (released on Mac) but I wouldn't expect it to build. It might work, if and only if you set up Brave and have a working 1.10.99 build of Brave, and then git checkout these Dissenter branches. We use a combination of cherry-picked changes to the code, and an automated script which changes a lot of text and image assets. We're required to provide the code, but the build process is not something we're supporting.

freespeech4ever commented 4 years ago

i.e. you can see the commits on top of Brave.. all but the most recent one are pretty targeted, the most recent is after scripted conversion (plus a few build failures that needed fixing). https://github.com/gab-ai-inc/defiant-core/commits/1.10.99