Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] Automatically set USE_BINARYBUILDER_CSL=0 when local CSL is new #41645

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

staticfloat
Copy link
Member

We ship our own compiler support libraries to ensure a minimum level of
support for BB-built libraries, however certain distros provide very
bleeding-edge compilers. This can be a problem if we download an
older libstdc++.so and forcibly link against that when launching
Julia, as when Julia itself is built with the local g++, it may use
symbols that don't exist in the BB-sourced libstdc++.so.

To address this, we default to not using BB-sourced CSLs if the
libstdc++.so that the native compiler would use contains a symbol that
our BB-sourced CSLs do not have. We use the monotonically-climbing
GLIBCXX_3.4.XX version symbols for this purpose; encoding the "next"
version number within deps/csl.mk, and triggering the BB-avoidance if
that version exists within the system-provided libstdc++.so.

@staticfloat staticfloat requested a review from vtjnash July 20, 2021 00:05
@staticfloat
Copy link
Member Author

Fixes #40585

deps/csl.mk Outdated
else
# If it's not, see if we should disable it due to `libstdc++` being newer:
LIBSTDCXX_PATH := $(eval $(call pathsearch,libstdc++,$(STD_LIB_PATH)))
ifneq (,$(and $(LIBSTDCXX_PATH),$(shell strings $(LIBSTDCXX_PATH) | grep $(CSL_NEXT_GLIBCXX_VERSION))))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to mention binutils in the required build dependencies? It's kind of implicit though since also ld is in binutils

Copy link
Member

@DilumAluthge DilumAluthge Jul 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't hurt to list the requirement explicitly, right?

deps/csl.mk Outdated Show resolved Hide resolved
deps/csl.mk Outdated Show resolved Hide resolved
deps/csl.mk Outdated Show resolved Hide resolved
@vchuravy vchuravy added backport 1.6 Change should be backported to release-1.6 backport 1.7 building Build system, or building Julia or its dependencies labels Jul 20, 2021
… new

We ship our own compiler support libraries to ensure a minimum level of
support for BB-built libraries, however certain distros provide very
bleeding-edge compilers.  This can be a problem if we download an
_older_ `libstdc++.so` and forcibly link against that when launching
Julia, as when Julia itself is built with the local `g++`, it may use
symbols that don't exist in the BB-sourced `libstdc++.so`.

