Page MenuHome

Build: add compatibility between precompiled libraries and new glibc
ClosedPublic

Authored by Brecht Van Lommel (brecht) on Feb 25 2020, 1:23 PM.

Details

Summary

On Linux, precompiled libraries may be made with a glibc version that is
incompatible with the system libraries that Blender is built on. To solve
this we add a few -ffast-math symbols that can be missing.

We may only want to do this when necessary, though it's not clear if there
is any harm to do it always.

Diff Detail

Repository
rB Blender

Event Timeline

I have tested this works on Ubuntu and that the tests pass, but not any system that actually needs this like Arch.

intern/libc_compat/libc_compat.c
21

Technically, it's glibc, not libm.

26–27

Are you sure about naming? Quite sure you need __ in front.

This is what:

  1. Campbell's compile error shows P1268
  2. What glibc code suggests: extern double __REDIRECT_NTH (exp, (double), __exp_finite);
  3. What nm suggests on my system when following D6888#163873:
                 U _GLOBAL_OFFSET_TABLE_
0000000000000000 r .LC0
0000000000000000 T main
                 U __pow_finite
                 U printf

Address comments. You're right regarding the names.

Brecht Van Lommel (brecht) retitled this revision from Build: add compatibility between precompiled libraries and new libm to Build: add compatibility between precompiled libraries and new glibc.Feb 25 2020, 2:59 PM
Brecht Van Lommel (brecht) edited the summary of this revision. (Show Details)

Well, in theory this should be fine. But ultimate test would be to see if it works on Arch.

This revision is now accepted and ready to land.Feb 25 2020, 4:12 PM

I applied this on top of D6929 and I still saw the same linker errors.

Fix link order, tested to work on Arch.