Skip to content

Commit c6f2591

Browse files
giordanostaticfloat
authored andcommitted
Use Alpine 3.13 and remove -fvisibility=protected -fuse-ld=gold flags
`-fvisibility=protected` doesn't really help us much and causes the following error on Alpine Linux: ``` cc -o /tmp/jl_ACPfla/build/libblastrampoline.so -g -O2 -std=c99 -fPIC -DLIBRARY_EXPORTS -D_GNU_SOURCE -fvisibility=protected -DF2C_AUTODETECTION /tmp/jl_ACPfla/build/libblastrampoline.o /tmp/jl_ACPfla/build/dl_utils.o /tmp/jl_ACPfla/build/config.o /tmp/jl_ACPfla/build/autodetection.o /tmp/jl_ACPfla/build/threading.o /tmp/jl_ACPfla/build/deepbindless_surrogates.o /tmp/jl_ACPfla/build/trampolines/trampolines_x86_64.o /tmp/jl_ACPfla/build/f2c_adapters.o -shared -ldl /usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/jl_ACPfla/build/deepbindless_surrogates.o: relocation R_X86_64_PC32 against protected symbol `fake_lsame' can not be used when making a shared object /usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make: *** [Makefile:35: /tmp/jl_ACPfla/build/libblastrampoline.so] Error 1 ERROR: LoadError: failed process: Process(`make -sC /libblastrampoline/src CFLAGS_add= ARCH=x86_64 install builddir=/tmp/jl_ACPfla/build prefix=/tmp/jl_ACPfla/output`, ProcessExited(2)) [2] ``` and `-fuse-ld=gold` was only needed to make `-fvisibility=protected` work (and it isn't even available on Alpine Linux in our current CI set up).
1 parent ee05371 commit c6f2591

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

.drone.jsonnet

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ local Pipeline(os, arch, version, alpine=false) = {
88
steps: [
99
{
1010
name: "Run tests",
11-
image: "julia:"+version+(if alpine then "-alpine" else ""),
11+
# Use Alpine 3.13 because 3.14 has some troubles with Docker due to
12+
# https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2
13+
image: "julia:"+version+(if alpine then "-alpine3.13" else ""),
1214
commands: [
1315
(if alpine then "" else "apt-get update -y"),
1416
(if alpine then "apk add build-base linux-headers" else "apt-get install -y gcc build-essential"),

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ platform:
5252

5353
steps:
5454
- name: Run tests
55-
image: julia:1.6-alpine
55+
image: julia:1.6-alpine3.13
5656
commands:
5757
- ""
5858
- apk add build-base linux-headers

src/Make.inc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ LDFLAGS := -shared
3838
ifeq ($(OS),Linux)
3939
# On linux, we need to link `libdl` to get `dlopen`
4040
LDFLAGS += -ldl
41-
# We also want `-fvisibility=protected` on Linux, to match other platforms
42-
CFLAGS += -fvisibility=protected
43-
# There are bugs with `-fvisibility=protected` and certain versions of `ld`,
44-
# see https://sourceware.org/bugzilla/show_bug.cgi?id=26815 for more
45-
# We work around this by using `gold` on Linux
46-
LDFLAGS += -fuse-ld=gold
4741
endif
4842
4943
ifeq ($(OS),WINNT)

0 commit comments

Comments
 (0)