To address this, we default to not using BB-sourced CSLs if the
`libstdc++.so` that the native compiler would use contains a symbol that
our BB-sourced CSLs do not have.  We use the monotonically-climbing
`GLIBCXX_3.4.XX` version symbols for this purpose; encoding the "next"
version number within `deps/csl.mk`, and triggering the BB-avoidance if
that version exists within the system-provided `libstdc++.so`.
@staticfloat staticfloat force-pushed the sf/auto_disable_bb_csl branch from 77a988a to c2704f8 Compare July 21, 2021 19:11
@staticfloat staticfloat merged commit 27c0291 into master Jul 22, 2021
@staticfloat staticfloat deleted the sf/auto_disable_bb_csl branch July 22, 2021 03:27
KristofferC pushed a commit that referenced this pull request Jul 26, 2021
… new (#41645)

We ship our own compiler support libraries to ensure a minimum level of
support for BB-built libraries, however certain distros provide very
bleeding-edge compilers.  This can be a problem if we download an
_older_ `libstdc++.so` and forcibly link against that when launching
Julia, as when Julia itself is built with the local `g++`, it may use
symbols that don't exist in the BB-sourced `libstdc++.so`.

To address this, we default to not using BB-sourced CSLs if the
`libstdc++.so` that the native compiler would use contains a symbol that
our BB-sourced CSLs do not have.  We use the monotonically-climbing
`GLIBCXX_3.4.XX` version symbols for this purpose; encoding the "next"
version number within `deps/csl.mk`, and triggering the BB-avoidance if
that version exists within the system-provided `libstdc++.so`.

(cherry picked from commit 27c0291)
KristofferC pushed a commit that referenced this pull request Jul 26, 2021
… new (#41645)

We ship our own compiler support libraries to ensure a minimum level of
support for BB-built libraries, however certain distros provide very
bleeding-edge compilers.  This can be a problem if we download an
_older_ `libstdc++.so` and forcibly link against that when launching
Julia, as when Julia itself is built with the local `g++`, it may use
symbols that don't exist in the BB-sourced `libstdc++.so`.

To address this, we default to not using BB-sourced CSLs if the
`libstdc++.so` that the native compiler would use contains a symbol that
our BB-sourced CSLs do not have.  We use the monotonically-climbing
`GLIBCXX_3.4.XX` version symbols for this purpose; encoding the "next"
version number within `deps/csl.mk`, and triggering the BB-avoidance if
that version exists within the system-provided `libstdc++.so`.

(cherry picked from commit 27c0291)
KristofferC pushed a commit that referenced this pull request Jul 26, 2021
… new (#41645)

We ship our own compiler support libraries to ensure a minimum level of
support for BB-built libraries, however certain distros provide very
bleeding-edge compilers.  This can be a problem if we download an
_older_ `libstdc++.so` and forcibly link against that when launching
Julia, as when Julia itself is built with the local `g++`, it may use
symbols that don't exist in the BB-sourced `libstdc++.so`.

To address this, we default to not using BB-sourced CSLs if the
`libstdc++.so` that the native compiler would use contains a symbol that
our BB-sourced CSLs do not have.  We use the monotonically-climbing
`GLIBCXX_3.4.XX` version symbols for this purpose; encoding the "next"
version number within `deps/csl.mk`, and triggering the BB-avoidance if
that version exists within the system-provided `libstdc++.so`.

(cherry picked from commit 27c0291)
KristofferC pushed a commit that referenced this pull request Aug 31, 2021
… new (#41645)

We ship our own compiler support libraries to ensure a minimum level of
support for BB-built libraries, however certain distros provide very
bleeding-edge compilers.  This can be a problem if we download an
_older_ `libstdc++.so` and forcibly link against that when launching
Julia, as when Julia itself is built with the local `g++`, it may use
symbols that don't exist in the BB-sourced `libstdc++.so`.

To address this, we default to not using BB-sourced CSLs if the
`libstdc++.so` that the native compiler would use contains a symbol that
our BB-sourced CSLs do not have.  We use the monotonically-climbing
`GLIBCXX_3.4.XX` version symbols for this purpose; encoding the "next"
version number within `deps/csl.mk`, and triggering the BB-avoidance if
that version exists within the system-provided `libstdc++.so`.

(cherry picked from commit 27c0291)
KristofferC pushed a commit that referenced this pull request Sep 3, 2021
… new (#41645)

We ship our own compiler support libraries to ensure a minimum level of
support for BB-built libraries, however certain distros provide very
bleeding-edge compilers.  This can be a problem if we download an
_older_ `libstdc++.so` and forcibly link against that when launching
Julia, as when Julia itself is built with the local `g++`, it may use
symbols that don't exist in the BB-sourced `libstdc++.so`.

To address this, we default to not using BB-sourced CSLs if the
`libstdc++.so` that the native compiler would use contains a symbol that
our BB-sourced CSLs do not have.  We use the monotonically-climbing
`GLIBCXX_3.4.XX` version symbols for this purpose; encoding the "next"
version number within `deps/csl.mk`, and triggering the BB-avoidance if
that version exists within the system-provided `libstdc++.so`.

(cherry picked from commit 27c0291)
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Sep 7, 2021
staticfloat added a commit that referenced this pull request Dec 23, 2022
… new (#41645)

We ship our own compiler support libraries to ensure a minimum level of
support for BB-built libraries, however certain distros provide very
bleeding-edge compilers.  This can be a problem if we download an
_older_ `libstdc++.so` and forcibly link against that when launching
Julia, as when Julia itself is built with the local `g++`, it may use
symbols that don't exist in the BB-sourced `libstdc++.so`.

To address this, we default to not using BB-sourced CSLs if the
`libstdc++.so` that the native compiler would use contains a symbol that
our BB-sourced CSLs do not have.  We use the monotonically-climbing
`GLIBCXX_3.4.XX` version symbols for this purpose; encoding the "next"
version number within `deps/csl.mk`, and triggering the BB-avoidance if
that version exists within the system-provided `libstdc++.so`.

(cherry picked from commit 27c0291)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants