Build failure with Protobuf 22+ in Linux #544
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.
This is a re-opened PR (original PR:#504)
1. Problem:
Question 1:
In Linux, if you compile mysql-8.0.35 with protobuf 24.2, the error (Here is the full log:build.log):
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:
In fact, it should be:
2. How to reproduce:
Environment: Linux x86-64 platform
Dependency: protobuf 22+
Compile: Open -DWITH_PROTOBUF="system", then compile the mysql-8.0.35 code
3. Advice on this legacy question
In 2023.10, the Release Note of mysql-8.0.35 claimed to have fixed the problem.
But I found that this issue still exists on Linux environments and seems to be fixed only on MacOS environments.
In 2023.11, I proposed a fix on Linux, and PR was shut down by robots and not adopted.(PR link:https://github.com/mysql/mysql-server/pull/504)
It's 2024.05, and I find that this problem persists even now. Neither mysql-8.0.36 nor 8.0.37 fixed this issue.
As a Linux distribution operating system maintainer, I want mysql to be better and used by more people, so I am very concerned about this issue and hope mysql can fix this problem.