On 02/06/20 20:00 +0200, Miro Hrončok wrote:
On 02. 06. 20 19:51, Miro Hrončok wrote:
>On 02. 06. 20 17:24, Jonathan Wakely wrote:
>>### Boost.Endian
>>
>>Several packages fail because they were using an implementation detail
>>of Boost, the <boost/detail/endian.hpp> header. That no longer exists,
>>but nobody should have been using it anyway :-P The Boost.Endian
>>library exists now, and provides <boost/endian/endian.hpp> which
>>should work instead.
>>
>>This Boost.Endian issue affects:
>>
>>openscad
>>supercollider
>
>Also prusa-slicer and slic3r.
<boost/endian/endian.hpp> is deprecated:
# error "<boost/endian/endian.hpp> is deprecated. Define
BOOST_ENDIAN_DEPRECATED_NAMES to use."
/usr/include/boost/endian/endian.hpp:19:1: note: '#pragma message:
This header is deprecated. Use <boost/endian/arithmetic.hpp> instead.'
19 | BOOST_HEADER_DEPRECATED( "<boost/endian/arithmetic.hpp>" )
I don't know about the others, but the use in Slic3r is purely to
check a single macro that used to be defined by the old endian.hpp
header. That macro (BOOST_LITTLE_ENDIAN) is not in Boost at all now.
But it's not needed, at least when using GCC (or a compatible compiler
like Clang on linux) because you can do it without Boost:
--- Slic3r-1.3.0/xs/src/admesh/stl.h~ 2020-06-02 21:36:34.816574974 +0100
+++ Slic3r-1.3.0/xs/src/admesh/stl.h 2020-06-02 21:36:37.553576616 +0100
@@ -26,9 +26,8 @@
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
-#include <boost/detail/endian.hpp>
-#ifndef BOOST_LITTLE_ENDIAN
+#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
#error "admesh works correctly on little endian machines only!"
#endif