Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 655098 - dev-util/cargo-0.26.0 : error: static declaration of ‘BIO_meth_new’ follows non-static declaration
Summary: dev-util/cargo-0.26.0 : error: static declaration of ‘BIO_meth_new’ follows n...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: libressl-2.8.0
  Show dependency tree
 
Reported: 2018-05-06 18:40 UTC by Toralf Förster
Modified: 2020-02-22 10:17 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.59 KB, text/plain)
2018-05-06 18:40 UTC, Toralf Förster
Details
dev-util:cargo-0.26.0:20180506-183425.log (dev-util:cargo-0.26.0:20180506-183425.log,33.69 KB, text/plain)
2018-05-06 18:40 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,247.52 KB, text/plain)
2018-05-06 18:40 UTC, Toralf Förster
Details
environment (environment,75.14 KB, text/plain)
2018-05-06 18:41 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,13.28 KB, application/x-bzip)
2018-05-06 18:41 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,12.70 KB, application/x-bzip)
2018-05-06 18:41 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,21.95 KB, application/x-bzip)
2018-05-06 18:41 UTC, Toralf Förster
Details
cargo-internal-revbump-for-libressl-2.7 (cargo-0.27.0-r1.patch,2.85 KB, patch)
2018-06-11 17:23 UTC, Ulenrich
Details | Diff
build.log (rust-0.30.0, libressl-2.8.3) (build.log,23.08 KB, text/plain)
2019-02-26 20:59 UTC, Stefan Strogin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-05-06 18:40:49 UTC
>>> Install cargo-0.26.0 into /var/tmp/portage/dev-util/cargo-0.26.0/image/ category dev-util
!!! dobin: target/release/cargo does not exist
 * ERROR: dev-util/cargo-0.26.0::gentoo failed (install phase):
 *   dobin failed
 * 

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-no-multilib_libressl_20180501-234141

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-5.4.0 *

Available Python interpreters, in order of preference:
  [1]   python3.5
  [2]   python3.6 (fallback)
  [3]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby23 (with Rubygems) *



emerge -qpv dev-util/cargo
[ebuild   R   ] dev-util/cargo-0.26.0  USE="libressl -debug -doc"
Comment 1 Toralf Förster gentoo-dev 2018-05-06 18:40:52 UTC
Created attachment 530260 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-05-06 18:40:55 UTC
Created attachment 530262 [details]
dev-util:cargo-0.26.0:20180506-183425.log
Comment 3 Toralf Förster gentoo-dev 2018-05-06 18:40:58 UTC
Created attachment 530264 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-05-06 18:41:01 UTC
Created attachment 530266 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-05-06 18:41:04 UTC
Created attachment 530268 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-05-06 18:41:07 UTC
Created attachment 530270 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2018-05-06 18:41:10 UTC
Created attachment 530272 [details]
temp.tbz2
Comment 8 Ian Moone 2018-05-08 07:38:26 UTC
So the culprit is libgit2-sys-0.6.19, in which uses libgit2 0.26.0[1], which isn't compatible with LibreSSL 2.7.x. The soon-to-be released libgit2 0.27.1 seems to have fixed it[2].

[1]: https://github.com/alexcrichton/git2-rs/tree/libgit2-sys-0.6.19/libgit2-sys
[2]: https://github.com/libgit2/libgit2/pull/4607
Comment 9 Ulenrich 2018-05-23 16:10:51 UTC
@Ian Moone
After having installed libgit2-master.zip as dev-libs/libgit2-0.27.1 
(should be released these days)

I get the same failures for dev-util/cargo-0.27.0 - snippet:
###
[ 29%] Building C object src/CMakeFiles/git2internal.dir/global.c.o

--- stderr
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_CXX_COMPILER
    CMAKE_CXX_FLAGS


In file included from /tmp/portage/dev-util/cargo-0.27.0/work/cargo_home/gentoo/libgit2-sys-0.7.1/libgit2/src/global.c:14:0:
/tmp/portage/dev-util/cargo-0.27.0/work/cargo_home/gentoo/libgit2-sys-0.7.1/libgit2/src/streams/openssl.h:36:25: error: static declaration of ‘BIO_meth_new’ follows non-static declaration
 GIT_INLINE(BIO_METHOD*) BIO_meth_new(int type, const char *name)
                         ^~~~~~~~~~~~
In file included from /usr/include/openssl/evp.h:67:0,
                 from /usr/include/openssl/hmac.h:67,
                 from /usr/include/openssl/ssl.h:149,
                 from /tmp/portage/dev-util/cargo-0.27.0/work/cargo_home/gentoo/libgit2-sys-0.7.1/libgit2/src/streams/openssl.h:27,
                 from /tmp/portage/dev-util/cargo-0.27.0/work/cargo_home/gentoo/libgit2-sys-0.7.1/libgit2/src/global.c:14:
/usr/include/openssl/bio.h:338:13: note: previous declaration of ‘BIO_meth_new’ was here
 BIO_METHOD *BIO_meth_new(int type, const char *name);
             ^~~~~~~~~~~~
###
Comment 10 Ulenrich 2018-05-23 16:15:06 UTC
Of course this happens with masked dev-libs/libressl-2.7.3
Comment 11 Ulenrich 2018-05-23 16:38:07 UTC
Investigating further: failed cargo-0.27.0 used a previous libgit2
not my newly installed dev-libs/libgit2-0.27.1pre

