Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 932579 - dev-libs/boost-1.85.0-r1 fails to compile on ppc64
Summary: dev-libs/boost-1.85.0-r1 fails to compile on ppc64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal
Assignee: David Seifert
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: boost-1.85
  Show dependency tree
 
Reported: 2024-05-23 20:40 UTC by matoro
Modified: 2024-07-17 11:46 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (file_932579.txt,774.54 KB, text/plain)
2024-05-23 20:40 UTC, matoro
Details
build.log and emerge --info (file_932579.txt,782.81 KB, text/plain)
2024-06-03 23:08 UTC, matoro
Details
Fix from_chars unsupported long double macros (01-fix_unsupported_long_double_macros.diff,6.32 KB, patch)
2024-07-15 21:29 UTC, ernsteiswuerfel
Details | Diff
Fix to_chars macros for unsupported long double formats (02-fix_unsupported_long_double_formats.diff,1.49 KB, patch)
2024-07-15 21:30 UTC, ernsteiswuerfel
Details | Diff
Disable tests with unsupported long double layouts (03-disable_tests_with_unsupported_long_double_layouts.diff,14.72 KB, patch)
2024-07-15 21:30 UTC, ernsteiswuerfel
Details | Diff
Remove cruft codeblock (04-remove_cruft_codeblock.diff,1.46 KB, patch)
2024-07-15 21:30 UTC, ernsteiswuerfel
Details | Diff
Fix macro name (05-fix_macro_name.diff,16.63 KB, patch)
2024-07-15 21:31 UTC, ernsteiswuerfel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-05-23 20:40:25 UTC
Created attachment 894083 [details]
build.log and emerge --info

I am almost positive this is due to sys-devel/gcc[-ieee-long-double] (does not reproduce on ppc64le 23.0 profiles) so marking it as that rather than as a big-endian problem.

gcc.compile.c++ bin.v2/libs/charconv/build/gcc-13.2/gentoorelease/pch-off/threading-multi/visibility-hidden/from_chars.o
 
    "powerpc64-unknown-linux-gnu-g++"   -fvisibility-inlines-hidden  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -pipe -std=c++17 -fPIC -m64 -pthread -finline-functions -Wno-inline -Wall -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_CHARCONV_DYN_LINK=1 -DBOOST_CHARCONV_SOURCE=1 -DBOOST_COBALT_USE_STD_PMR=1 -DNDEBUG   -I"."  -c -o "bin.v2/libs/charconv/build/gcc-13.2/gentoorelease/pch-off/threading-multi/visibility-hidden/from_chars.o" "libs/charconv/build/../src/from_chars.cpp"
 
libs/charconv/build/../src/from_chars.cpp: In function ‘boost::charconv::from_chars_result boost::charconv::from_chars_erange(const char*, const char*, long double&, chars_format)’:
libs/charconv/build/../src/from_chars.cpp:258:48: error: ‘compute_float80’ is not a member of ‘boost::charconv::detail’; did you mean ‘compute_float64’?
  258 |     auto return_val = boost::charconv::detail::compute_float80<long double>(exponent, significand, sign, success);
      |                                                ^~~~~~~~~~~~~~~
      |                                                compute_float64
libs/charconv/build/../src/from_chars.cpp:258:64: error: expected primary-expression before ‘long’
  258 |     auto return_val = boost::charconv::detail::compute_float80<long double>(exponent, significand, sign, success);
      |                                                                ^~~~
Comment 1 matoro archtester 2024-05-25 19:24:53 UTC
OK, removing this from the title, this selectively fails on ppc64le sometimes, but only with very high optimization flags.  It always fails on ppc64 BE.
Comment 2 matoro archtester 2024-06-03 23:08:52 UTC
Created attachment 895025 [details]
build.log and emerge --info

Still an issue on 1.85.0-r1
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-12 21:03:22 UTC
Try https://github.com/boostorg/charconv/pull/183?
Comment 4 matoro archtester 2024-07-12 22:55:52 UTC
(In reply to Sam James from comment #3)
> Try https://github.com/boostorg/charconv/pull/183?

I tried applying this, but maybe I mangles the paths or something?  Because it errors out now with:

    "powerpc64-unknown-linux-gnu-g++"   -fvisibility-inlines-hidden  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -pipe
 -std=c++17 -fPIC -m64 -pthread -finline-functions -Wno-inline -Wall -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_CHARCONV_DYN_LINK=1 -DBO
OST_CHARCONV_SOURCE=1 -DBOOST_COBALT_USE_STD_PMR=1 -DNDEBUG   -I"."  -c -o "bin.v2/libs/charconv/build/gcc-13.2/gentoorelease/pch-off/threading
-multi/visibility-hidden/to_chars.o" "libs/charconv/build/../src/to_chars.cpp"

libs/charconv/build/../src/to_chars.cpp:626:111: error: ‘boost::charconv::to_chars_result boost::charconv::to_chars(char*, char*, long double, 
chars_format, int)’ should have been declared inside ‘boost::charconv’
  626 |                                                             boost::charconv::chars_format fmt, int precision) noexcept
      |                                                                                                               ^~~~~~~~
