Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions recipes/geomodel/build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
#!/bin/bash -e

# Hide std::__format weak template instantiations from the dynamic symbol
# table of every shared library produced here. libstdc++.so does not export
# strong overrides for them, so without this script the weak duplicates baked
# into libGeoModel{Xml,Write,Read,DBManager} become the only definitions the
# dynamic linker can see, and subtle libstdcxx-devel header drift between the
# geomodel build host and downstream consumers crashes std::format users at
# runtime (ShipSoft/Geometry#26).
# Hide every std::__format symbol from the dynamic symbol table of every
# shared library produced here, including vtables, typeinfo, typeinfo names,
# and template-instantiated functions. libstdc++.so does not export strong
# overrides for them, so without this script the weak/vague-linkage copies
# baked into libGeoModel{Xml,Write,Read,DBManager} become the only definitions
# the dynamic linker can see; subtle libstdcxx-devel header drift between the
# geomodel build host and downstream consumers then crashes std::format users
# at runtime (ShipSoft/Geometry#26).
#
# The mangled namespace prefix `St8__format` matches every mangling form we
# need to hide:
# _ZNSt8__format… functions
# _ZTVNSt8__format… vtables
# _ZTINSt8__format… typeinfo
# _ZTSNSt8__format… typeinfo names
cat > "${SRC_DIR}/hide-std-format.ver" <<'EOF'
{
local: _ZNSt8__format*;
local: *NSt8__format*;
};
EOF

Expand Down
2 changes: 1 addition & 1 deletion recipes/geomodel/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ source:
sha256: 018c5087b70d956793d06dc040f842018eb3bedd9b2f175c6090af63ce963408

build:
number: 3
number: 4
skip:
- win
script: build.sh
Expand Down