:/ :(
Comment 12 David Seifert gentoo-dev 2018-05-26 08:40:57 UTC
Not a GCC 5 bug
Comment 13 Ulenrich 2018-05-30 00:50:08 UTC
libgit2-0.27.1 just released, see https://bugs.gentoo.org/656874
which should work with libressl-2.7.3
... but I don't know how to get this into cargos own "package management"
... which by the way I hate :(
Comment 14 Ulenrich 2018-05-30 13:21:35 UTC
(In reply to Ulenrich from comment #13)
> libgit2-0.27.1 just released, see https://bugs.gentoo.org/656874
> which should work with libressl-2.7.3
> ... but I don't know how to get this into cargos own "package management"
> ... which by the way I hate :(

... arrgh! 
libgit2-0.27.1 not solves libressl-2.7 issue "BIO_meth_new"
libressl-2.7 -> !libgit2 -> !cargo -> !rust -> firefox emerge not possible!
Comment 15 Ulenrich 2018-06-11 17:23:24 UTC
Created attachment 535670 [details, diff]
cargo-internal-revbump-for-libressl-2.7

Cargo needs an internal crate libgit2-sys-7.3 bump to successfully compile having installed the masked dev-libs/libressl-2.7.3

I just blindly tried this: I don't know anything about any libgit2-sys-7.3 Release notes etc ...
Comment 16 Ulenrich 2018-06-11 21:03:57 UTC
with libgit2-sys-7.3 cargo-0.27.0 compiled 
I tested rust and cargo successfully emerging firefox: 
---
# emerge -p -1 firefox

These are the packages that would be merged, in order:

Calculating dependencies  ... ........... done!
[ebuild   R    ] www-client/firefox-60.0.2::pmaci  USE="-bindist -custom-cflags -custom-optimization dbus -debug eme-free gmp-autoupdate hardened hwaccel -jack (-neon) pulseaudio screenshot (-selinux) -startup-notification system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite {-test} wifi" L10N="de -en-GB" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 17 Ulenrich 2018-06-13 11:24:52 UTC
(In reply to Ulenrich from comment #15)
> Cargo needs an internal crate libgit2-sys-7.3 bump to successfully compile
> having installed the masked dev-libs/libressl-2.7.3

Sorry, needs  libgit2-sys-0.7.3 
I lost the null somewhere, but my ebuild patch does correctly
Comment 18 Ulenrich 2018-06-28 18:32:05 UTC
dev-util/cargo-0.28.0 
misses to update libgit2-sys-0.7.3
therefore having libressl-2.7.x provokes the same error:
---
In file included from /srv/portage/dev-util/cargo-0.28.0/work/cargo_home/gentoo/libgit2-sys-0.7.1/libgit2/src/global.c:14:0:
/srv/portage/dev-util/cargo-0.28.0/work/cargo_home/gentoo/libgit2-sys-0.7.1/libgit2/src/streams/openssl.h:79:17: error: static declaration of ‘BIO_meth_set_ctrl’ follows non-static declaration
 GIT_INLINE(int) BIO_meth_set_ctrl(BIO_METHOD *biom, long (*ctrl) (BIO *, int, long, void *))
                 ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/evp.h:67:0,
                 from /usr/include/openssl/hmac.h:67,
                 from /usr/include/openssl/ssl.h:149,
                 from /srv/portage/dev-util/cargo-0.28.0/work/cargo_home/gentoo/libgit2-sys-0.7.1/libgit2/src/streams/openssl.h:27,
                 from /srv/portage/dev-util/cargo-0.28.0/work/cargo_home/gentoo/libgit2-sys-0.7.1/libgit2/src/global.c:14:
/usr/include/openssl/bio.h:350:5: note: previous declaration of ‘BIO_meth_set_ctrl’ was here
 int BIO_meth_set_ctrl(BIO_METHOD *biom, long (*ctrl)(BIO *, int, long, void *));
Comment 19 fkater 2018-07-01 14:50:14 UTC
Same here. Except using libressl-2.7.4 (not 2.7.3).

BTW: I had to upgrade from libressl-2.6.x to unstable 2.7.x as libtls has serious issues in 2.6.x.
Comment 20 Stefan Strogin gentoo-dev 2019-02-26 20:59:46 UTC
Created attachment 566614 [details]
build.log (rust-0.30.0, libressl-2.8.3)

Now with rust-0.30.0 and libressl-2.8.3 there is another error.

error: failed to run custom build command for `openssl-sys v0.9.36`
process didn't exit successfully: `/var/tmp/portage/dev-util/cargo-0.30.0/work/cargo-0.30.0/target/release/build/openssl-sys-845205bab685e5b1/build-script-main` (exit code: 101)
...
cargo:libressl_version_number=2080300f

--- stderr
thread 'main' panicked at '

This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
through 2.7, but a different version of OpenSSL was found. The build is now aborting
due to this version mismatch.

', /var/tmp/portage/dev-util/cargo-0.30.0/work/cargo_home/gentoo/openssl-sys-0.9.36/build/main.rs:537:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
Comment 21 Stefan Strogin gentoo-dev 2019-02-26 23:24:28 UTC
Updating openssl-sys will fix this issue. How about updating dev-util/cargo (and the crates)? It's current version is 0.33.0.
Comment 22 fkater 2019-02-27 08:15:27 UTC
(In reply to Stefan Strogin from comment #21)
> Updating openssl-sys will fix this issue. How about updating dev-util/cargo
> (and the crates)? It's current version is 0.33.0.

The r1 patch to cargo-0.33.0 may help, too: https://bugs.gentoo.org/678286
Comment 23 Georgy Yakovlev archtester gentoo-dev 2020-02-22 10:17:46 UTC
closing, we no longer have separate cargo and to my knowledge all rust versions in the tree work with libressl.