Skip to content

Commit

Permalink
Fix run ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
ladisgin committed Oct 23, 2023
1 parent df7f800 commit 596dbe8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
15 changes: 8 additions & 7 deletions docker/release_distribution_scripts/utbot_run_system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'!"
Expand Down
1 change: 0 additions & 1 deletion server/src/printers/NativeMakefilePrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion server/test/framework/TestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 596dbe8

Please sign in to comment.