PhilipK / BoilR

Synchronize games from other platforms into your Steam library
Apache License 2.0
1.35k stars 41 forks source link

openssl error trying to run `cargo check` #334

Closed Dukeman330 closed 1 year ago

Dukeman330 commented 1 year ago

Describe the bug Not sure if this is the right place to ask - I'm new to Rust development but wanted to take a stab at adding a PR for EA App support. Unfortunately I'm having trouble getting my build environment set up on the steam deck. When I try to run cargo check I get an OpenSSL error:

error: failed to run custom build command for `openssl-sys v0.9.80`

Caused by:
  process didn't exit successfully: `/home/deck/dev/BoilR/target/debug/build/openssl-sys-cd5a47bfc0f8e607/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rustc-cfg=openssl
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running "perl" "./Configure" "--prefix=/home/deck/dev/BoilR/target/debug/build/openssl-sys-c80e29c2fe79ef3c/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64"
  Configuring OpenSSL version 1.1.1t (0x1010114fL) for linux-x86_64
  Using os-specific seed configuration
  Creating configdata.pm
  Creating Makefile

  **********************************************************************
  ***                                                                ***
  ***   OpenSSL has been successfully configured                     ***
  ***                                                                ***
  ***   If you encounter a problem while building, please open an    ***
  ***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
  ***   and include the output from the following command:           ***
  ***                                                                ***
  ***       perl configdata.pm --dump                                ***
  ***                                                                ***
  ***   (If you are new to OpenSSL, you might want to consult the    ***
  ***   'Troubleshooting' section in the INSTALL file first)         ***
  ***                                                                ***
  **********************************************************************
  running "make" "depend"
  running "make" "build_libs"
  /usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
      "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
  /usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
      "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
  /usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
      "-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
  make depend && make _build_libs
  make[1]: Entering directory '/home/deck/dev/BoilR/target/debug/build/openssl-sys-c80e29c2fe79ef3c/out/openssl-build/build/src'
  make[1]: Leaving directory '/home/deck/dev/BoilR/target/debug/build/openssl-sys-c80e29c2fe79ef3c/out/openssl-build/build/src'
  make[1]: Entering directory '/home/deck/dev/BoilR/target/debug/build/openssl-sys-c80e29c2fe79ef3c/out/openssl-build/build/src'
  cc  -I. -Iinclude -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -O2 -ffunction-sections -fdata-sections -fPIC -gdwarf-4 -fno-omit-frame-pointer -m64 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/home/deck/dev/BoilR/target/debug/build/openssl-sys-c80e29c2fe79ef3c/out/openssl-build/install/lib/engines-1.1\"" -DNDEBUG   -c -o apps/app_rand.o apps/app_rand.c
  make[1]: Leaving directory '/home/deck/dev/BoilR/target/debug/build/openssl-sys-c80e29c2fe79ef3c/out/openssl-build/build/src'

  --- stderr
  /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/cc1: error while loading shared libraries: libisl.so.23: cannot open shared object file: No such file or directory
  make[1]: *** [Makefile:671: apps/app_rand.o] Error 1
  make: *** [Makefile:175: build_libs] Error 2
  thread 'main' panicked at '

  Error building OpenSSL:
      Command: "make" "build_libs"
      Exit status: exit status: 2

      ', /home/deck/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.25.0+1.1.1t/src/lib.rs:499:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Any idea how I can resolve this?

Aisuko commented 1 year ago

Hi, @Dukeman330. It is good to hear about you want to do PR for supporting EA App. May you append more information about your environment? For example, the version for Rust, Cargo, and GCC version? I saw the error may related to gcc /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/cc1: error while loading shared libraries: libisl.so.23: cannot open shared object file: No such file or directory

This error means that the GCC compiler is unable to find the shared library libisl.so.23. This library is required by GCC for certain operations.

If your environment is Ubuntu please use this command sudo apt-get install libisl-dev

Reference: https://aur.archlinux.org/packages/atom-community-git

Aisuko commented 1 year ago

By the way, If you are still interested in making an effort on EA app support maybe we can work together.

Aisuko commented 1 year ago

This issue is related to #326

PhilipK commented 1 year ago

Getting the steam deck set up with a build environment is not that simple unfortunatly, specially if you don't want to break the "read only" os.

One suggestion I have is to look at podman and distrobox. That way you can run a container where you then can install all the dependencies needed to build boilr (and other programs.

The problem you are facing here is that the opensll library is needed by boilr when it needs to connect to online services like steamgriddb.

I will close this because it is not really related to a bug with boilr, and more is an issue with getting a rust environment running on the steamdeck.

There are plenty of guides out there for this issue. This is just one of them: https://www.ianwootten.co.uk/2022/11/30/how-to-setup-distrobox-on-the-steam-deck/