openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
3.94k stars 3.46k forks source link

travis: compile check fails if package depends on libopenssl #5432

Closed val-kulkov closed 6 years ago

val-kulkov commented 6 years ago

Maintainer: @lynxis Attention: @champtar Environment: not applicable

Description:

Travis CI check of a pull request fails if the package depends on libopenssl. The "openssl compile" stage of the build process generates a number of error messages:

Doing certs/demo
ERROR: ld.so: object '/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../libcrypto.so.1.0.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../libssl.so.1.0.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../apps/openssl: 1: /tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../apps/openssl: Syntax error: "(" unexpected (expecting ")")
ERROR: ld.so: object '/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../libcrypto.so.1.0.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../libssl.so.1.0.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../apps/openssl: 1: /tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../apps/openssl: Syntax error: "(" unexpected (expecting ")")
WARNING: Skipping duplicate certificate dsa-ca.pem
ERROR: ld.so: object '/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../libcrypto.so.1.0.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../libssl.so.1.0.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../apps/openssl: 1: /tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../apps/openssl: Syntax error: "(" unexpected (expecting ")")
WARNING: Skipping duplicate certificate dsa-pca.pem
ERROR: ld.so: object '/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../libcrypto.so.1.0.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../libssl.so.1.0.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../apps/openssl: 1: /tmp/tmp.NNsRWyEKry/build_dir/target-mips_24kc_musl/openssl-1.0.2n/util/../apps/openssl: Syntax error: "(" unexpected (expecting ")")

See lines 4333-4345 of the actual Travis CI log containing error messages in PR #4370 for more details (the log may become unavailable if Travis CI logs expire at some point).

The error messages generated at the "openssl compile" stage trigger Travis CI build failure. See this line of code in .travis_do.sh: "exec_status '^ERROR' make "package/$pkg_name/compile" -j3 || RET=1".

It is important to note that despite these error messages, libopenssl builds successfully.

libopenssl is a core package. As core packages are not checked by .travis_do.sh, compilation of libopenssl ultimately succeeds, making it available for use by packages in the openwrt/packages feed.

I can think of two possible solutions to the issue:

  1. Create a patch to fix libopenssl build to eliminate '^ERROR' messages and thus prevent triggering travis build failures.
  2. Revise logic of .travis_do.sh.

Comments are requested.

val-kulkov commented 6 years ago

@lynxis @champtar : A patch to openssl has been suggested and posted to the LEDE-DEV mailing list.