[MDEV-7224] OQGraph compile error Created: 2014-11-27  Updated: 2015-01-19  Resolved: 2015-01-19

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Storage Engine - OQGRAPH
Affects Version/s: 10.0
Fix Version/s: 10.0.16

Type: Bug Priority: Critical
Reporter: Floren Munteanu Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: compile
Environment:

CentOS 6.6 x86_64



 Description   

This compile error made surface with 10.0.15, no issues are present for 10.0.14 with cmake.x86_64 2.8.12.2-4.el6:

Build

-- Configuring OQGraph
CMake Error at /usr/lib64/boost/Boost.cmake:536 (message):
  The imported target "boost_date_time-static" references the file
     "/usr/lib64/lib64/libboost_date_time.a"
  but this file does not exist.  Possible reasons include:
  * The file was deleted, renamed, or moved to another location.
  * An install or uninstall procedure did not complete successfully.
  * The installation package was faulty and contained
     "/usr/lib64/boost/Boost.cmake"
  but not all the files it references.
 
Call Stack (most recent call first):
  /usr/lib64/boost/BoostConfig.cmake:28 (include)
  /usr/share/cmake/Modules/FindBoost.cmake:177 (find_package)
  storage/oqgraph/CMakeLists.txt:4 (FIND_PACKAGE)

I believe _IMPORT_PREFIX is defined to "/usr/lib64" and concatenated with another "/lib64" string, which generates the "/usr/lib64/lib64" error listed above.
Can you please provide a temporary patch that I could apply? Thanks.



 Comments   
Comment by Elena Stepanova [ 2014-11-27 ]

Please provide all your cmake options.

Comment by Elena Stepanova [ 2014-11-28 ]

Are you sure that you
a) haven't upgraded the system recently (e.g. cmake version)?
b) really can compile 10.0.14 from scratch, after you remove CMakeCache.txt file?

If it's a "Yes" for b), could you please remove CMakeCache.txt for both, re-run cmake (which will pass for 10.0.14 and fail for 1.0.15), and paste output of cmake . -LA for both?

Thanks.

Comment by Floren Munteanu [ 2014-11-29 ]

Elena,

As previously posted, yes I can compile 10.0.14 with same identical setup. Why do I have to compile it "from scratch"? I compile it with a standard rpmbuild, you don't compile neither your packages "from scratch" but rather use the UseRPMTools CMake module.

The issue is simple, there is a double concatenation for "/lib64". Can you please let me know in what file this occurs? I will create the patch myself.

Comment by Elena Stepanova [ 2014-11-30 ]

Floren,

"From scatch" in this context was just a short word for "after you remove CMakeCache.txt". And yes, we do actually build our packages on a clean source dir without a previously saved CMakeCache.
And no, you don't have to compile any particular way, it was requested as an experiment in order to make the answer more obvious and spare further argument. Apparently it was a wishful thinking.
But never mind, we can do it your way.

The issue is simple, there is a double concatenation for "/lib64". Can you please let me know in what file this occurs? I will create the patch myself.

It occurs in /usr/lib64/boost/Boost-relwithdebinfo.cmake. Please feel free to submit a patch to boost.
See more details here: http://stackoverflow.com/questions/21214045/got-usr-lib64-lib64-while-using-cmake-with-boost

And yes, it fails exactly the same way on 10.0.14. My guess is that you upgraded cmake recently (maybe unknowingly, as a part of system upgrade). Without the requested output of cmake . -LA I'll refrain from guessing why it still works for you on 10.0.14.

Thanks for the report, we might need to consider prohibiting certain combinations of cmake/boost or look into other workarounds.

Comment by Elena Stepanova [ 2014-11-30 ]

serg,

Summary of the above:

Apparently CentOS 6.x recently upgraded cmake from 2.6.x to 2.8.12. A lovely mix of it and boost 1.41 causes the error quoted in the description.

The problem is described here:
http://stackoverflow.com/questions/9948375/cmake-find-package-succeeds-but-returns-wrong-path
http://stackoverflow.com/questions/21214045/got-usr-lib64-lib64-while-using-cmake-with-boost

RHEL might also be affected.

I don't know if it's possible to get the cmake option mentioned in the first link work, if so, it should probably be done. Otherwise we might have to make our cmake config more picky about versions of cmake and boost.

Comment by Floren Munteanu [ 2014-11-30 ]

Elena,

You are correct, I just compiled yesterday MariaDB 10.0.14 with cmake 2.8.12 and boost 1.41, it fails at same place. My apologies, I was able to compile successfully 10.0.14 prior RHEL 6.6 upgrade. Do you know if the issue still occurs with boost 1.53+? I will create a more updated boost rpm, instead of fiddling with patches.

Comment by Elena Stepanova [ 2014-11-30 ]

Floren,

Do you know if the issue still occurs with boost 1.53+

I can't tell for sure. I know that our build machines use cmake 2.8.12 and boost 1.49 and build successfully, but it might be because we use a source build of boost. As I understand, the erroneous files come not from boost repo, but from RHEL packages of boost, so maybe if you create RPMs yourself, you won't have the problem at all.
serg might know more details and correct me if I'm wrong.

Upd: also found this https://bugzilla.redhat.com/show_bug.cgi?id=849791

Comment by Floren Munteanu [ 2014-11-30 ]

Elena,

Can you compile fine 10.0.15 on RHEL7 with base rpms? If you do, then boost 1.53+ should work. I'll build boost 1.55 rpm for RHEL 6.6 and report back to see if I get same error.

Comment by Elena Stepanova [ 2014-11-30 ]

We build on CentOS 7 with cmake 2.8.11 and boost 1.53, yes. However, I'm not sure whether it's boost from RHEL rpms or a from a source build (can't reach the machine to check).

Generated at Thu Feb 08 07:17:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.