diff --git a/docker/release_distribution_scripts/utbot_run_system.sh b/docker/release_distribution_scripts/utbot_run_system.sh index 8960b0ed5..843c486c7 100644 --- a/docker/release_distribution_scripts/utbot_run_system.sh +++ b/docker/release_distribution_scripts/utbot_run_system.sh @@ -39,18 +39,19 @@ export UTBOT_LOGS_FOLDER=$UTBOT_ALL export UTBOT_INSTALL_DIR=$UTBOT_ALL/install export CC=$UTBOT_ALL/install/bin/clang export CXX=$UTBOT_ALL/install/bin/clang++ -export CPATH=$UTBOT_ALL/klee/include:$CPATH # Path for C and C++ includes -export PATH=$UTBOT_ALL/bear/bin:$UTBOT_ALL/klee/bin:$UTBOT_INSTALL_DIR/bin:$PATH +export CPATH=$UTBOT_ALL/klee/include${CPATH:+:${CPATH}} # Path for C and C++ includes +export PATH=$UTBOT_ALL/bear/bin:$UTBOT_ALL/klee/bin:$UTBOT_INSTALL_DIR/bin${PATH:+:${PATH}} export KLEE_RUNTIME_LIBRARY_PATH=$UTBOT_ALL/klee/lib/klee/runtime/ # If the system is opensuse, variable is not empty. It is empty otherwise. IS_SUSE="$(grep '^NAME=' /etc/os-release | tr '[:upper:]' '[:lower:]' | grep suse)" # Setting environment variables for debian packages -export PATH=$UTBOT_ALL/debs-install/usr/bin:$PATH -export LD_LIBRARY_PATH=$UTBOT_ALL/install/lib:$UTBOT_ALL/debs-install/lib/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/lib/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/local/lib:$UTBOT_ALL/debs-install/lib:$UTBOT_ALL/debs-install/usr/lib:$LD_LIBRARY_PATH -export CPATH=$UTBOT_ALL/debs-install/usr/lib/gcc/x86_64-linux-gnu/9/include:$UTBOT_ALL/debs-install/usr/local/include:$UTBOT_ALL/debs-install/usr/include/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/include:$CPATH -export CPLUS_INCLUDE_PATH=$UTBOT_ALL/debs-install/usr/include/c++/9:$UTBOT_ALL/debs-install/usr/include/x86_64-linux-gnu/c++/9:$UTBOT_ALL/debs-install/usr/include/c++/9/backward:$CPLUS_INCLUDE_PATH +export PATH=$UTBOT_ALL/debs-install/usr/bin${PATH:+:${PATH}} +export LD_LIBRARY_PATH=$UTBOT_ALL/install/lib:$UTBOT_ALL/debs-install/lib/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/lib/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/local/lib:$UTBOT_ALL/debs-install/lib:$UTBOT_ALL/debs-install/usr/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} +export GENERAL_INCLUDES=$UTBOT_ALL/debs-install/usr/lib/gcc/x86_64-linux-gnu/9/include:$UTBOT_ALL/debs-install/usr/local/include:$UTBOT_ALL/debs-install/usr/include/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/include +export C_INCLUDE_PATH=GENERAL_INCLUDES${C_INCLUDE_PATH:+:${C_INCLUDE_PATH}} +export CPLUS_INCLUDE_PATH=$UTBOT_ALL/debs-install/usr/include/c++/9:$UTBOT_ALL/debs-install/usr/include/x86_64-linux-gnu/c++/9:$UTBOT_ALL/debs-install/usr/include/c++/9/backward:GENERAL_INCLUDES${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}} export LDFLAGS="-fuse-ld=gold $LDFLAGS" # This function moves dev version of libc into $UTBOT_ALL/debs-install directory @@ -133,7 +134,7 @@ then PROJECT_PATH=$4 mkdir -p $PROJECT_PATH/build cd $PROJECT_PATH/build || exit - + if [ -f "../$UTBOT_BUILD_SCRIPT" ] then echo "Trying to run '$UTBOT_BUILD_SCRIPT'!" diff --git a/server/src/printers/NativeMakefilePrinter.cpp b/server/src/printers/NativeMakefilePrinter.cpp index fc120bebd..fb9011801 100644 --- a/server/src/printers/NativeMakefilePrinter.cpp +++ b/server/src/printers/NativeMakefilePrinter.cpp @@ -250,7 +250,6 @@ namespace printer { } compileCommand.setOptimizationLevel(OPTIMIZATION_FLAG); - compileCommand.addEnvironmentVariable("C_INCLUDE_PATH", "$UTBOT_LAUNCH_INCLUDE_PATH"); compileCommand.addFlagToBegin(FPIC_FLAG); compileCommand.addFlagsToBegin(SANITIZER_NEEDED_FLAGS); compileCommand.addFlagsToBegin( diff --git a/server/test/framework/TestUtils.cpp b/server/test/framework/TestUtils.cpp index 6f1da86f9..931524c50 100644 --- a/server/test/framework/TestUtils.cpp +++ b/server/test/framework/TestUtils.cpp @@ -325,7 +325,7 @@ namespace testUtils { case CompilationUtils::CompilerName::GCC: return StringUtils::stringFormat( "rm -rf build_gcc && mkdir -p build_gcc && cd build_gcc && " - "export CC=%s && export CXX=%s && export C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH", + "export CC=%s && export CXX=%s", Paths::getGcc(), Paths::getGpp()); case CompilationUtils::CompilerName::CLANG: return StringUtils::stringFormat(