Commit 07c8a25
committed
fix(lambda-layer): drop unused libicu DT_NEEDED via --as-needed linker flag
AL2023's boost-devel puts libicu on the linker's library path. The default
ld behaviour records every library in scope as DT_NEEDED, so libparquet.so
ended up declaring libicudata/libicui18n/libicuuc as runtime deps even
though Arrow uses zero ICU symbols (confirmed by `objdump -T`). Lambda's
AL2023 runtime doesn't ship libicu, so layers for py3.12+ failed to
import with "libicudata.so.67: cannot open shared object file".
Pass -Wl,--as-needed via CMAKE_{SHARED,EXE}_LINKER_FLAGS so the linker
omits DT_NEEDED entries for libraries whose symbols are never referenced.
This is the proper fix for the original problem PR #3336 worked around —
it now applies generally rather than relying on libicu being absent from
the build env.1 parent 434fbda commit 07c8a25
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| |||
0 commit comments