Build failure with Protobuf 24.2 in Linux #504
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Question 1:
In Linux, if you compile mysql-8.0.35 with protobuf 24.2, the error (Here is the full log:build.log):
According to the release notes of mysql-8.0.35, this issue should have been fixed in the current release, but this is not the case.
Reading the mysql source code, it seems that protobuf 22+ is only fixed on MacOS, so the problem still exists on Linux.
Question 2:
Run the FIND_OBJECT_DEPENDENCIES function to find dependent libraries. If the output of objdump is as follows:
At this point, libc.so.6 can be processed normally and converted to "-lc";
However, "libstdc++.so.6" cannot be captured by the regular expression because it contains "++", so it cannot install the transposition "-lstdc++";
Although "ld-Linux-x86-64.2" can be captured by the regular expression, it is incorrectly converted to "-ld-Linux-x86-64", and the correct result should be "-ldl".
Function output error results are as follows:
I have to report this problem to mysql community, link: https://bugs.mysql.com/bug.php?id=113045
How to reproduce:
Environment: Linux x86-64 platform
Dependency: protobuf 24.2
Compile: Open -DWITH_PROTOBUF="system", then compile the mysql-8.0.35 code
My fix: