Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .github/scripts/python_wheels/cibw_before_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set -x

PYTHON_VERSION="$1"
PROJECT_DIR="$2"
WHEEL_BUILD_JOBS=2

export PYTHON="python${PYTHON_VERSION}"

Expand All @@ -32,17 +33,17 @@ BOOST_PREFIX="$HOME/opt/boost"
./bootstrap.sh --prefix=${BOOST_PREFIX}

if [ "$(uname)" == "Linux" ]; then
./b2 install --prefix=${BOOST_PREFIX} -d0 --with-graph \
./b2 -j${WHEEL_BUILD_JOBS} install --prefix=${BOOST_PREFIX} -d0 --with-graph \
--with-move --with-optional --with-program_options --with-random \
--with-serialization --with-smart_ptr --with-timer --with-chrono
elif [ "$(uname)" == "Darwin" ]; then
./b2 install --prefix=${BOOST_PREFIX} -d0 --with-graph \
./b2 -j${WHEEL_BUILD_JOBS} install --prefix=${BOOST_PREFIX} -d0 --with-graph \
--with-move --with-optional --with-program_options --with-random \
--with-serialization --with-smart_ptr --with-timer --with-chrono \
architecture=arm \
cxxflags="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
linkflags="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
./b2 install --prefix=${BOOST_PREFIX}/x86 -d0 --with-graph \
./b2 -j${WHEEL_BUILD_JOBS} install --prefix=${BOOST_PREFIX}/x86 -d0 --with-graph \
--with-move --with-optional --with-program_options --with-random \
--with-serialization --with-smart_ptr --with-timer --with-chrono \
architecture=x86 \
Expand Down Expand Up @@ -102,11 +103,5 @@ doxygen build/doc/Doxyfile

# Install the Python wrapper module and generate Python stubs
cd $PROJECT_DIR/build/python
if [ "$(uname)" == "Linux" ]; then
make -j $(nproc) install
make -j $(nproc) python-stubs
elif [ "$(uname)" == "Darwin" ]; then
make -j $(sysctl -n hw.logicalcpu) install
make -j $(sysctl -n hw.logicalcpu) python-stubs
fi

make -j${WHEEL_BUILD_JOBS} install
make -j${WHEEL_BUILD_JOBS} python-stubs
4 changes: 2 additions & 2 deletions gtsam/base/std_optional_serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <boost/serialization/detail/is_default_constructible.hpp>

/** A bunch of declarations to deal with gcc bug
* The compiler has a difficult time distinguisihing between:
* The compiler has a difficult time distinguishing between:
*
* template<template <Archive, class U> class SPT> void load(Archive, SPT<U>&, const unsigned int) : <boost/serialization/shared_ptr.hpp>
*
Expand All @@ -37,7 +37,7 @@
* template<T> void load(Archive, std::optional<T>&, const unsigned int) : <std_optional_serialization.h>
*
* The compiler will try to instantiate an object of the type of std::optional<boost::serialization::U> which is not valid since U is not a type and
* thus leading to a whole series of errros.
* thus leading to a whole series of errors.
*
* This is a well known bug in gcc documented here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84075
* A minimal reproducible example here: https://godbolt.org/z/anj9YjnPY
Expand Down
Loading
Loading