Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7zip] restore missing sources and fix compilation on android #42911

Merged
merged 11 commits into from
Jan 3, 2025

Conversation

msclock
Copy link
Contributor

@msclock msclock commented Dec 24, 2024

Fixes #42910

References #41721, #41743

@msclock msclock marked this pull request as draft December 24, 2024 09:42
@msclock
Copy link
Contributor Author

msclock commented Dec 24, 2024

@DanAlbert in #41721, for This fixes compilation errors with NDK r28., Could you explain your compilation errors in detail. Thanks.

Still skip failures from Android or do more investigation🤔🤔

@dg0yt
Copy link
Contributor

dg0yt commented Dec 24, 2024

Why should the sources in the Windows directory be added to a non-WIN32 build?

@msclock
Copy link
Contributor Author

msclock commented Dec 24, 2024

Why should the sources in the Windows directory be added to a non-WIN32 build?

@dg0yt see #42910

@dg0yt
Copy link
Contributor

dg0yt commented Dec 24, 2024

@dg0yt see #42910

I have seen that already.

@msclock
Copy link
Contributor Author

msclock commented Dec 24, 2024

Why should the sources in the Windows directory be added to a non-WIN32 build?

AFAIK, 7zip uses win32 com api to implement a plugin loading way, so it implements the same api on linux. And Some api are placed in that Windows directory and refered by sources under the directory CPP/7zip/Archive with relative paths.

But in detail should ask the author of the initial port PR.

@WangWeiLin-MV WangWeiLin-MV added the category:port-bug The issue is with a library, which is something the port should already support label Dec 25, 2024
@msclock msclock force-pushed the 7zip branch 3 times, most recently from 464fb0b to 7d3db93 Compare December 25, 2024 07:30
@msclock msclock marked this pull request as ready for review December 25, 2024 07:53
@msclock
Copy link
Contributor Author

msclock commented Dec 25, 2024

@DanAlbert in #41721, for This fixes compilation errors with NDK r28., Could you explain your compilation errors in detail. Thanks.

Still skip failures from Android or do more investigation🤔🤔

@dg0yt @DanAlbert The failure is timespec_get is broken on android and I have handled it.

@msclock msclock changed the title [7zip] restore missing sources in CMakeLists.txt [7zip] restore missing sources and fix compilation on android Dec 25, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Dec 26, 2024

The failure is timespec_get is broken on android and I have handled it.

This may be too simplified.

  • The amount of API offered by Android varies with API level.
  • Recent NDK updates try to improve how the availability of implementations is presented during compilation. However, this has compatibility trade-offs. In particular when packages are not maintained with Android in mind (or in CI).

ports/7zip/portfile.cmake Outdated Show resolved Hide resolved
ports/7zip/portfile.cmake Outdated Show resolved Hide resolved
ports/7zip/vcpkg.json Outdated Show resolved Hide resolved
@msclock msclock marked this pull request as draft December 27, 2024 00:59
@msclock msclock marked this pull request as ready for review December 31, 2024 09:58
@msclock
Copy link
Contributor Author

msclock commented Dec 31, 2024

Have added constratins __ANDROID_API__ refered from tinycthread/tinycthread#47

@msclock msclock marked this pull request as draft December 31, 2024 11:11
@msclock msclock marked this pull request as ready for review December 31, 2024 11:54
Copy link
Contributor

@WangWeiLin-MV WangWeiLin-MV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The port installation tests pass with the following triplets:

  • x64-android
  • x64-linux

@WangWeiLin-MV WangWeiLin-MV added the info:reviewed Pull Request changes follow basic guidelines label Jan 3, 2025
@JavierMatosD JavierMatosD merged commit f4c23ff into microsoft:master Jan 3, 2025
18 checks passed
@DanAlbert
Copy link
Contributor

iirc the problem was that those files call APIs that don't exist on Android (or at least didn't at the minSdkVersion the port used, but I think it was the former)

@msclock msclock deleted the 7zip branch January 10, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[7zip] Some implementations aren't compiled
5 participants