Commit 3a8cdd7
committed
fix(mysqlx): serialize plugin build so protobuf finishes before link
The v4.0 tarball build failed at the plugin link with:
/usr/bin/ld: cannot find .../protobuf-3.21.12/install/lib/libprotobuf.a
Root cause: the vendored protobuf target (deps/Makefile) is a recursive
sub-make whose recipe `rm -rf`s deps/protobuf and re-runs a slow cmake
build+install. The plugin is built from both build_deps_default and
build_src_default, and under the parent build's -j that destructive
rebuild races the plugin's .o/.pb.o compiles and the final .so link --
all of which list $(PROTOBUF_LIB) as a prereq, yet the link fired while
libprotobuf.a was mid-rebuild and absent.
Add .NOTPARALLEL to plugins/mysqlx/Makefile so protobuf is fully built
before any plugin object or link (the plugin build is small, so the lost
parallelism is negligible), and fail-fast in the $(PROTOBUF_LIB) rule if
the deps build somehow doesn't produce the archive.
Claude-Session: https://claude.ai/code/session_014qhWjonVGoNJhRRu8H3i5J1 parent a5ccb86 commit 3a8cdd7
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
95 | 106 | | |
96 | 107 | | |
97 | 108 | | |
| |||
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
| 125 | + | |
114 | 126 | | |
115 | 127 | | |
116 | 128 | | |
| |||
0 commit comments