Bug 223500 - lang/rust: version mismatch with libressl 2.6.3
Summary: lang/rust: version mismatch with libressl 2.6.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Rust Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-07 20:57 UTC by Charlie Li
Modified: 2017-11-09 14:19 UTC (History)
4 users (show)

See Also:
dumbbell: maintainer-feedback+


Attachments
build with libressl 2.6.3, 2.6.4 (for future updates) (2.20 KB, patch)
2017-11-08 20:18 UTC, Ivan Rozhuk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Li freebsd_committer freebsd_triage 2017-11-07 20:57:50 UTC
With the latest updates to both security/libressl and security/libressl-devel to 2.6.3, those with DEFAULT_VERSIONS+=ssl=libressl in make.conf will encounter a build failure due to rust-1.21.0 only recognising libressl up to 2.6.0.

I'll see about doing up a possible patch for this today as I haven't been able to get Firefox to build ever since I updated -CURRENT three days ago, or someone can beat me to it. Whoever does it up, hopefully 1.22.0 will correct this upstream.
Comment 1 Ivan Rozhuk 2017-11-08 20:18:41 UTC
Created attachment 187865 [details]
build with libressl 2.6.3, 2.6.4 (for future updates)
Comment 2 Ivan Rozhuk 2017-11-08 20:21:10 UTC
Firefox build fail if option PORT_LLVM is set with error:
...
rm -f libmozillapkix.a
/tmp/ports/usr/ports/www/firefox/work/firefox-56.0.2/obj-x86_64-unknown-freebsd11.1/_virtualenv/bin/python /tmp/ports/usr/ports/www/firefox/work/firefox-56.0.2/config/expandlibs_gen.py -o libmozillapkix.a.desc pkixbuild.o pkixcert.o pkixcheck.o pkixder.o pkixnames.o pkixnss.o pkixocsp.o pkixresult.o pkixtime.o pkixverify.o  
gmake[7]: Leaving directory '/tmp/ports/usr/ports/www/firefox/work/firefox-56.0.2/obj-x86_64-unknown-freebsd11.1/security/pkix'
   Compiling simd v0.2.0
error[E0432]: unresolved import `x86::sse2`
  --> /tmp/ports/usr/ports/www/firefox/work/firefox-56.0.2/third_party/rust/simd/src/common.rs:17:10
   |
17 | use x86::sse2::common;
   |          ^^^^ Could not find `sse2` in `x86`

error: aborting due to previous error

error: Could not compile `simd`.
warning: build failed, waiting for other jobs to finish...
...

Use build in llvm as workaround.
Comment 3 Charlie Li freebsd_committer freebsd_triage 2017-11-08 20:42:31 UTC
(In reply to rozhuk.im from comment #2)
> Firefox build fail if option PORT_LLVM is set
That is being discussed in bug 223300 and bug 223342.
Comment 4 Charlie Li freebsd_committer freebsd_triage 2017-11-08 20:47:32 UTC
Just noticed—upstream has noticed and is close to merging.

https://github.com/sfackler/rust-openssl/pull/759
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-11-09 14:15:14 UTC
A commit references this bug:

Author: dumbbell
Date: Thu Nov  9 14:14:59 UTC 2017
New revision: 453810
URL: https://svnweb.freebsd.org/changeset/ports/453810

Log:
  lang/rust: Add support for LibreSSL 2.6.3

  Patches come from upstream:
      https://github.com/sfackler/rust-openssl

  PR:		223500
  Reported by:	Charlie Li <ml+freebsd-bugs@vishwin.info>

Changes:
  head/lang/rust/files/patch-src_vendor_openssl-sys_build.rs
  head/lang/rust/files/patch-src_vendor_openssl-sys_src_lib.rs
  head/lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_mod.rs
  head/lang/rust/files/patch-src_vendor_openssl_src_ssl_mod.rs
  head/lang/rust/files/patch-src_vendor_openssl_src_ssl_tests_mod.rs
Comment 6 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2017-11-09 14:17:44 UTC
Hi!

I just committed a revised patch, because the attached relied on existing support for LibreSSL 2.6.1 and 2.6.2. However, Rust 1.21.0 doesn't and there was a patch to add that.

Thank you to both of you for reporting and providing a patch!
Comment 7 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2017-11-09 14:18:45 UTC
By the way, the committed patch doesn't include LibreSSL 2.6.4 support because modifying build.rs isn't enough. It needs changes in openssl and openssl-sys crates and we must know the changes in that version before a patch can be created.