Makefile: Fix library link order #49

Closed
cavallar wants to merge 0 commits from gitlab-mr-iid-32 into master
Member

When compiling with the internal lexbor, the linker is invoked as
cc [...] -lm lexbor_static.a which, at least on GCC 12 i386 glibc, fails with:

/usr/bin/ld: c_src/lexbor/liblexbor_static.a(diyfp.c.o): in function lexbor_cached_power_bin': ./deps/fast_html/c_src/lexbor/./deps/fast_html/c_src/lexbor/source/lexbor/core/diyfp.c:140: undefined reference to ceil'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:45: priv/fasthtml_worker] Error 1

Fix it by ordering -lm after lexbor_static.a.

This issue exists on 2.3.0 (as used by pleroma 2.8.0) and 2.4.0.

PS: Happy new year!

When compiling with the internal lexbor, the linker is invoked as cc [...] -lm lexbor_static.a which, at least on GCC 12 i386 glibc, fails with: /usr/bin/ld: c_src/lexbor/liblexbor_static.a(diyfp.c.o): in function `lexbor_cached_power_bin': ./deps/fast_html/c_src/lexbor/./deps/fast_html/c_src/lexbor/source/lexbor/core/diyfp.c:140: undefined reference to `ceil' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:45: priv/fasthtml_worker] Error 1 Fix it by ordering -lm after lexbor_static.a. This issue exists on 2.3.0 (as used by pleroma 2.8.0) and 2.4.0. PS: Happy new year!
Owner

Oh, right I forget about linking order so often… thanks!

Oh, right I forget about linking order so often… thanks!

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma-elixir-libraries/fast_html!49
No description provided.