Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
Upgrade Boost for KUKSA.val Server
Browse files Browse the repository at this point in the history
Background reason:

Newer gcc versions give more warnings, and we treat warnings as errors.
We get a warning on boost that has been fixed in recent Boost versions

/home/erik/kuksa.val/kuksa-val-server/build/_deps/boost-build/include/boost/thread/pthread/thread_data.hpp:61:19: error: comparison of integer expressions of different signedness: ‘std::size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Werror=sign-compare]
   61 |           if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
      |                   ^
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
  • Loading branch information
erikbosch committed Jul 17, 2023
1 parent 1ad42da commit 7ea6026
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kuksa-val-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ First install the required packages. On Ubuntu 20.04 this can be achieved by
sudo apt install cmake build-essential libssl-dev libmosquitto-dev
```

**Note**: If you use `cmake >= 3.14`, you do not need to install boost on your system. `cmake` will download the required boost for building. Otherwise you need install the [`boost==1.75`](https://www.boost.org/users/history/version_1_75_0.html) on the system.
**Note**: If you use `cmake >= 3.14`, you do not need to install boost on your system. `cmake` will download the required boost for building. Otherwise you need install the [`boost==1.82`](https://www.boost.org/users/history/version_1_82_0.html) on the system.



Expand Down
12 changes: 10 additions & 2 deletions kuksa-val-server/boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@
# Contributors:
# Robert Bosch GmbH
# *****************************************************************************
#
# If you want to update Boost version do like this:
# 1. Change BOOST_VER below
# 2. Look at the source page (e.g. https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/)
# and download the tar.bz2.json file
# (e.g. https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.bz2.json)
# 3. Extract the SHA from the file and add it to BOOST_URL_SHA256 below
# 4. Change version in main README.md file for KUKSA.val Server

set(Boost_USE_STATIC_LIBS OFF)
set(BOOST_VER 1.75.0)
set(BOOST_VER 1.82.0)
set(Boost_NO_BOOST_CMAKE ON)
set(BOOST_COMPONENTS filesystem program_options system log thread)
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
Expand All @@ -32,7 +40,7 @@ findBoost("")
if(NOT Boost_FOUND)
string(REPLACE "." "_" BOOST_VER_ ${BOOST_VER})
set(BOOST_URL "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VER}/source/boost_${BOOST_VER_}.tar.bz2" CACHE STRING "Boost download URL")
set(BOOST_URL_SHA256 "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb" CACHE STRING "Boost download URL SHA256 checksum")
set(BOOST_URL_SHA256 "a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6" CACHE STRING "Boost download URL SHA256 checksum")
option(BOOST_DISABLE_TESTS "Do not build test targets" OFF)
include(FetchContent)
set(FETCHCONTENT_QUIET OFF)
Expand Down
3 changes: 2 additions & 1 deletion kuksa-val-server/src/OverlayLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <stdexcept>
#include <jsoncons/json.hpp>
#include <fstream>

#include "OverlayLoader.hpp"
#include "kuksa.pb.h"
Expand Down Expand Up @@ -75,4 +76,4 @@ void applyOverlays(std::shared_ptr<ILogger> log,
"\": " + e.what());
}
}
}
}

0 comments on commit 7ea6026

Please sign in to comment.