Search order for include files needs to hit /.../cpp-driver/include first.

Description

Build failed because:

cpp-driver/src/request.hpp:72:29: error: use of undeclared identifier 'CASS_UINT64_MAX'

Compile line was:

/usr/bin/CC -DCASS_USE_OPENSSL -DCASS_USE_STD_ATOMIC -I/usr/local/include -I/home/peter.dasilva/git/cpp-driver/include -I/home/peter.dasilva/git/cpp-driver/src -I/home/peter.dasilva/git/cpp-driver/src/ssl -I/home/peter.dasilva/git/cpp-driver/src/third_party/rapidjson -std=c++11 -Wall -pedantic -Wextra -Wno-long-long -Wno-unused-parameter -Wno-variadic-macros -Wno-zero-length-array -Wno-unused-local-typedef -Wno-unknown-warning-option -Werror -fPIC -DLOG_FILE_=\"src/abstract_data.cpp\" -o CMakeFiles/cpp-driver.dir/src/abstract_data.cpp.o -c /home/peter.dasilva/git/cpp-driver/src/abstract_data.cpp

The root cause was:

Previous version of cpp-drivers was installed, so there was a /usr/local/include/cassandra.h without CASS_UINT64_MAX defined. Since the compile line generated by cmake specified -I/usr/local/include before -I/home/peter.dasilva/git/cpp-driver/include, this was being used by the build.

Workaround was:

Remove the previous install of the drivers.

Suggested fix:

Modify the cmake configuration to reverse the order of the generated -I options, so the include files consistent with this version of cpp-drivers are installed. I am not familiar enough with cmake to delve into this further myself, so I can't provide a patch.

Environment

FreeBSD 10.1-RELEASE amd64

Pull Requests

None

Activity

Show:

Michael Penick 
July 12, 2016 at 4:31 PM

Fixed

Details

Assignee

Reporter

Labels

Reproduced in

Sprint

Fix versions

Affects versions

Priority

Created June 29, 2016 at 4:33 PM
Updated January 16, 2017 at 8:43 PM
Resolved September 2, 2016 at 3:22 PM