[endian] Boost.Endian library added for 1.57.0
The library provides integer and floating point types and conversion functions for portable byte ordering regardless of processor endianness. Although the primary uses are for file or network I/O, it is also useful for unaligned integers or floats, or for 3, 5, 6, and 7 byte integers. The library's predecessors have been in use for thirty years and developed independently multiple times. The repository is https://github.com/boostorg/endian The documentation is online at https://boostorg.github.io/endian/ See https://boostorg.github.io/endian/index.html#Release-history for changes since the Formal Review. No need to report "Inspection Report" problems; those will be cleaned up before 1.57.0 ships. Please do report any other problems or concerns, since the time between now and when the 1.57.0 beta ships in effect acts a mini-review period. If anyone has access to a big-endian platform with a modern C++ compiler, please, please run the endian test suite and report the results. All testing and use in recent years has been on little-endian platforms, so big-endian platform testing is a worry. Thanks for you patience, --Beman
On Fri, Aug 15, 2014 at 11:36:40AM -0400, Beman Dawes wrote:
If anyone has access to a big-endian platform with a modern C++ compiler, please, please run the endian test suite and report the results. All testing and use in recent years has been on little-endian platforms, so big-endian platform testing is a worry.
I gave it a try with a 1.56 source tree and Endian checked out at commit 49866e07842e4b2b9c2d8e76b2c7fb3a61a1bdd2 on the three big-endian configurations I had handy: sparc64 FreeBSD 10.0-RELEASE with their stock GCC 4.2.1; powerpc AIX 5.3 with our own GCC 4.9.1; powerpc AIX 5.3 with IBM XL C/C++ V11.1. 'converter_test' fails across all three, see attached log files. XLC appears to additionally fail to link 'endian_operations_test', but I don't know if you consider it a generally working compiler :) -- Lars Viklund | zao@acc.umu.se
On Fri, Aug 15, 2014 at 1:51 PM, Lars Viklund
On Fri, Aug 15, 2014 at 11:36:40AM -0400, Beman Dawes wrote:
If anyone has access to a big-endian platform with a modern C++ compiler, please, please run the endian test suite and report the results. All testing and use in recent years has been on little-endian platforms, so big-endian platform testing is a worry.
I gave it a try with a 1.56 source tree and Endian checked out at commit 49866e07842e4b2b9c2d8e76b2c7fb3a61a1bdd2 on the three big-endian configurations I had handy:
sparc64 FreeBSD 10.0-RELEASE with their stock GCC 4.2.1; powerpc AIX 5.3 with our own GCC 4.9.1; powerpc AIX 5.3 with IBM XL C/C++ V11.1.
'converter_test' fails across all three, see attached log files.
These four test cases were failing for all three compilers: converter_test.cpp(225): test 'be::htobe(native) == little' failed in function '<unnamed>::test<short>()': '-3838' != '753' converter_test.cpp(226): test 'be::htole(native) == big' failed in function '<unnamed>::test<short>()': '753' != '-3838' converter_test.cpp(232): test 'x == little' failed in function '<unnamed>::test<short>()': '-3838' != '753' converter_test.cpp(233): test 'x == big' failed in function '<unnamed>::test<short>()': '753' != '-3838' You can check me, but I think I had the big/little results reversed. I've pushed up a fix on the develop branch.
XLC appears to additionally fail to link 'endian_operations_test', but I don't know if you consider it a generally working compiler :)
I'd need help from a platform expert on that one. So I'm going to ignore it unless someone steps forward. There is also a warning message which I will check if it shows up on other compilers. Thanks, this has been a great help! --Beman
On Fri, Aug 15, 2014 at 06:19:23PM -0400, Beman Dawes wrote:
On Fri, Aug 15, 2014 at 1:51 PM, Lars Viklund
wrote: On Fri, Aug 15, 2014 at 11:36:40AM -0400, Beman Dawes wrote:
If anyone has access to a big-endian platform with a modern C++ compiler, please, please run the endian test suite and report the results. All testing and use in recent years has been on little-endian platforms, so big-endian platform testing is a worry.
I gave it a try with a 1.56 source tree and Endian checked out at commit 49866e07842e4b2b9c2d8e76b2c7fb3a61a1bdd2 on the three big-endian configurations I had handy:
sparc64 FreeBSD 10.0-RELEASE with their stock GCC 4.2.1; powerpc AIX 5.3 with our own GCC 4.9.1; powerpc AIX 5.3 with IBM XL C/C++ V11.1.
'converter_test' fails across all three, see attached log files.
These four test cases were failing for all three compilers:
converter_test.cpp(225): test 'be::htobe(native) == little' failed in function '<unnamed>::test<short>()': '-3838' != '753' converter_test.cpp(226): test 'be::htole(native) == big' failed in function '<unnamed>::test<short>()': '753' != '-3838' converter_test.cpp(232): test 'x == little' failed in function '<unnamed>::test<short>()': '-3838' != '753' converter_test.cpp(233): test 'x == big' failed in function '<unnamed>::test<short>()': '753' != '-3838'
You can check me, but I think I had the big/little results reversed. I've pushed up a fix on the develop branch.
The tests are now green on all three setups, except for the XL C++ one that doesn't link right. Also did a sanity check on little-endian amd64 Ubuntu 14.04, just to verify that nothing else broke.
XLC appears to additionally fail to link 'endian_operations_test', but I don't know if you consider it a generally working compiler :)
I'd need help from a platform expert on that one. So I'm going to ignore it unless someone steps forward.
There is also a warning message which I will check if it shows up on other compilers.
I believe I'm slightly behind on compiler updates on the AIX machine, but the other tests and the success of our GCC 4.9.1 gives me confidence that the code and tests ought to do what they should. IBM XL C/C++ for AIX, V11.1 (5724-X13) Version: 11.01.0000.0013 Some day after the vacation I guess I should find our AIX wrangler and get him to install 11.01.000.0018 as we appear to be a year and a half out of date. -- Lars Viklund | zao@acc.umu.se
Beman Dawes wrote:
All testing and use in recent years has been on little-endian platforms, so big-endian platform testing is a worry.
Blimey. Have we really accepted an Endian library whose author has been unable to test it on any big-endian systems? That is surprising. Regards, Phil.
IIRC, it was accepted when Beman was still able to personally test on BE systems. But that was long ago now. Regardless.. This is why we have testing resources for accepted libraries. On Fri, Aug 15, 2014 at 12:59 PM, Phil Endecott < spam_from_boost_dev@chezphil.org> wrote:
Beman Dawes wrote:
All testing and use in recent years has been on little-endian platforms, so big-endian platform testing is a worry.
Blimey. Have we really accepted an Endian library whose author has been unable to test it on any big-endian systems? That is surprising.
Regards, Phil.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
-- -- Rene Rivera -- Grafik - Don't Assume Anything -- Robot Dreams - http://robot-dreams.net -- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail
On Fri, Aug 15, 2014 at 2:16 PM, Rene Rivera
IIRC, it was accepted when Beman was still able to personally test on BE systems. But that was long ago now. Regardless.. This is why we have testing resources for accepted libraries.
Your memory is right on. I have a Power PC G4 based mac mini, which I tested on up to the point we switched to Git, which isn't available for OS X 10.4. Also, the compiler was GCC 4.0, so not a good reflection of modern GCC. Lars Viklund proved the value of the Boost community once more by testing right away on three different BE platforms including a very current GCC version! That's far better test coverage than I could have achieved alone. --Beman
On Aug 15, 2014, at 3:29 PM, Beman Dawes
I have a Power PC G4 based mac mini, which I tested on up to the point we switched to Git, which isn't available for OS X 10.4.
Git works just fine on OS X 10.4. Download and expand the source tarball, configure, and make install. Josh
On Aug 15, 2014, at 8:36 AM, Beman Dawes
The library provides integer and floating point types and conversion functions for portable byte ordering regardless of processor endianness. Although the primary uses are for file or network I/O, it is also useful for unaligned integers or floats, or for 3, 5, 6, and 7 byte integers. The library's predecessors have been in use for thirty years and developed independently multiple times.
The repository is https://github.com/boostorg/endian
The documentation is online at https://boostorg.github.io/endian/
See https://boostorg.github.io/endian/index.html#Release-history for changes since the Formal Review.
I have added a “endian” component in the trac instance. — Marshall
Le 15/08/14 17:36, Beman Dawes a écrit :
The library provides integer and floating point types and conversion functions for portable byte ordering regardless of processor endianness. Although the primary uses are for file or network I/O, it is also useful for unaligned integers or floats, or for 3, 5, 6, and 7 byte integers. The library's predecessors have been in use for thirty years and developed independently multiple times.
The repository is https://github.com/boostorg/endian
The documentation is online at https://boostorg.github.io/endian/
See https://boostorg.github.io/endian/index.html#Release-history for changes since the Formal Review.
No need to report "Inspection Report" problems; those will be cleaned up before 1.57.0 ships. Please do report any other problems or concerns, since the time between now and when the 1.57.0 beta ships in effect acts a mini-review period. Hi Beman, Tim,
Please, could you announce the mini-review of the library? I don't think the library should be pushed to a boost repository before the mini-review result was announced. Anyway, I hope all the requested points have been taken in account ;-)
If anyone has access to a big-endian platform with a modern C++ compiler, please, please run the endian test suite and report the results. All testing and use in recent years has been on little-endian platforms, so big-endian platform testing is a worry.
I'm wondering if you would need a co-maintainer with access to a BE platform. Best, Vicente
participants (7)
-
Beman Dawes
-
Josh Juran
-
Lars Viklund
-
Marshall Clow
-
Phil Endecott
-
Rene Rivera
-
Vicente J. Botet Escriba