[CXX-980] Header files are not well copied by make install Created: 28/Jul/16  Updated: 01/Aug/16  Resolved: 01/Aug/16

Status: Closed
Project: C++ Driver
Component/s: Release
Affects Version/s: 3.0.1
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: florian bernard Assignee: David Golden
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

cmake version 3.6.0

Only following header files are well copied :
/usr/local/include/mongocxx/v_noabi/mongocxx/config/config.hpp
/usr/local/include/mongocxx/v_noabi/mongocxx/config/export.hpp
/usr/local/include/mongocxx/v_noabi/mongocxx/config/version.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/config/config.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/config/export.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/config/version.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/algorithm.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/any.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/functional.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/iterator.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/memory.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/numeric.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/optional.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/range.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/string.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/type_traits.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/utility.hpp
/usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc/core/variant.hpp

I followed instructions from wiki :
git clone -b master https://github.com/mongodb/mongo-cxx-driver
git checkout r3.0.1
PKG_CONFIG_PATH=/usr/local/bin/pkg-config cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install

Install the project...
– Install configuration: "Release"
– Installing: /usr/local/include/bsoncxx/v_noabi/bsoncxx/config/export.hpp
– Installing: /usr/local/lib/libbsoncxx.3.0.1.dylib
– Up-to-date: /usr/local/lib/libbsoncxx._noabi.dylib
– Up-to-date: /usr/local/lib/libbsoncxx.dylib
– Installing: /usr/local/lib/libbsoncxx.a
– Installing: /usr/local/lib/cmake/libbsoncxx-3.0.1/libbsoncxx-config.cmake
– Installing: /usr/local/lib/cmake/libbsoncxx-3.0.1/libbsoncxx-config-version.cmake
– Installing: /usr/local/include/bsoncxx/v_noabi/bsoncxx/config/config.hpp
– Installing: /usr/local/include/bsoncxx/v_noabi/bsoncxx/config/version.hpp
– Installing: /usr/local/lib/pkgconfig/libbsoncxx.pc
– Installing: /usr/local/include/mongocxx/v_noabi/mongocxx/config/export.hpp
– Installing: /usr/local/lib/libmongocxx.3.0.1.dylib
– Up-to-date: /usr/local/lib/libmongocxx._noabi.dylib
– Up-to-date: /usr/local/lib/libmongocxx.dylib
– Installing: /usr/local/lib/libmongocxx.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /usr/local/lib/libmongocxx.a(libmongoc.cpp.o) has no symbols
– Installing: /usr/local/lib/cmake/libmongocxx-3.0.1/libmongocxx-config.cmake
– Installing: /usr/local/lib/cmake/libmongocxx-3.0.1/libmongocxx-config-version.cmake
– Installing: /usr/local/include/mongocxx/v_noabi/mongocxx/config/config.hpp
– Installing: /usr/local/include/mongocxx/v_noabi/mongocxx/config/version.hpp
– Installing: /usr/local/lib/pkgconfig/libmongocxx.pc

find /usr/local/include/mongocxx/v_noabi/mongocxx/config/
/usr/local/include/mongocxx/v_noabi/mongocxx/config/
/usr/local/include/mongocxx/v_noabi/mongocxx/config//config.hpp
/usr/local/include/mongocxx/v_noabi/mongocxx/config//export.hpp
/usr/local/include/mongocxx/v_noabi/mongocxx/config//version.hpp



 Comments   
Comment by florian bernard [ 01/Aug/16 ]

Ok.

Comment by David Golden [ 01/Aug/16 ]

The build directory you send has CMAKE_INSTALL_PREFIX:PATH=/tmp/mongo-cxx-driver/build/install rather than CMAKE_INSTALL_PREFIX:PATH=/usr/local. Perhaps that got left off.

In any case, since you have a workaround and say it's not important, I'm going to close this ticket.

Comment by florian bernard [ 01/Aug/16 ]

Hello,
i try again and headers still not copied.
The build directory was empty and i have no CMAKE environment variables.

Here is my build folder just after the cmake and before the make command : https://www.wetransfer.com/downloads/215470e0eadd47f6653fab87e114f76120160801125225/fd65c2049e7f536a1972ead09e7c5e3220160801125225/fae26c

Workaround i copied manually the missing headers files in /usr/local/include/mongocxx . So this issue is not really important.

Comment by David Golden [ 29/Jul/16 ]

Hi, Florian. I can't replicate this on OS X 10.11.6 with AppleClang 7.30.7030031 and cmake 3.5.2 or 3.6.1 (the two versions I had available). Nor could another colleague.

My suggestions:

  • Upgrade to cmake 3.6.1 just in case there's some bugfix that fixes things (though the release notes don't show much)
  • Make sure you are trying with an empty build directory
  • Make sure you have no CMAKE environment variables set

If it still doesn't work, my next idea is for you to upload your build directory somewhere as a .tar.gz file AFTER running cmake but BEFORE running make and send us a download link. We can dig through and compare against our own generated build files.

Comment by florian bernard [ 28/Jul/16 ]

Hello,
yes i did the 'cd build'.
i installed libmongoc in /usr/local/lib
Here the cmake command and the cmake output (i remove the PKG_CONFIG_PATH):

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ../
– The CXX compiler identification is AppleClang 7.3.0.7030031
– Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
– Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– The C compiler identification is AppleClang 7.3.0.7030031
– Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
– Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Checking for module 'libbson-1.0>=1.3.4'
– Found libbson-1.0, version 1.3.5
– Found LIBBSON: TRUE
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
– Performing Test COMPILER_HAS_DEPRECATED_ATTR
– Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
– Checking for module 'libmongoc-1.0>=1.3.4'
– Found libmongoc-1.0, version 1.3.5
– Found LIBMONGOC: TRUE
– Configuring done
– Generating done
– Build files have been written to: /Users/fbernard/Documents/work/projects/invidam/tests/mongo/mongo-cxx-driver/build

the "make" and the "make install" work but some hpp files missing in my "/usr/local/include/mongocxx" folder

Comment by David Golden [ 28/Jul/16 ]

Hello and thanks for filing a ticket.

Could you please clarify the following:

  • I see that you don't have 'cd build' in your list of instructions from the wiki. Did you do that or not?
  • Your PKG_CONFIG_PATH appears to be the path to your pkg-config binary, not to the location of the pkgconfig directory. For example, for me, that's PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/, though usually pkg-config knows to look there automatically. Where did you install libmongoc?

Could you please include the output from cmake?

Thank you.

Generated at Wed Feb 07 22:00:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.