Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on NetBSD #16

Closed
0323pin opened this issue Jun 29, 2023 · 10 comments
Closed

Build failure on NetBSD #16

0323pin opened this issue Jun 29, 2023 · 10 comments

Comments

@0323pin
Copy link
Contributor

0323pin commented Jun 29, 2023

Hi,

pkgsrc maintainer here.
Attempting to create a package for NetBSD, currently fails to build with the following error:

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

Caused by:
  process didn't exit successfully: `/usr/pkgsrc/wip/projectable/work/projectable-1.2.0/target/release/build/openssl-sys-9774f3ac53ec23c7/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_NETBSD_OPENSSL_NO_VENDOR
  X86_64_UNKNOWN_NETBSD_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-netbsd
  CC_x86_64-unknown-netbsd = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_netbsd
  CC_x86_64_unknown_netbsd = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = Some("gcc")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-netbsd
  CFLAGS_x86_64-unknown-netbsd = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_netbsd
  CFLAGS_x86_64_unknown_netbsd = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = Some("-pipe -O2 -fPIC -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include")
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:rerun-if-env-changed=AR_x86_64-unknown-netbsd
  AR_x86_64-unknown-netbsd = None
  cargo:rerun-if-env-changed=AR_x86_64_unknown_netbsd
  AR_x86_64_unknown_netbsd = None
  cargo:rerun-if-env-changed=HOST_AR
  HOST_AR = None
  cargo:rerun-if-env-changed=AR
  AR = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-netbsd
  ARFLAGS_x86_64-unknown-netbsd = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_netbsd
  ARFLAGS_x86_64_unknown_netbsd = None
  cargo:rerun-if-env-changed=HOST_ARFLAGS
  HOST_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  cargo:rerun-if-env-changed=RANLIB_x86_64-unknown-netbsd
  RANLIB_x86_64-unknown-netbsd = None
  cargo:rerun-if-env-changed=RANLIB_x86_64_unknown_netbsd
  RANLIB_x86_64_unknown_netbsd = None
  cargo:rerun-if-env-changed=HOST_RANLIB
  HOST_RANLIB = None
  cargo:rerun-if-env-changed=RANLIB
  RANLIB = None
  cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64-unknown-netbsd
  RANLIBFLAGS_x86_64-unknown-netbsd = None
  cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64_unknown_netbsd
  RANLIBFLAGS_x86_64_unknown_netbsd = None
  cargo:rerun-if-env-changed=HOST_RANLIBFLAGS
  HOST_RANLIBFLAGS = None
  cargo:rerun-if-env-changed=RANLIBFLAGS
  RANLIBFLAGS = None
  running cd "/usr/pkgsrc/wip/projectable/work/projectable-1.2.0/target/release/build/openssl-sys-73293c510d814956/out/openssl-build/build/src" && AR="ar" CC="gcc" RANLIB="ranlib" "perl" "./Configure" "--prefix=/usr/pkgsrc/wip/projectable/work/projectable-1.2.0/target/release/build/openssl-sys-73293c510d814956/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" "BSD-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-pipe" "-O2" "-fPIC" "-D_FORTIFY_SOURCE=2" "-I/usr/pkg/include" "-I/usr/include"
  Configuring OpenSSL version 1.1.1u (0x1010115fL) for BSD-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 cd "/usr/pkgsrc/wip/projectable/work/projectable-1.2.0/target/release/build/openssl-sys-73293c510d814956/out/openssl-build/build/src" && "make" "depend"
  running cd "/usr/pkgsrc/wip/projectable/work/projectable-1.2.0/target/release/build/openssl-sys-73293c510d814956/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=5,6 --jobserver-auth=5,6" "make" "build_libs"

  --- stderr
  make: illegal argument to -j -- must be positive integer!
  thread 'main' panicked at '


  Error building OpenSSL:
      Command: cd "/usr/pkgsrc/wip/projectable/work/projectable-1.2.0/target/release/build/openssl-sys-73293c510d814956/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=5,6 --jobserver-auth=5,6" "make" "build_libs"
      Exit status: exit status: 2


      ', /usr/pkgsrc/wip/projectable/work/vendor/openssl-src-111.26.0+1.1.1u/src/lib.rs:506:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
*** Error code 101

Stop.
make[1]: stopped

Don't really get this, I do have MAKE_JOBS= 4 in my build definitions and 4 is a positive integer.

@Absobel
Copy link
Contributor

Absobel commented Jun 29, 2023

You have : MAKEFLAGS="-j --jobserver-fds=5,6 [...]"
Is it maybe because there isn't any integer after the -j and it instead thinks the next option is its argument ?

@0323pin
Copy link
Contributor Author

0323pin commented Jun 29, 2023

@Absobel It turns out it needs gmake to build.

Compiling projectable v1.2.0 (/usr/pkgsrc/wip/projectable/work/projectable-1.2.0)
    Finished release [optimized] target(s) in 7m 02s

Now I just need to patch openssl-src to add missing arch definitions.

Keeping this open until I've tested and merged the package.

@0323pin
Copy link
Contributor Author

0323pin commented Jun 29, 2023

Ops ...

the MSRV for projectable is currently 1.70.x

Unfortunately, the merge will have to wait until Rust-1.70.0 is merged, currently we have only 1.69.0 in the main branch.
It builds fine on my machine but, I do have 1.70.0 in my system.

I've push the package to the WIP-repository and will merge as soon as we have Rust-1.70 in main.

When it's done, I can do a PR with NetBSD install instructions if you would like that.

@0323pin
Copy link
Contributor Author

0323pin commented Jun 29, 2023

http://mail-index.netbsd.org/pkgsrc-wip-changes/2023/06/29/msg027584.html

But, I'm still having issues,
2023-06-29-130755_871x400_scrot

@0323pin
Copy link
Contributor Author

0323pin commented Jun 29, 2023

Ahh ... prj --make-config creates only an empty file.
Actually adding a config file fixes it.

2023-06-29-131203_1366x768_scrot

@0323pin 0323pin closed this as completed Jun 29, 2023
@dzfrias
Copy link
Owner

dzfrias commented Jun 29, 2023

Nice work! I'm not sure why it fails when just --make-config has been run... I'll look into fixing that in the future. It doesn't happen on my system though.

@0323pin
Copy link
Contributor Author

0323pin commented Jun 30, 2023

Just so we can rule things out, what shell are you using and system?
I use a non-posix compliant shell, elvish which could be a reason.

I'll try switching to another shell just to check next time I build it.

@dzfrias
Copy link
Owner

dzfrias commented Jun 30, 2023

I'm using zsh on macOS. For 1.3.0, I tried attaching some extra context to the errors that could stem from the "app runtime" error, so maybe that'll point us in the direction. Other than that, I don't have many ideas as to what it could be...

@0323pin
Copy link
Contributor Author

0323pin commented Jul 1, 2023

Everything good on 1.3.0
prj --make-config still doesn't create a valid config file, only an empty one. But, the application starts fine regardless.

Just waiting for the Rust upgrade now.

@0323pin
Copy link
Contributor Author

0323pin commented Jul 11, 2023

@0323pin 0323pin mentioned this issue Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants