Alpine aarch64 build questions #1645
Open
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.
Summary
Running
cmake --build ./build
on a stock Alpine Linux installation with clang 17 (and clang 18) resulted in two compile errors - I am not clear if there's a simple environment fix or if it just needs more actual code in the Hermes repo.lseek has lseek64 capabilities, but neither lseek or lseek64 are in the namespace scope. (
raw_ostream.cpp
)thread-safety-analysis
is not picking up capability annotations forstd:mutex
and so the analysis fails on the lock.They're very simple and the patch just shows an inline workaround (e.g. calling
lseek
instead oflseek64
, and for the sake of compiling, just disabling tsa as that source is already verified by other build environments)Test Plan
This code presents the two issues and work-arounds, and is request for clarification as to the correct environment or appropriate workarounds:
lseek64 and sleek are not in the global namespace, and it may be that lseek is desired though the capability is 64.
This may have some clue as to that evolution:
https://reviews.llvm.org/D139752?id=484363
The failure of the TSA attribute is seen here:
While this couple line patch works fine to get things going - it would be nice to understand if there's an appropriate patch or change to the environment. I've not checked a separate aarch64 Linux distribution with LLVM. I've not checked for pre-built releases from Hermes for aarch64. React Native 0.76 does not supply aarch64.
With this small patch I believe I'm building just fine end-to-end for RN 0.76 on aarch64. This patch is not intended to be merged upstream, but rather illustrates the only two issues I hit in compiling.