Bug #72186 Change of WITH_BOOST setting ignored?
Submitted: 1 Apr 2014 13:12 Modified: 30 May 2014 14:10
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:mysql-5.7.4-labs-april OS:Any
Assigned to: Tor Didriksen CPU Architecture:Any

[1 Apr 2014 13:12] Hartmut Holzgraefe
Description:
This is a followup to my previous bug #72185, after the failed attempt with the relative WITH_BOOST path I tried to re-run cmake with an absolute path, but it kept trying the previous relative path instead:

_build > cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST=$HOME/my_boost
-- Running cmake version 2.8.12.1
-- Configuring with MAX_INDEXES = 64U
-- SIZEOF_VOIDP 8
-- MySQL 5.7.4-labs-april
-- Packaging as: mysql-5.7.4-labs-april-Linux-x86_64
-- Local boost dir LOCAL_BOOST_DIR-NOTFOUND
-- Local boost zip ../../my_boost/boost_1_55_0.tar.gz
-- tar xfz ../../my_boost/boost_1_55_0.tar.gz boost_1_55_0/boost
CMake Error: Problem with archive_read_open_file(): Failed to open '../../my_boost/boost_1_55_0.tar.gz'
CMake Error: Problem extracting tar: ../../my_boost/boost_1_55_0.tar.gz
-- BOOST_VERSION_NUMBER #define BOOST_VERSION 105400
CMake Warning at cmake/boost.cmake:175 (MESSAGE):
  Boost minor version found is 54 we need 55
Call Stack (most recent call first):
  CMakeLists.txt:461 (INCLUDE)

How to repeat:
Try running Cmake with a relative WITH_BOOST path first, then with an absolute path:

$ cmake [...] -DDOWNLOAD_BOOST=1 -DWITH_BOOST=../../my_boost

$ cmake [...] -DDOWNLOAD_BOOST=1 -DWITH_BOOST=$HOME/my_boost

first run is expected to fail (bug #21785), 2nd run still fails as it continues to use the path from the first cmake invocation

Suggested fix:
Make sure cached LOCAL_BOOST_ZIP path is not used if WITH_BOOST path changed
[2 Apr 2014 10:26] MySQL Verification Team
Hello Hartmut,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[2 Apr 2014 10:28] MySQL Verification Team
// with absolute path and relative oath

$ cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST=../../../my_boost
-- Running cmake version 2.8.12.2
-- Configuring with MAX_INDEXES = 64U
-- Looking for SHM_HUGETLB
-- Looking for SHM_HUGETLB - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void *
-- Check size of void * - done
-- SIZEOF_VOIDP 8
-- MySQL 5.7.4-labs-april
-- Packaging as: mysql-5.7.4-labs-april-Linux-x86_64
-- Local boost dir LOCAL_BOOST_DIR-NOTFOUND
-- Local boost zip LOCAL_BOOST_ZIP-NOTFOUND
-- Downloading boost_1_55_0.tar.gz to ../../../my_boost
-- [download 0% complete]
[...]
[...]
-- [download 100% complete]
-- tar xfz ../../../my_boost/boost_1_55_0.tar.gz boost_1_55_0/boost
CMake Error: Problem with archive_read_open_file(): Failed to open '../../../my_boost/boost_1_55_0.tar.gz'
CMake Error: Problem extracting tar: ../../../my_boost/boost_1_55_0.tar.gz
-- Looked for boost/version.hpp in ../../../my_boost and ../../../my_boost
CMake Error at cmake/boost.cmake:36 (MESSAGE):
  Could not find boost.  You can download it with -DDOWNLOAD_BOOST=1
  -DWITH_BOOST=<directory>
Call Stack (most recent call first):
  cmake/boost.cmake:149 (COULD_NOT_FIND_BOOST)
  CMakeLists.txt:461 (INCLUDE)

-- Configuring incomplete, errors occurred!
See also "/data/ushastry/setups/mysql-5.7.4-labs-april/574/CMakeFiles/CMakeOutput.log".

//

$ cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST=$HOME/my_boost
-- Running cmake version 2.8.12.2
-- Configuring with MAX_INDEXES = 64U
-- SIZEOF_VOIDP 8
-- MySQL 5.7.4-labs-april
-- Packaging as: mysql-5.7.4-labs-april-Linux-x86_64
-- Local boost dir LOCAL_BOOST_DIR-NOTFOUND
-- Local boost zip ../../../my_boost/boost_1_55_0.tar.gz
-- tar xfz ../../../my_boost/boost_1_55_0.tar.gz boost_1_55_0/boost
CMake Error: Problem with archive_read_open_file(): Failed to open '../../../my_boost/boost_1_55_0.tar.gz'
CMake Error: Problem extracting tar: ../../../my_boost/boost_1_55_0.tar.gz
-- Looked for boost/version.hpp in ../../../my_boost and /data/ushastry/my_boost
CMake Error at cmake/boost.cmake:36 (MESSAGE):
  Could not find boost.  You can download it with -DDOWNLOAD_BOOST=1
  -DWITH_BOOST=<directory>
Call Stack (most recent call first):
  cmake/boost.cmake:149 (COULD_NOT_FIND_BOOST)
  CMakeLists.txt:461 (INCLUDE)

-- Configuring incomplete, errors occurred!
See also "/data/ushastry/setups/mysql-5.7.4-labs-april/574/CMakeFiles/CMakeOutput.log".
[30 May 2014 14:10] Paul DuBois
Fixed in 5.7.5.

Affects no released version. No changelog entry needed.