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

Inconsistency in choice of libgcc_s version on macOS #48056

Open
fxcoudert opened this issue Dec 31, 2022 · 2 comments
Open

Inconsistency in choice of libgcc_s version on macOS #48056

fxcoudert opened this issue Dec 31, 2022 · 2 comments
Labels
building Build system, or building Julia or its dependencies system:mac Affects only macOS

Comments

@fxcoudert
Copy link
Contributor

We're having trouble building Julia 1.8.4 from source in Homebrew, on macOS Intel. The reason is that there is an inconsistency in the choice of libgcc_s version. At runtime, the logic is (

):

elseif Sys.isapple()
    if arch(HostPlatform()) == "aarch64" || libgfortran_version(HostPlatform()) == v"5"
        const libgcc_s = "@rpath/libgcc_s.1.1.dylib"
    else
        const libgcc_s = "@rpath/libgcc_s.1.dylib"
    end

but the logic hasn't been adapted to be identical when libraries are copied over (

ifeq ($(APPLE_ARCH),arm64)
):

ifeq ($(APPLE_ARCH),arm64)
$(eval $(call copy_csl,$(call versioned_libname,libgcc_s,1.1)))
else
$(eval $(call copy_csl,$(call versioned_libname,libgcc_s,1)))
endif
@giordano giordano added building Build system, or building Julia or its dependencies system:mac Affects only macOS labels Jan 2, 2023
@giordano
Copy link
Contributor

giordano commented Jan 2, 2023

@staticfloat do we have already a way to know the gcc/libgfortran version?

@fxcoudert
Copy link
Contributor Author

The same logic is distributed in many places. In Make.inc it is right:

# On macOS, libgcc_s has soversion 1.1 always on aarch64 and only for GCC 12+
# (-> libgfortran 5) on x86_64
ifeq ($(OS),Darwin)
ifeq ($(ARCH),aarch64)
LIBGCC_NAME := libgcc_s.1.1.$(SHLIB_EXT)
else
ifeq ($(LIBGFORTRAN_VERSION),5)
LIBGCC_NAME := libgcc_s.1.1.$(SHLIB_EXT)
else
LIBGCC_NAME := libgcc_s.1.$(SHLIB_EXT)
endif
endif
endif

base/Makefile has the same code (not sure why it's duplicated). deps/csl.mk has it wrong, but I do not know if LIBGFORTRAN_VERSION is set/defined and can be used in that file.

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 system:mac Affects only macOS
Projects
None yet
Development

No branches or pull requests

2 participants