Bug 17088 - cmake - FindOpenSSL.cmake fails to find new version (1.0.2) of OpenSSL
Summary: cmake - FindOpenSSL.cmake fails to find new version (1.0.2) of OpenSSL
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL: https://cmake.org/Bug/view.php?id=15386
Whiteboard: has_procedure MGA5-64-OK MGA5-32-OK a...
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2015-11-04 22:09 CET by Florian Hubold
Modified: 2015-11-10 22:27 CET (History)
4 users (show)

See Also:
Source RPM: cmake
CVE:
Status comment:


Attachments

Description Florian Hubold 2015-11-04 22:09:15 CET
Description of problem:


Reported via upstream: https://cmake.org/Bug/view.php?id=15386
and also via a forum user when trying to build julia, cmake fails to find libopenssl during libgit2 build: https://github.com/JuliaLang/julia/issues/13871


CMake Error at /usr/share/cmake/Modules/FindOpenSSL.cmake:293 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:210 (FIND_PACKAGE)


CMake Error at /usr/share/cmake/Modules/FindOpenSSL.cmake:294 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:210 (FIND_PACKAGE)


CMake Error at /usr/share/cmake/Modules/FindOpenSSL.cmake:296 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:210 (FIND_PACKAGE)


CMake Error at /usr/share/cmake/Modules/FindOpenSSL.cmake:298 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:210 (FIND_PACKAGE)


-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found version ".0.0`") 





Reproducible: 

Steps to Reproduce:
Florian Hubold 2015-11-04 22:22:42 CET

Status: NEW => ASSIGNED
CC: (none) => doktor5000

Comment 1 Florian Hubold 2015-11-04 23:17:04 CET
Submitted to core/updates_testing as cmake-3.0.2-1.1.mga5 after confirming that the fix works as intended. will do an advisory tomorrow. My test was to build julia (to be exact the libgit2 build that julia pulls in) as documented in https://github.com/JuliaLang/julia
Comment 2 David Walser 2015-11-06 15:17:03 CET
Tomorrow has passed.  Just a friendly reminder to assign this to QA with an advisory and a test procedure (I guess it'll be building julia, hopefully you can a little more of a detailed procedure for that that QA members can follow).  Thanks.
Comment 3 Florian Hubold 2015-11-07 16:51:19 CET
Whoops, forgot about it, thanks for poking me :)


There's a new update canditate for testing in core/updates_testing:
cmake-3.0.2-1.1.mga5

You can test this by installing it and building anything with cmake that will be built against openssl, and hence uses the /usr/share/cmake/Modules/FindOpenSSL.cmake module to find it. An example would be libgit2.

This can be tested e.g. by building julia as follows, documented also at https://github.com/JuliaLang/julia/blob/master/README.md


git clone git://github.com/JuliaLang/julia.git && cd julia
git checkout release-0.4
make -j8  # -j specifies the number of simultaneous jobs and will greatly speed up the build


Or by building libgit2 alone as documented at
https://github.com/libgit2/libgit2/blob/master/README.md


Suggested advisory:
========================

cmake before version 3.1.2 has issues finding newer OpenSSL versions (newer then 1.0.0) with the module /usr/share/cmake/Modules/FindOpenSSL.cmake
This update fixes that.

References:
https://cmake.org/Bug/view.php?id=15386
========================

Updated packages in core/updates_testing:
========================
i586
cmake-3.0.2-1.1.mga5.i586
cmake-qtgui-3.0.2-1.1.mga5.i586

x86_64
cmake-qtgui-3.0.2-1.1.mga5.x86_64
cmake-3.0.2-1.1.mga5.x86_64


Source RPMs:
cmake-3.0.2-1.1.mga5.src.rpm

Assignee: doktor5000 => qa-bugs

claire robinson 2015-11-07 17:55:44 CET

Whiteboard: (none) => has_procedure

