Fixed ld trace-symbol formatting issue #34
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.
The build script is broken when I first tried to install universe. I realise there is a problem in this module's build script when I realise linker had some breaking changes to their output format.
The ld (GNU linker) formatting of the output
ld -ljpeg --trace-symbol jpeg_CreateDecompress -e 0
has changed since this commit when they cleaned up the inconsistent output. The version introduced this changes is when in the ld version 2.30.51 -> 2.30.52.Issue Description
Version 2.30.51 or before
The
build.py
is written based on the output format here before they changed it. The linewill outputs
in shell, and hence the
in
build.py
is correct to get the/usr/lib/libjpeg.so
in field 0.Version 2.30.52 and after
But the newer version of ld has changed the format here, which is now using
where the
%P:
refers to the program name. Hence, the output is nowwhich is essentially prefix by the linker program name. Therefore, we need to retrieve the correct info in field 1.
My PR involves of retrieving ld's version number and adjust the field index accordingly.