Comment 5 ernsteiswuerfel archtester 2024-07-15 21:29:41 UTC
Created attachment 897746 [details, diff]
Fix from_chars unsupported long double macros

I had the same problem and managed to adapt the patches from https://github.com/boostorg/charconv/pull/183.

The diff file paths had to be manually adapted but apart from that were only 2 small issues that needed correction. Anyway, it builds fine now on my Talos II.

@matoro: Could you try too on your machine one ppc64/ppc64le?
Comment 6 ernsteiswuerfel archtester 2024-07-15 21:30:09 UTC
Created attachment 897747 [details, diff]
Fix to_chars macros for unsupported long double formats
Comment 7 ernsteiswuerfel archtester 2024-07-15 21:30:26 UTC
Created attachment 897748 [details, diff]
Disable tests with unsupported long double layouts
Comment 8 ernsteiswuerfel archtester 2024-07-15 21:30:46 UTC
Created attachment 897749 [details, diff]
Remove cruft codeblock
Comment 9 ernsteiswuerfel archtester 2024-07-15 21:31:14 UTC
Created attachment 897750 [details, diff]
Fix macro name
Comment 10 Alejandro Sánchez Marín 2024-07-16 12:00:51 UTC
I tried to update boost-1.85.0-r1 on my ppc64 BE and fails too.

Different message but same result.

Do you want to put my files here?
Comment 11 ernsteiswuerfel archtester 2024-07-16 12:18:11 UTC
(In reply to Alejandro Sánchez Marín from comment #10)
> Different message but same result. Do you want to put my files here?
You could apply the patches attached to the bug and see if you get it built afterwards. Just throw them into /etc/portage/patches/dev-libs/boost/ and rebuild.
Comment 12 matoro archtester 2024-07-16 15:20:44 UTC
Can you combine these into one patch?  I dropped them in one-by-one in the order attached to this ticket and the 4th (last) one failed to apply.
Comment 13 ernsteiswuerfel archtester 2024-07-16 16:10:17 UTC
(In reply to matoro from comment #12)
> Can you combine these into one patch?  I dropped them in one-by-one in the
> order attached to this ticket and the 4th (last) one failed to apply.
So far I used them on ppc64-glibc and ppc64-musl where they work fine. I guess then the one you mentioned failed to apply on ppc64le? What's the error message? Also there are 5 patches, the last one would be the 5th.

Combining them would not make much sense as long as one of them does not apply. ;)
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-16 16:14:24 UTC
matoro, did you use the filenames ernst gave?
Comment 15 matoro archtester 2024-07-16 16:19:55 UTC
(In reply to Sam James from comment #14)
> matoro, did you use the filenames ernst gave?

Nope, just missed the first patch!  Looks good after applying all 5.
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-16 22:53:39 UTC
Very good! I'll pull it in.
Comment 17 Larry the Git Cow gentoo-dev 2024-07-16 23:04:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fb52613e7ab15074d3ca398190114c886395666

commit 2fb52613e7ab15074d3ca398190114c886395666
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-07-16 23:01:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-07-16 23:01:00 +0000

    dev-libs/boost: fix build on ppc64
    
    Thanks to ernsteiswuerfel for extracting/rebasing the patches from the PR
    and both ernsteiswuerfel and matoro for testing.
    
    Closes: https://bugs.gentoo.org/932579
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/boost/boost-1.85.0-r1.ebuild              |   5 +
 ...5.0-01-fix_unsupported_long_double_macros.patch | 111 ++++++
 ....0-02-fix_unsupported_long_double_formats.patch |  29 ++
 ...ests_with_unsupported_long_double_layouts.patch | 420 +++++++++++++++++++++
 .../boost-1.85.0-04-remove_cruft_codeblock.patch   |  52 +++
 .../files/boost-1.85.0-05-fix_macro_name.patch     | 356 +++++++++++++++++
 6 files changed, 973 insertions(+)
Comment 18 Alejandro Sánchez Marín 2024-07-17 11:46:25 UTC
Patches solve my problem on ppc64 BE XD

Thank you very much to everybody helps to fix it.