Comment 4 Len Lawrence 2015-11-10 18:14:43 CET
mga5  x86_64  Mate
Installed the updates and tried the build procedure for Julia as a user.
$ git clone git://github.com/JuliaLang/julia.git
Cloning into 'julia'...
remote: Counting objects: 158412, done.
remote: Compressing objects: 100% (139/139), done.
remote: Total 158412 (delta 70), reused 1 (delta 1), pack-reused 158272
Receiving objects: 100% (158412/158412), 88.18 MiB | 2.54 MiB/s, done.
Resolving deltas: 100% (120447/120447), done.
Checking connectivity... done.
$ cd julia
$ git checkout release-0.4
Branch release-0.4 set up to track remote branch release-0.4 from origin.
Switched to a new branch 'release-0.4'
$ make -j8
I am not going to try capturing the output but it looks to be going well....
All 8 cores blazing.
The build reached these stages:
Making all in mpi
Making all in doc
Making all in FAQ
Making all in tools
Making all in m4
then hit an error -
Makefile:51: recipe for target 'julia-deps' failed
make: *** [julia-deps] Error 2

What to do next?  Shall look at the makefile to see how far it got.

Shall try the other suggestion as well later.

CC: (none) => tarazed25

Comment 5 Len Lawrence 2015-11-10 18:32:21 CET
@line 51 of main Makefile:
julia-deps: | $(DIRS) $(build_datarootdir)/julia/base $(build_datarootdir)/julia/test
	@$(MAKE) $(QUIET_MAKE) -C deps

The base and test directories are populated with .jl files.
Something to do with the OR symbol?  I could try removing that.
Comment 6 Len Lawrence 2015-11-10 19:02:11 CET
Maybe it was a syntax error then.  Removed the pipe symbol, did "make clean" and started again.  All going well, core temperatures rocketed from 28°C to 55°.

Spoke too soon.  The build seemed to get further:
llvm[4]: ======= Finished Linking Release Unit test ADT (without symbols)
llvm[6]: Compiling sample.c for Release build
llvm[6]: Building Release Archive Library libsample.a
llvm[6]: Compiling main.c for Release build
llvm[6]: Linking Release executable Sample (without symbols)
llvm[6]: ======= Finished Linking Release Executable Sample (without symbols)
llvm[2]: ***** Completed Release Build
Makefile:51: recipe for target 'julia-deps' failed
make: *** [julia-deps] Error 2

Reinstating the old Makefile.  Over 20 years since I handled makefiles; never came across the | in a target definition.
Comment 7 Rémi Verschelde 2015-11-10 19:15:13 CET
(In reply to Len Lawrence from comment #4)
> Makefile:51: recipe for target 'julia-deps' failed
> make: *** [julia-deps] Error 2

That's not the error actually, it just mentions that an error happen while processing the "julia-deps" target. But the julia-deps target does a lot of stuff, and in the terminal output there must have been somewhere an "error: blabla".

Anyway the initial problem has already been checked by Florian and is fixed, and since it's quite a tedious process (first build julia, install it, then try to build libgit2 against the installed julia version), I'd say we could be content with testing CMake on any other CMake project.
Comment 8 Rémi Verschelde 2015-11-10 19:23:53 CET
Actually initializing the build for libgit2 should be enough.

$ git clone git://github.com/libgit2/libgit2.git
$ cd libgit2
$ cmake .

It should show this if lib64openssl-devel is installed:

-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found version "1.0.2d")

For me it worked both before the update and after, but I guess the important is that it works :)
Rémi Verschelde 2015-11-10 19:24:04 CET

Whiteboard: has_procedure => has_procedure MGA5-64-OK

Comment 9 Len Lawrence 2015-11-10 19:50:16 CET
@Rémi comment 8
Confirmed here.  cmake on libgit2 returned the same message.  So we can pass this for 64-bit.  I will run it in a 32-bit virtualbox just to dot the i's and cross the t's.
Thanks.
Comment 10 Len Lawrence 2015-11-10 19:58:36 CET
Right.  OK for i586.
Installed libopenssl-devel first then ran the test.
Len Lawrence 2015-11-10 19:58:58 CET

Whiteboard: has_procedure MGA5-64-OK => has_procedure MGA5-64-OK MGA5-32-OK

Rémi Verschelde 2015-11-10 20:05:46 CET

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Dave Hodgins 2015-11-10 21:32:52 CET

CC: (none) => davidwhodgins
Whiteboard: has_procedure MGA5-64-OK MGA5-32-OK => has_procedure MGA5-64-OK MGA5-32-OK advisory

Comment 11 Mageia Robot 2015-11-10 22:27:28 CET
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0180.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.