Bug 216385 - devel/cargo (0.15.0) don't build with base OpenSSL
Summary: devel/cargo (0.15.0) don't build with base OpenSSL
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Jean-Sébastien Pédron
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-23 00:53 UTC by gja822
Modified: 2017-01-24 09:02 UTC (History)
0 users

See Also:
dumbbell: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gja822 2017-01-23 00:53:06 UTC
I have DEFAULT_VERSIONS+= ssl=base
Trying to upgrade devel/cargo from 0.14 to 0.15.0 gives the error:

     Running `/usr/ports/devel/cargo/work/cargo-0.15.0/target/release/build/openssl-sys-76c1fa79ef1208aa/build-script-build`
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for `openssl-sys v0.9.1`
process didn't exit successfully: `/usr/ports/devel/cargo/work/cargo-0.15.0/target/release/build/openssl-sys-76c1fa79ef1208aa/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=native=/usr/local/lib
cargo:include=/usr/local/include

--- stderr
thread 'main' panicked at 'failed to open header file at `openssl/opensslv.h` to learn
                    about OpenSSL's version number, looked inside:

[
    "/usr/local/include"
]

', /usr/ports/devel/cargo/work/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.1/build.rs:208
note: Run with `RUST_BACKTRACE=1` for a backtrace.

gmake[2]: *** [Makefile:111: cargo-x86_64-unknown-freebsd] Error 101
gmake[2]: Leaving directory '/usr/ports/devel/cargo/work/cargo-0.15.0'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/cargo
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/cargo
Comment 1 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2017-01-23 09:46:47 UTC
Hi!

Thanks for the bug report. I updated a patch queued for review to include a fix for this bug:
https://reviews.freebsd.org/D9295

Could you please try it?
Comment 2 gja822 2017-01-23 16:56:26 UTC
(In reply to Jean-Sébastien Pédron from comment #1)
Well, it has been built successfully when I applied patch (and deleted "2016-11-02/" prefix from the files.) Thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-01-23 21:56:15 UTC
A commit references this bug:

Author: dumbbell
Date: Mon Jan 23 21:55:49 UTC 2017
New revision: 432293
URL: https://svnweb.freebsd.org/changeset/ports/432293

Log:
  devel/cargo: Fix bootstrap checksum + use ${OPENSSLBASE}

  Because devel/cargo and lang/rust-nightly use a different DISTFILE with
  the same name, the wrong checksum and size was selected in devel/cargo.
  To fix this, keep the parent directory (a date) in the DISTFILE name.

  Also, depending on the value of DEFAULT_VERSION=ssl= and whether OpenSSL
  from ports is installed, the openssl-sys crate could fail to build.
  Passing OpenSSL location to make was way too complicated anyway. So
  simplify it and use ${OPENSSLBASE}. This was reported in PR 216385.

  Bump PORTREVISION to 1.

  PR:		216143, 216385
  Reported by:	gja822@narod.ru (216385, SSL build failure)
  Approved by:	antoine (mentor), jbeich
  Differential Revision:	https://reviews.freebsd.org/D9295

Changes:
  head/devel/cargo/Makefile
  head/devel/cargo/distinfo.amd64
  head/devel/cargo/distinfo.i386
Comment 4 gja822 2017-01-24 03:23:25 UTC
Somehow without deleting "2016-11-02/" it doesn't work for me. I haven't modified anything in vain if that worked without modification.

===>  Extracting for cargo-0.15.0_1
=> SHA256 Checksum OK for cargo-registry-0.15.0.tar.xz.
/usr/ports/Mk/Scripts/checksum.sh: cannot open 2016-11-02/cargo-nightly-x86_64-unknown-freebsd.tar.gz: No such file or directory
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/devel/cargo
*** Error code 1
Comment 5 gja822 2017-01-24 04:10:35 UTC
It happen I had to manually delete existed -nightly files form /distfiles
Comment 6 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2017-01-24 08:47:17 UTC
Yes, I had to do the same here. Perhaps an issue with the Ports framework.
Comment 7 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2017-01-24 09:02:10 UTC
FTR, someone else also reported in bug #216423 the same issue with the -nightly file not found.