From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/boost/
Date: Tue, 16 May 2023 21:11:31 +0000 (UTC) [thread overview]
Message-ID: <1684271484.e442bb64a57259f89e12d901c8fe23a5abe62a76.soap@gentoo> (raw)
commit: e442bb64a57259f89e12d901c8fe23a5abe62a76
Author: Yifeng Li <tomli <AT> tomli <DOT> me>
AuthorDate: Tue May 16 21:11:24 2023 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue May 16 21:11:24 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e442bb64
dev-libs/boost: fix build on macOS / Apple Silicon
This commits fix three problems in existing Boost 1.82.0 ebuilds,
allowing one to install Boost on macOS, including Apple Silicon.
1. Boost wants to build static library, which is unsupported on macOS.
Using the unmodified ebuild, Boost fails because the build system
wants to pass the "-static" flag to ar, but this option (and static
linking in general) is unsupported by macOS, creating this error
message:
arm64-apple-darwin22-ar: only one of -a and -[bi] options allowed
It turned out that "toolset=darwin" is actually broken in Boost [1] and
has even been removed from Boost since 2019 [2]. Thus, the fix is to
remove the option compiler="darwin".
2. error: O_LARGEFILE was not declared in this scope
It appears that on modern macOS, 64-bit file I/O is already the default,
and there's no special support for options like O_LARGEFILE. Thus, on
on Darwin, we avoid running the command append-lfs-flags.
3. invalid install_name found, your application or library will crash at runtime
To fix the broken install_name and references, a hack is used on Darwin
to find a list paths. The original command began with "grep ^libboost"
to match a library name at the beginning of the output of "otool -XL".
But for some reason, the library names now include a path prefix, such
as:
bin.v2/libs/thread/build/gcc-12.1/gentoorelease/pch-off/
threadapi-pthread/threading-multi/visibility-hidden/
libboost_thread.dylib
Thus, matching at the beginning of the line no longer works. To fix
the problem, we instead use "grep libboost" to allow lines with a
path prefix to be matched as well. We then extract the basename the
filename from the path.
[1] https://web.archive.org/web/20160713132921/https://svn.boost.org/trac/boost/ticket/9772#comment:19
[2] https://github.com/boostorg/build/issues/528
Closes: https://github.com/gentoo/gentoo/pull/30758
Closes: https://bugs.gentoo.org/904983
Signed-off-by: Yifeng Li <tomli <AT> tomli.me>
Signed-off-by: David Seifert <soap <AT> gentoo.org>
dev-libs/boost/boost-1.82.0.ebuild | 36 +++++++++++++++++++++++-------------
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a/dev-libs/boost/boost-1.82.0.ebuild b/dev-libs/boost/boost-1.82.0.ebuild
index efe85c331913..30ce182a1f86 100644
--- a/dev-libs/boost/boost-1.82.0.ebuild
+++ b/dev-libs/boost/boost-1.82.0.ebuild
@@ -16,7 +16,7 @@ S="${WORKDIR}/${PN}_${MY_PV}"
LICENSE="Boost-1.0"
SLOT="0/${PV}" # ${PV} instead of the major version due to bug 486122
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="bzip2 context debug doc icu lzma +nls mpi numpy python tools zlib zstd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
# the tests will never fail because these are not intended as sanity
@@ -71,13 +71,8 @@ create_user-config.jam() {
fi
local compiler compiler_version compiler_executable="$(tc-getCXX)"
- if [[ ${CHOST} == *-darwin* ]]; then
- compiler="darwin"
- compiler_version="$(gcc-fullversion)"
- else
- compiler="gcc"
- compiler_version="$(gcc-version)"
- fi
+ compiler="gcc"
+ compiler_version="$(gcc-version)"
if use mpi; then
local mpi_configuration="using mpi ;"
@@ -194,8 +189,15 @@ src_configure() {
# Use C++17 globally as of 1.80
append-cxxflags -std=c++17
- # need to enable LFS explicitly for 64-bit offsets on 32-bit hosts (#894564)
- append-lfs-flags
+ if [[ ${CHOST} != *-darwin* ]]; then
+ # On modern macOS, file I/O is already 64-bit by default,
+ # there's no support for special options like O_LARGEFILE.
+ # Thus, LFS must be disabled.
+ #
+ # On other systems, we need to enable LFS explicitly for 64-bit
+ # offsets on 32-bit hosts (#894564)
+ append-lfs-flags
+ fi
}
multilib_src_compile() {
@@ -242,16 +244,24 @@ multilib_src_install() {
install_name_tool -id "/${d#${D}}" "${d}"
eend $?
# fix references to other libs
+ # these paths look like this:
+ # bin.v2/libs/thread/build/gcc-12.1/gentoorelease/pch-off/
+ # threadapi-pthread/threading-multi/visibility-hidden/
+ # libboost_thread.dylib
refs=$(otool -XL "${d}" | \
sed -e '1d' -e 's/^\t//' | \
- grep "^libboost_" | \
+ grep "libboost_" | \
cut -f1 -d' ')
local r
for r in ${refs}; do
- ebegin " correcting reference to ${r}"
+ # strip path prefix from references, so we obtain
+ # something like libboost_thread.dylib.
+ local r_basename=${r##*/}
+
+ ebegin " correcting reference to ${r_basename}"
install_name_tool -change \
"${r}" \
- "${EPREFIX}/usr/lib/${r}" \
+ "${EPREFIX}/usr/lib/${r_basename}" \
"${d}"
eend $?
done
next reply other threads:[~2023-05-16 21:11 UTC|newest]
Thread overview: 229+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 21:11 David Seifert [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-04-29 17:28 [gentoo-commits] repo/gentoo:master commit in: dev-libs/boost/ Sam James
2025-04-28 14:33 Sam James
2025-04-27 21:16 Sam James
2025-04-27 12:01 David Seifert
2025-04-09 8:11 Sam James
2025-01-31 11:08 David Seifert
2024-12-13 10:25 David Seifert
2024-12-12 12:39 David Seifert
2024-11-03 4:40 Sam James
2024-11-02 7:58 Sam James
2024-10-03 9:24 Sam James
2024-09-21 19:58 Arthur Zamarin
2024-08-31 8:25 David Seifert
2024-08-09 8:50 Jakov Smolić
2024-07-12 6:03 Sam James
2024-07-12 6:03 Sam James
2024-07-12 6:03 Sam James
2024-07-04 13:31 David Seifert
2024-05-31 22:38 Sam James
2024-05-19 19:05 Sam James
2024-04-22 15:11 David Seifert
2024-03-15 4:30 Sam James
2024-02-20 5:56 Sam James
2024-02-20 5:56 Sam James
2024-02-20 5:56 Sam James
2024-02-17 9:55 Arthur Zamarin
2024-02-12 10:31 Sam James
2024-01-30 9:20 Sam James
2024-01-26 12:20 David Seifert
2024-01-24 12:44 David Seifert
2024-01-01 21:37 David Seifert
2023-12-26 10:35 David Seifert
2023-08-26 3:51 Sam James
2023-08-15 9:52 David Seifert
2023-08-12 20:18 David Seifert
2023-08-12 20:18 David Seifert
2023-08-12 9:59 David Seifert
2023-06-10 9:39 Andreas Sturmlechner
2023-06-09 12:04 Arthur Zamarin
2023-06-09 9:54 Sam James
2023-06-09 9:54 Sam James
2023-06-09 6:53 Arthur Zamarin
2023-06-03 19:45 Arthur Zamarin
2023-06-02 16:13 Arthur Zamarin
2023-06-01 19:15 Arthur Zamarin
2023-06-01 19:15 Arthur Zamarin
2023-04-15 16:07 David Seifert
2023-04-14 23:07 David Seifert
2023-01-24 11:51 David Seifert
2023-01-21 19:41 Arthur Zamarin
2023-01-17 19:52 Arthur Zamarin
2022-12-17 20:02 Sam James
2022-12-16 2:52 Sam James
2022-12-02 18:47 Arthur Zamarin
2022-11-23 2:26 Sam James
2022-11-21 20:43 Arthur Zamarin
2022-11-21 17:52 Arthur Zamarin
2022-11-21 17:52 Arthur Zamarin
2022-11-21 17:52 Arthur Zamarin
2022-11-21 17:50 Arthur Zamarin
2022-11-21 17:43 Arthur Zamarin
2022-09-09 9:41 Sam James
2022-09-03 21:53 David Seifert
2022-07-28 13:31 Sam James
2022-07-03 22:56 Sam James
2022-07-03 9:31 David Seifert
2022-07-03 8:33 WANG Xuerui
2022-06-14 18:01 Sam James
2022-05-20 20:18 Andreas K. Hüttel
2022-05-07 20:56 Sam James
2022-04-15 8:40 David Seifert
2022-02-05 17:33 Arthur Zamarin
2022-02-03 3:42 Sam James
2022-02-03 3:42 Sam James
2022-02-03 3:41 Sam James
2022-02-03 3:41 Sam James
2022-02-03 3:41 Sam James
2022-02-03 3:41 Sam James
2021-12-15 1:28 Sam James
2021-12-14 23:29 Sam James
2021-12-12 22:58 Sam James
2021-12-12 14:36 David Seifert
2021-12-06 16:31 David Seifert
2021-12-04 19:06 Arthur Zamarin
2021-12-04 17:45 Arthur Zamarin
2021-12-02 19:52 Sam James
2021-12-01 10:51 Sam James
2021-11-30 20:50 Arthur Zamarin
2021-11-29 19:16 Sam James
2021-11-28 2:57 Sam James
2021-09-27 21:44 James Le Cuirot
2021-09-05 5:48 Sam James
2021-09-05 2:22 Sam James
2021-08-13 16:51 David Seifert
2021-07-04 14:04 David Seifert
2021-06-17 15:56 Sergei Trofimovich
2021-06-01 10:48 Sam James
2021-06-01 9:00 Sam James
2021-05-31 22:38 Sam James
2021-05-31 22:38 Sam James
2021-05-31 22:38 Sam James
2021-05-31 14:17 Sam James
2021-05-19 12:36 Guilherme Amadio
2021-05-10 9:14 Sam James
2021-05-07 16:24 David Seifert
2021-04-24 12:19 David Seifert
2021-03-27 0:05 Sam James
2021-03-21 9:45 Sergei Trofimovich
2021-03-08 13:09 Sam James
2021-03-08 10:28 Sam James
2021-03-08 10:27 Sam James
2021-03-07 23:06 Sam James
2021-03-07 23:05 Sam James
2021-03-07 15:54 Thomas Deutschmann
2021-03-07 13:18 Mikle Kolyada
2021-02-25 8:13 Andreas Sturmlechner
2021-02-04 17:22 Sergei Trofimovich
2021-02-01 4:42 Sam James
2021-01-25 19:53 Sam James
2021-01-24 22:41 Sam James
2021-01-24 21:52 Sam James
2021-01-24 16:13 Fabian Groffen
2021-01-24 13:33 Sam James
2021-01-22 22:29 Sam James
2021-01-22 16:53 Agostino Sarubbo
2020-12-28 17:55 David Seifert
2020-11-24 19:06 Sergei Trofimovich
2020-11-23 9:47 Sam James
2020-11-23 9:44 Sam James
2020-11-23 4:52 Sam James
2020-11-23 3:58 Sam James
2020-11-23 0:29 Sam James
2020-11-23 0:29 Sam James
2020-11-22 23:51 Sam James
2020-09-25 20:22 Michał Górny
2020-08-15 23:19 David Seifert
2020-06-23 19:22 Robin H. Johnson
2020-04-08 20:40 Göktürk Yüksek
2020-02-10 0:26 David Seifert
2020-02-09 15:11 Mikle Kolyada
2020-02-06 7:51 Sergei Trofimovich
2020-01-28 18:11 David Seifert
2020-01-27 13:45 Agostino Sarubbo
2020-01-17 11:30 Agostino Sarubbo
2020-01-17 10:27 Agostino Sarubbo
2020-01-17 9:33 Agostino Sarubbo
2020-01-17 9:31 Agostino Sarubbo
2020-01-16 8:14 Mikle Kolyada
2020-01-16 8:12 Mikle Kolyada
2019-12-21 12:55 David Seifert
2019-12-15 14:32 David Seifert
2019-12-15 14:20 David Seifert
2019-12-07 2:26 Matt Turner
2019-12-07 2:26 Matt Turner
2019-11-30 21:28 Sergei Trofimovich
2019-11-12 7:25 Sergei Trofimovich
2019-11-11 19:39 Sergei Trofimovich
2019-11-09 15:53 Aaron Bauman
2019-11-08 8:35 Mikle Kolyada
2019-11-01 10:57 Mikle Kolyada
2019-11-01 10:57 Mikle Kolyada
2019-10-31 23:50 Thomas Deutschmann
2019-09-14 18:30 David Seifert
2019-04-22 20:13 James Le Cuirot
2019-04-21 14:23 David Seifert
2019-04-21 10:18 James Le Cuirot
2019-04-16 9:50 David Seifert
2019-04-15 19:20 Michał Górny
2019-04-15 19:20 Michał Górny
2019-04-15 19:20 Michał Górny
2018-09-18 18:59 Sergei Trofimovich
2018-08-18 5:09 Mikle Kolyada
2018-04-13 23:22 Aaron Bauman
2018-03-16 19:50 Matt Turner
2018-03-15 14:51 Mikle Kolyada
2018-03-12 5:07 Matt Turner
2018-03-12 4:33 Matt Turner
2018-03-06 19:33 Patrick McLean
2018-03-02 18:16 Mart Raudsepp
2018-02-10 12:56 Jeroen Roovers
2018-02-04 21:34 Sergei Trofimovich
2018-02-03 13:37 Michael Palimaka
2018-02-01 20:37 Thomas Deutschmann
2018-01-20 23:03 Andreas Sturmlechner
2017-11-09 22:43 Sergei Trofimovich
2017-11-07 14:01 Manuel Rüger
2017-10-29 21:08 Thomas Deutschmann
2017-10-15 21:28 Sergei Trofimovich
2017-10-15 19:08 Sergei Trofimovich
2017-09-19 4:39 Markus Meier
2017-09-04 13:36 Tobias Klausmann
2017-09-03 17:27 Sergei Trofimovich
2017-04-04 17:50 Patrick McLean
2017-04-02 23:41 Matt Turner
2017-03-17 6:36 Matt Turner
2017-03-17 0:21 Matt Turner
2017-03-08 10:13 David Seifert
2017-03-01 13:05 Michael Weber
2017-02-18 11:31 Michał Górny
2017-02-10 7:16 Michael Weber
2017-01-31 19:02 Jeroen Roovers
2017-01-25 12:06 Agostino Sarubbo
2017-01-25 10:40 Agostino Sarubbo
2017-01-22 15:33 Tobias Klausmann
2017-01-22 14:49 David Seifert
2017-01-15 16:21 David Seifert
2016-10-06 18:15 David Seifert
2016-10-06 8:56 Michał Górny
2016-10-05 22:03 David Seifert
2016-10-04 18:09 David Seifert
2016-10-01 16:46 David Seifert
2016-08-29 21:22 Christoph Junghans
2016-08-11 7:55 David Seifert
2016-07-12 8:47 Fabian Groffen
2016-06-01 17:56 Sergey Popov
2016-05-18 10:49 Lars Wendler
2016-04-14 16:13 Michael Palimaka
2016-04-09 10:25 David Seifert
2016-03-09 12:04 Lars Wendler
2016-03-09 12:00 Lars Wendler
2016-03-09 10:12 Lars Wendler
2016-03-09 10:12 Lars Wendler
2016-02-06 2:12 Davide Pesavento
2016-01-20 10:08 Sergey Popov
2016-01-20 7:53 Sergey Popov
2015-12-22 14:21 Ian Delaney
2015-12-13 14:05 Justin Lecher
2015-11-11 10:27 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1684271484.e442bb64a57259f89e12d901c8fe23a5abe62a76.soap@gentoo \
--to=soap@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox