You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Michael Dykman <md...@gmail.com> on 2014/03/05 00:33:50 UTC

C++ build under Ubuntu 12.04

I am getting errors running the cmake file in a *very* recent download
of the C++ driver's source tree.  It seems to be failing to find
either boost::asio or openssl libraries.  I defineately have these
both installed having developed against them recently (and rechecked
with dpkg today).

While I have brushed up against cmake before, I have never had to
modify CMakeLists.txt before.  Could someone please advise me how to
adjust that filoe so it can find the external dependencies?

-- 
 - michael dykman
 - mdykman@gmail.com

 May the Source be with you.

Re: C++ build under Ubuntu 12.04

Posted by Michael Dykman <md...@gmail.com>.
It looks like a cmake message error, as you suggested. Running 'make'
against the result of 'cmake' grinds through without an error and the
result is indeed linked to boost although it is not the multi-threaded
version of boost (which is installed on my system) as I would have
expected.

mdykman@sage:~/projects/datastax-cpp-driver$ ldd libcql.so
linux-vdso.so.1 =>  (0x00007fff61e88000)
libboost_system.so.1.46.1 => /usr/lib/libboost_system.so.1.46.1
(0x00007fe490a8b000)
libboost_thread.so.1.46.1 => /usr/lib/libboost_thread.so.1.46.1
(0x00007fe490872000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007fe490613000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
(0x00007fe490238000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe49001b000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe48fd1a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe48fa1e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe48f808000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe48f447000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe48f243000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fe48f02c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe4912dd000)

I will write up that bug report.  After lunch.

On Wed, Mar 5, 2014 at 1:08 PM, Michael Shuler <mi...@pbandjelly.org> wrote:
> On 03/05/2014 11:53 AM, Michael Dykman wrote:
>>
>> I stand corrected. I did not have libssh2 and while I did have
>> libboost-all-dev (see below), I did not have the all the specific
>> packages indicated
>>
>>   ii  libboost-all-dev                       1.48.0.2
>>               Boost C++ Libraries development files (ALL, default
>> version)
>>
>> So, I ran the full apt-get command that you suggested (as indicated in
>> instruction_win_lin.txt.txt):
>>
>>        sudo apt-get install build-essential cmake libasio-dev
>> libboost-system-dev libboost-thread-dev libboost-test-dev
>> libboost-program-options-dev libssh2-1-dev
>>
>> which succeeded and repeated the cmake steps.  As you can see from the
>> messages below, the boost::asio library is *still* not being found.
>>
>> mdykman@sage:~/projects/datastax-cpp-driver$ cmake  .
>> -- info CMAKE_BINARY_DIR: /home/mdykman/projects/datastax-cpp-driver
>> -- Could NOT find Boost
>> -- Found LIBSSH2: /usr/lib/libssh2.so
>> -- Configuring done
>> -- Generating done
>> -- Build files have been written to:
>> /home/mdykman/projects/datastax-cpp-driver
>>
>> I have thoroughly read instruction_win_lin.txt.txt but no solution is
>> presenting itself to me.  I am more than happy to do my own deep-dive
>> if someone could suggest how I go about instructing cmake to find the
>> boost libraries? Expand the search paths?
>
>
> Oh, I missed the NOT in my example, too.  Could you report this as a bug?
> I'm not sure if just the cmake message is an error, since it builds fine, or
> if it is, in fact, not finding/using the libs.
>
> https://datastax-oss.atlassian.net/browse/CPP
>
> --
> Michael



-- 
 - michael dykman
 - mdykman@gmail.com

 May the Source be with you.

Re: C++ build under Ubuntu 12.04

Posted by Michael Shuler <mi...@pbandjelly.org>.
On 03/05/2014 11:53 AM, Michael Dykman wrote:
> I stand corrected. I did not have libssh2 and while I did have
> libboost-all-dev (see below), I did not have the all the specific
> packages indicated
>
>   ii  libboost-all-dev                       1.48.0.2
>               Boost C++ Libraries development files (ALL, default
> version)
>
> So, I ran the full apt-get command that you suggested (as indicated in
> instruction_win_lin.txt.txt):
>
>        sudo apt-get install build-essential cmake libasio-dev
> libboost-system-dev libboost-thread-dev libboost-test-dev
> libboost-program-options-dev libssh2-1-dev
>
> which succeeded and repeated the cmake steps.  As you can see from the
> messages below, the boost::asio library is *still* not being found.
>
> mdykman@sage:~/projects/datastax-cpp-driver$ cmake  .
> -- info CMAKE_BINARY_DIR: /home/mdykman/projects/datastax-cpp-driver
> -- Could NOT find Boost
> -- Found LIBSSH2: /usr/lib/libssh2.so
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/mdykman/projects/datastax-cpp-driver
>
> I have thoroughly read instruction_win_lin.txt.txt but no solution is
> presenting itself to me.  I am more than happy to do my own deep-dive
> if someone could suggest how I go about instructing cmake to find the
> boost libraries? Expand the search paths?

Oh, I missed the NOT in my example, too.  Could you report this as a 
bug?  I'm not sure if just the cmake message is an error, since it 
builds fine, or if it is, in fact, not finding/using the libs.

https://datastax-oss.atlassian.net/browse/CPP

-- 
Michael

Re: C++ build under Ubuntu 12.04

Posted by Michael Dykman <md...@gmail.com>.
I stand corrected. I did not have libssh2 and while I did have
libboost-all-dev (see below), I did not have the all the specific
packages indicated

 ii  libboost-all-dev                       1.48.0.2
             Boost C++ Libraries development files (ALL, default
version)

So, I ran the full apt-get command that you suggested (as indicated in
instruction_win_lin.txt.txt):

      sudo apt-get install build-essential cmake libasio-dev
libboost-system-dev libboost-thread-dev libboost-test-dev
libboost-program-options-dev libssh2-1-dev

which succeeded and repeated the cmake steps.  As you can see from the
messages below, the boost::asio library is *still* not being found.

mdykman@sage:~/projects/datastax-cpp-driver$ cmake  .
-- info CMAKE_BINARY_DIR: /home/mdykman/projects/datastax-cpp-driver
-- Could NOT find Boost
-- Found LIBSSH2: /usr/lib/libssh2.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mdykman/projects/datastax-cpp-driver

I have thoroughly read instruction_win_lin.txt.txt but no solution is
presenting itself to me.  I am more than happy to do my own deep-dive
if someone could suggest how I go about instructing cmake to find the
boost libraries? Expand the search paths?

On Wed, Mar 5, 2014 at 12:14 PM, Michael Shuler <mi...@pbandjelly.org> wrote:
> On 03/05/2014 10:55 AM, Michael Dykman wrote:
>>
>> The only listed dependencies: boost and libssh.  I am not even
>> slightly uncertain if they are installed. Not only did I confirm them
>> yesterday via dpkg (having installed both via apt-get from Ubuntu's
>> core repos), I have been explicitly coding against them both for the
>> past several months on this same workstation.  I can see them all at
>> thier relative paths and have a couple of working make files then
>> reference them.  They are also the only items mentioned in the error
>> message when my build fails:
>>
>> mdykman@sage:~/projects/datastax-cpp-driver$ cmake .
>> -- info CMAKE_BINARY_DIR: /home/mdykman/projects/datastax-cpp-driver
>> -- Could NOT find Boost
>> CMake Error at
>> /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91
>> (MESSAGE):
>>    Could NOT find LIBSSH2 (missing: LIBSSH2_LIBRARIES
>> LIBSSH2_INCLUDE_DIRS)
>> Call Stack (most recent call first):
>>    /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252
>> (_FPHSA_FAILURE_MESSAGE)
>>    extra/ccm_bridge/cmake/Modules/FindLIBSSH2.cmake:51
>> (find_package_handle_standard_args)
>>    extra/ccm_bridge/CMakeLists.txt:37 (find_package)
>>
>>
>> -- Configuring incomplete, errors occurred!
>>
>> open ssl is installed in an obvious place "/usr/include/openssl/ssl.h"
>
>
> libssl != libssh
>
> The LIBSSH2 error is in the output I posted, along with the next command
> being the solution: 'apt-get install libssh2-1-dev'
>
>
>> as is boost:asio  "/usr/include/boost/asio.hpp"
>>
>> Does anyone have a hint as to how to edit/debug the search paths being
>> used by cmake?
>
>
> It's also documented in
> https://github.com/datastax/cpp-driver/blob/master/instruction_win_lin.txt.txt
> with the exception that libboost-filesystem-dev and libboost-log-dev (not
> available in wheezy/12.04) are no longer needed, per
> https://datastax-oss.atlassian.net/browse/CPP-36
>
> All in one line:
>
> sudo apt-get install build-essential cmake libasio-dev libboost-system-dev
> libboost-thread-dev libboost-test-dev libboost-program-options-dev
> libssh2-1-dev
>
> --
> Michael



-- 
 - michael dykman
 - mdykman@gmail.com

 May the Source be with you.

Re: C++ build under Ubuntu 12.04

Posted by Michael Shuler <mi...@pbandjelly.org>.
On 03/05/2014 10:55 AM, Michael Dykman wrote:
> The only listed dependencies: boost and libssh.  I am not even
> slightly uncertain if they are installed. Not only did I confirm them
> yesterday via dpkg (having installed both via apt-get from Ubuntu's
> core repos), I have been explicitly coding against them both for the
> past several months on this same workstation.  I can see them all at
> thier relative paths and have a couple of working make files then
> reference them.  They are also the only items mentioned in the error
> message when my build fails:
>
> mdykman@sage:~/projects/datastax-cpp-driver$ cmake .
> -- info CMAKE_BINARY_DIR: /home/mdykman/projects/datastax-cpp-driver
> -- Could NOT find Boost
> CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91
> (MESSAGE):
>    Could NOT find LIBSSH2 (missing: LIBSSH2_LIBRARIES LIBSSH2_INCLUDE_DIRS)
> Call Stack (most recent call first):
>    /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252
> (_FPHSA_FAILURE_MESSAGE)
>    extra/ccm_bridge/cmake/Modules/FindLIBSSH2.cmake:51
> (find_package_handle_standard_args)
>    extra/ccm_bridge/CMakeLists.txt:37 (find_package)
>
>
> -- Configuring incomplete, errors occurred!
>
> open ssl is installed in an obvious place "/usr/include/openssl/ssl.h"

libssl != libssh

The LIBSSH2 error is in the output I posted, along with the next command 
being the solution: 'apt-get install libssh2-1-dev'

> as is boost:asio  "/usr/include/boost/asio.hpp"
>
> Does anyone have a hint as to how to edit/debug the search paths being
> used by cmake?

It's also documented in 
https://github.com/datastax/cpp-driver/blob/master/instruction_win_lin.txt.txt 
with the exception that libboost-filesystem-dev and libboost-log-dev 
(not available in wheezy/12.04) are no longer needed, per 
https://datastax-oss.atlassian.net/browse/CPP-36

All in one line:

sudo apt-get install build-essential cmake libasio-dev 
libboost-system-dev libboost-thread-dev libboost-test-dev 
libboost-program-options-dev libssh2-1-dev

-- 
Michael

Re: C++ build under Ubuntu 12.04

Posted by Michael Dykman <md...@gmail.com>.
The only listed dependencies: boost and libssh.  I am not even
slightly uncertain if they are installed. Not only did I confirm them
yesterday via dpkg (having installed both via apt-get from Ubuntu's
core repos), I have been explicitly coding against them both for the
past several months on this same workstation.  I can see them all at
thier relative paths and have a couple of working make files then
reference them.  They are also the only items mentioned in the error
message when my build fails:

mdykman@sage:~/projects/datastax-cpp-driver$ cmake .
-- info CMAKE_BINARY_DIR: /home/mdykman/projects/datastax-cpp-driver
-- Could NOT find Boost
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91
(MESSAGE):
  Could NOT find LIBSSH2 (missing: LIBSSH2_LIBRARIES LIBSSH2_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252
(_FPHSA_FAILURE_MESSAGE)
  extra/ccm_bridge/cmake/Modules/FindLIBSSH2.cmake:51
(find_package_handle_standard_args)
  extra/ccm_bridge/CMakeLists.txt:37 (find_package)


-- Configuring incomplete, errors occurred!

open ssl is installed in an obvious place "/usr/include/openssl/ssl.h"

as is boost:asio  "/usr/include/boost/asio.hpp"

Does anyone have a hint as to how to edit/debug the search paths being
used by cmake?

On Wed, Mar 5, 2014 at 11:39 AM, Michael Shuler <mi...@pbandjelly.org> wrote:
> On 03/04/2014 05:33 PM, Michael Dykman wrote:
>>
>> I am getting errors running the cmake file in a *very* recent download
>> of the C++ driver's source tree.  It seems to be failing to find
>> either boost::asio or openssl libraries.  I defineately have these
>> both installed having developed against them recently (and rechecked
>> with dpkg today).
>>
>> While I have brushed up against cmake before, I have never had to
>> modify CMakeLists.txt before.  Could someone please advise me how to
>> adjust that filoe so it can find the external dependencies?
>>
>
> You shouldn't need to edit.  Perhaps you are just missing one of the
> dependencies and think you have everything installed  :)
>
> From a fresh ec2 instance:  http://12.am/tmp/cpp-driver_setup.txt
>
> That's how I work through build dependencies - granted that was quick,
> without searching apt-cache, since I've done this before and have a list of
> build deps.  Hope this helps!
>
> --
> Kind regards,
> Michael



-- 
 - michael dykman
 - mdykman@gmail.com

 May the Source be with you.

Re: C++ build under Ubuntu 12.04

Posted by Michael Shuler <mi...@pbandjelly.org>.
On 03/04/2014 05:33 PM, Michael Dykman wrote:
> I am getting errors running the cmake file in a *very* recent download
> of the C++ driver's source tree.  It seems to be failing to find
> either boost::asio or openssl libraries.  I defineately have these
> both installed having developed against them recently (and rechecked
> with dpkg today).
>
> While I have brushed up against cmake before, I have never had to
> modify CMakeLists.txt before.  Could someone please advise me how to
> adjust that filoe so it can find the external dependencies?
>

You shouldn't need to edit.  Perhaps you are just missing one of the 
dependencies and think you have everything installed  :)

 From a fresh ec2 instance:  http://12.am/tmp/cpp-driver_setup.txt

That's how I work through build dependencies - granted that was quick, 
without searching apt-cache, since I've done this before and have a list 
of build deps.  Hope this helps!

-- 
Kind regards,
Michael