diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index 8070e6e29..2dd4c1bf9 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -1,5 +1,7 @@ include(ExternalProject) +include(GNUInstallDirs) + include(ProcessorCount) ProcessorCount(NPROC) if (NPROC EQUAL 0) @@ -102,7 +104,7 @@ import_external_library(benchmark STATIC # setup fmt format import_external_library(fmt STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/fmt/lib/libfmt.a + ${CMAKE_CURRENT_SOURCE_DIR}/fmt/${CMAKE_INSTALL_LIBDIR}/libfmt.a ${CMAKE_CURRENT_SOURCE_DIR}/fmt/include # Skip testing. CMAKE_ARGS -DFMT_TEST=OFF) @@ -207,6 +209,6 @@ target_link_libraries(mgclient INTERFACE ${OPENSSL_LIBRARIES}) # Setup spdlog import_external_library(spdlog STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/spdlog/lib/libspdlog.a + ${CMAKE_CURRENT_SOURCE_DIR}/spdlog/${CMAKE_INSTALL_LIBDIR}/libspdlog.a ${CMAKE_CURRENT_SOURCE_DIR}/spdlog/include BUILD_COMMAND $(MAKE) spdlog) diff --git a/src/query/db_accessor.hpp b/src/query/db_accessor.hpp index 41a03d535..d9354d7eb 100644 --- a/src/query/db_accessor.hpp +++ b/src/query/db_accessor.hpp @@ -9,7 +9,25 @@ #include "storage/v2/id_types.hpp" #include "storage/v2/property_value.hpp" #include "storage/v2/result.hpp" + +/////////////////////////////////////////////////////////// +// Our communication layer and query engine don't mix +// very well on Centos because OpenSSL version avaialable +// on Centos 7 include libkrb5 which has brilliant macros +// called TRUE and FALSE. For more detailed explanation go +// to memgraph.cpp. +// +// Because of the replication storage now uses some form of +// communication so we have some unwanted macros. +// This cannot be avoided by simple include orderings so we +// simply undefine those macros as we're sure that libkrb5 +// won't and can't be used anywhere in the query engine. #include "storage/v2/storage.hpp" + +#undef FALSE +#undef TRUE +/////////////////////////////////////////////////////////// + #include "storage/v2/view.hpp" #include "utils/bound.hpp" #include "utils/exceptions.hpp" diff --git a/tests/drivers/java/v4_1/run.sh b/tests/drivers/java/v4_1/run.sh index a8e70f4e4..e36b0f7a4 100755 --- a/tests/drivers/java/v4_1/run.sh +++ b/tests/drivers/java/v4_1/run.sh @@ -22,8 +22,13 @@ if [ ! -f $REACTIVE_STREAM_DEP ]; then wget -nv https://repo1.maven.org/maven2/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar -O $REACTIVE_STREAM_DEP || exit 1 fi -javac -classpath .:$DRIVER:$REACTIVE_STREAM_DEP DocsHowToQuery.java -java -classpath .:$DRIVER:$REACTIVE_STREAM_DEP DocsHowToQuery +# CentOS 7 doesn't have Java version that supports var keyword +source ../../../../environment/util.sh + +if [[ "$( operating_system )" != "centos-7" ]]; then + javac -classpath .:$DRIVER:$REACTIVE_STREAM_DEP DocsHowToQuery.java + java -classpath .:$DRIVER:$REACTIVE_STREAM_DEP DocsHowToQuery +fi javac -classpath .:$DRIVER:$REACTIVE_STREAM_DEP MaxQueryLength.java java -classpath .:$DRIVER:$REACTIVE_STREAM_DEP MaxQueryLength diff --git a/tests/setup.sh b/tests/setup.sh index e0120a9db..e4d04cd3f 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -34,8 +34,8 @@ done pushd "$DIR/../libs/pymgclient" > /dev/null export MGCLIENT_INCLUDE_DIR="$DIR/../libs/mgclient/include" export MGCLIENT_LIB_DIR="$DIR/../libs/mgclient/lib" -python3 setup.py build -python3 setup.py install +CFLAGS="-std=c99" python3 setup.py build +CFLAGS="-std=c99" python3 setup.py install popd > /dev/null deactivate