mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-18 14:32:36 +00:00
OCCT link order: put TKFillet/TKOffset before their dependencies, not after
OCCT_LIBS is an explicit single-pass static link order — dependents first, TKernel
deliberately last. The CAD block appended its two extra toolkits to the END of that list,
which puts them after everything they depend on:
list(APPEND OCCT_LIBS TKFillet TKOffset)
TKOffset references BRepAlgo_Loop, and nm against the built deps prefix shows TKBool is the
only toolkit that defines it (TKTopAlgo, TKBO, TKPrim, TKFillet and TKOffset all define it
zero times). TKBool sits first in the list, so a single-pass linker has passed it long before
it reaches the appended TKOffset and will not go back:
libTKOffset.a(BRepOffset_MakeLoops.cxx.o): undefined reference to
BRepAlgo_Loop::BRepAlgo_Loop()
Only one configuration ever objected — the Snapmaker fork Flatpak (aarch64). Ordinary Linux,
macOS and Windows links resolve it regardless, and the mainline fork Flatpaks pass, so six
green platform legs said nothing about whether this list was correct.
Prepended via set() rather than list(PREPEND), which needs CMake 3.15 while this project
supports 3.13.
Worth knowing for later: TKFillet and TKOffset are mutually dependent, 20 symbols needed in
each direction, so a stricter single-pass link could still trip on that pair. It does not on
any current platform, so no --start-group or duplicate entry is added here; if something ever
complains about ChFi or BRepFill symbols, that cycle is the reason.
snaporca-2kj
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LyRwbuq6fjn3VV9U9UvhBM
This commit is contained in:
co-authored by
Claude Opus 5
parent
295c030309
commit
2c5ddd4102
@@ -613,8 +613,18 @@ set(OCCT_LIBS
|
||||
)
|
||||
# The CAD kernel is the only consumer of OCCT's ModelingAlgorithms module. Upstream's
|
||||
# DataExchange already pulls TKBool in transitively, so the true delta is these two.
|
||||
#
|
||||
# PREPEND, never append: this list is single-pass static link order, dependents before
|
||||
# dependencies — note TKernel, which everything needs, is deliberately last. TKOffset
|
||||
# references BRepAlgo_Loop, which TKBool defines, so TKOffset must come BEFORE TKBool.
|
||||
# Appending put it after, and the Snapmaker fork's Flatpak build — the one configuration
|
||||
# whose linker is strictly single-pass — failed with
|
||||
# libTKOffset.a(BRepOffset_MakeLoops.cxx.o): undefined reference to
|
||||
# `BRepAlgo_Loop::BRepAlgo_Loop()'
|
||||
# while the ordinary Linux, macOS and Windows links resolved it anyway. Use set() rather
|
||||
# than list(PREPEND), which needs CMake 3.15 and this project supports 3.13.
|
||||
if (SLIC3R_CAD)
|
||||
list(APPEND OCCT_LIBS TKFillet TKOffset)
|
||||
set(OCCT_LIBS TKFillet TKOffset ${OCCT_LIBS})
|
||||
endif ()
|
||||
# Publish the link list so the Windows packaging step can assert it ships a DLL for
|
||||
# every toolkit we link, instead of shipping whatever the deps prefix happens to hold.
|
||||
|
||||
Reference in New Issue
Block a user