Bug #69854 Gmock download extraction issue

Submitted: 26 Jul 2013 23:54 Modified: 8 Jan 2014 22:55
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.7.4 OS:Any
Assigned to: Tor Didriksen CPU Architecture:Any

[26 Jul 2013 23:54] Roel Van de Paar
Description:
Following the steps on http://dev.mysql.com/doc/internals/en/cmake-howto-short-version.html to build a debug server;

mkdir bld_debug
cd bld_debug 
cmake .. -DCMAKE_BUILD_TYPE=Debug 

Results in 

-- Googlemock was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source.

So, wiping the bld_debug directory empty and now using;

cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_DOWNLOADS=1

Results in 

-- Successfully downloaded http://googlemock.googlecode.com/files/gmock-1.6.0.zip to /bzr/mysql-5.6.12/source_downloads
CMake Error: Problem with tar_extract_all(): Invalid argument
CMake Error: Problem extracting tar: /bzr/mysql-5.6.12/source_downloads/gmock-1.6.0.zip

The file is there

[roel@qaserver bld_debug]$ ls -l /bzr/mysql-5.6.12/source_downloads/
total 2008
-rw-rw-r-- 1 roel roel 2053682 Jul 27 09:44 gmock-1.6.0.zip

Adding -DBUILD_CONFIG=mysql_release makes no difference.

How to repeat:
Fix the tar_extract_all() "invalid argument" issue

Suggested fix:
Workaround: run this first (making sure the file is there [or elsewhere]):

export WITH_GMOCK=/bzr/gmock-1.6.0.zip
[27 Jul 2013 0:03] Roel Van de Paar
Actually, workaround doesn't work either in MySQL (it does in Percona Server when using ./build/build-binary.sh):

-- Local gmock zip /bzr/gmock-1.6.0.zip
CMake Error: Problem with tar_extract_all(): Invalid argument
CMake Error: Problem extracting tar: /bzr/gmock-1.6.0.zip

The issue also does not seem to be zip/tar related:

unzip gmock-1.6.0.zip
tar -zhcf gmock-1.6.0.tar.gz ./gmock-1.6.0
export WITH_GMOCK=/bzr/gmock-1.6.0.tar.gz
cd source_dir/bld_debug  # and deleted anything there
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_CONFIG=mysql_release ..

Gives this result;

-- Local gmock zip LOCAL_GMOCK_ZIP-NOTFOUND
-- Googlemock was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source.
[27 Jul 2013 4:44] MySQL Verification Team
Hello Roel,

Thank you for the bug report. 
Verified as described.

Thanks,
Umesh
[27 Jul 2013 13:49] Peter Laursen
The referenced docs page (http://dev.mysql.com/doc/internals/en/cmake-howto-short-version.html) could also need beter formatting (some additional blank lines inserted for more easy distinguishing of the structure).
[2 Sep 2013 14:39] Tor Didriksen
hello Roel, what cmake version are you using?
[4 Sep 2013 5:48] Roel Van de Paar
$ cmake --version
cmake version 2.6-patch 4

May have been different when I tested this bug though. If it's version related, let me know and I can test more.
[11 Dec 2013 12:58] Tor Didriksen
Fixed by the patch for 
Bug#17826757 CMAKE SUPPORT FOR GCC ON SOLARIS
which bumped the minimum required cmake version to 2.8.2
[11 Dec 2013 13:00] Tor Didriksen
Posted by developer:
 
Fixed by the patch for 
Bug#17826757 CMAKE SUPPORT FOR GCC ON SOLARIS
which bumped the minimum required cmake version to 2.8.2
[8 Jan 2014 18:16] Paul DuBois
Noted in 5.7.4 changelog.

Downloading of the Google Mock library could fail during
configuration. This is fixed by requiring CMake 2.8.2 or higher.
[8 Jan 2014 22:55] Roel Van de Paar
Thanks guys

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.085 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.