-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
Version: 1.8.3 (latest)
OS: RHEL 8.6
Architecture: powerpc64le (Tier 3: not asking for anything powerpc-specific here)
I am experimenting getting a math library to eventually work with libblastrampoline. The first step I am trying to do is figure out if I can use LP64 mode as a starting point since ILP64 won't work out of the box. However, I have hit a snag when trying to switch to LP64 mode.
According to the instructions in /julia/doc/src/devdocs/build/distributing.md at "Notes on BLAS and LAPACK," we are suppose to build Julia via: make USE_BLAS64=0
.
Command in build script: make USE_BLAS64=0 O=../juliabuild
Eventually, I get the following error for LinearAlgebra:
WARNING: Error during initialization of module LinearAlgebra:
ErrorException("could not load library "libopenblas"
libopenblas.so: cannot open shared object file: No such file or directory")
WARNING: Error during initialization of module LinearAlgebra:
ErrorException("could not load library "libopenblas"
libopenblas.so: cannot open shared object file: No such file or directory")
Generating REPL precompile statements... 38/40
This causes an infinitely loop at this precompile stage if the files were not found... By removing USE_BLAS64=0
from the make command, it builds without error.
After digging in Make.inc, the location for these shared object files is the following: juliabuild/usr/lib
Going to said directory, I confirmed that only the ILP64 OpenBLAS files were downloaded:
[<user>/juliabuild/usr/lib]> ls *openblas*
libopenblas64_.0.3.20.so libopenblas64_.so libopenblas64_.so.0
In Make.inc, it does seem that the following should be the initialization for LIBBLAS when USE_BLAS64=0 (last else) w/ USE_SYSTEM_BLAS=0:
ifeq ($(USE_SYSTEM_BLAS), 1)
ifeq ($(OS), Darwin)
USE_BLAS64 := 0
USE_SYSTEM_LAPACK := 0
LIBBLAS := -L$(build_libdir) -lgfortblas
LIBBLASNAME := libgfortblas
else
LIBBLAS ?= -lblas
LIBBLASNAME ?= libblas
endif
else
LIBBLAS := -L$(build_shlibdir) -lopenblas <---- Init
LIBBLASNAME := libopenblas
endif
The code for adding the suffix to the shared object file does not overwrite the above code in this case:
# Renaming OpenBLAS symbols, see #4923 and #8734
ifeq ($(USE_SYSTEM_BLAS), 0)
ifeq ($(USE_BLAS64), 1)
OPENBLAS_SYMBOLSUFFIX := 64_
OPENBLAS_LIBNAMESUFFIX := 64_
LIBBLAS := -L$(build_shlibdir) -lopenblas$(OPENBLAS_LIBNAMESUFFIX) <----- No overwrite
LIBLAPACK := $(LIBBLAS)
LIBBLASNAME := $(LIBBLASNAME)$(OPENBLAS_LIBNAMESUFFIX)
LIBLAPACKNAME := $(LIBBLASNAME)
endif
endif