boost icon indicating copy to clipboard operation
boost copied to clipboard

Unable to build boost-1.86.0 with gcc-4.8.5; std::align missing

Open utoni opened this issue 1 year ago • 1 comments

I am getting the following build error:

gcc.compile.c++ bin.v2/libs/process/build/gcc-4.8/release/x86_64/cxxstd-11-iso/threading-multi/visibility-hidden/ext/env.o
In file included from ./boost/asio/detail/handler_alloc_helpers.hpp:19:0,
                 from ./boost/asio/detail/executor_function.hpp:19,
                 from ./boost/asio/execution/any_executor.hpp:24,
                 from ./boost/asio/execution.hpp:19,
                 from ./boost/asio/any_io_executor.hpp:22,
                 from ./boost/process/v2/detail/process_handle_signal.hpp:25,
                 from ./boost/process/v2/process_handle.hpp:20,
                 from ./boost/process/v2/ext/env.hpp:14,
                 from libs/process/src/ext/env.cpp:14:
./boost/asio/detail/memory.hpp: In function 'void* boost::asio::detail::align(std::size_t, std::size_t, void*&, std::size_t&)':
./boost/asio/detail/memory.hpp:58:10: error: 'align' is not a member of 'std'
   return std::align(alignment, size, ptr, space);
          ^

std::align seems to not be available on gcc-4.8.5 for whatever reason, but building boost-1.85.0 with the same CXX works without any issues. Any hints?

utoni avatar Oct 25 '24 14:10 utoni

this is a known missing feature for gcc😂 see: https://stackoverflow.com/questions/27064791/stdalign-not-supported-by-g4-9

templateU avatar Jun 12 '25 06:06 templateU

@utoni Is there a current Linux distribution still providing gcc-4.8.5? It appears that there is a package for Ubuntu 16.04 Xenial, for example.

nigels-com avatar Aug 31 '25 05:08 nigels-com

Unfortunately, there are still companies out there, which are using CentOS 7..

utoni avatar Sep 01 '25 13:09 utoni

(issue was fixed by compiling gcc-11)

utoni avatar Sep 01 '25 13:09 utoni