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

use regular stat() instead of non-standard __xstat64 abi #362

Merged
merged 1 commit into from
Dec 13, 2023
Merged

use regular stat() instead of non-standard __xstat64 abi #362

merged 1 commit into from
Dec 13, 2023

Conversation

bratkartoffel
Copy link
Contributor

This should fix sbt/sbt#7455

@eed3si9n

Disclaimer: I'm not a scala developer, nor have I experience with JNA. I'd be glad if someone else could verify / review this thoroughly.

}
private object Linux64Milli extends PosixMilliLongUtim[Linux64] {
protected final val AT_FDCWD: Int = -100
protected final val UTIME_OMIT: Long = (1L << 30) - 2
protected def getModifiedTimeNative(filePath: String) = {
val stat = new Linux64FileStat
checkedIO(filePath) { libc.__xstat64(1, filePath, stat) }
checkedIO(filePath) { libc.stat(filePath, stat) }
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@bratkartoffel
Copy link
Contributor Author

I've made a silly typo, so I had to amend & force push again, sorry

@bratkartoffel
Copy link
Contributor Author

The mimaReportBinaryIssues fails as the abi calls changed. How can I fix this?

@eed3si9n
Copy link
Member

Plz add

exclude[DirectMissingMethodProblem]("sbt.internal.io.Linux32.*"),
exclude[ReversedMissingMethodProblem]("sbt.internal.io.Linux32.*"),
exclude[DirectMissingMethodProblem]("sbt.internal.io.Linux64.*"),
exclude[ReversedMissingMethodProblem]("sbt.internal.io.Linux64.*"),

around https://github.com/sbt/io/blob/develop/build.sbt#L136

@bratkartoffel
Copy link
Contributor Author

bratkartoffel commented Dec 13, 2023

After digging a bit, i stumbled accross #211 (Native Milli code no longer necessary on JDK10 or greater)

As mentioned in the description, the whole code was added due to a bug in the JVM. The underlying issue was not only fixed for Java 10 (as stated in the PR description), but also backported to Java 8u301. So I think, this whole stuff is no longer needed at all.

See also https://www.oracle.com/java/technologies/javase/8u301-relnotes.html

@eed3si9n
Copy link
Member

but also backported to Java 8u301

I didn't know that. I'd be happy to see this whole thing dropped. https://github.com/sbt/io/blob/develop/io/src/main/scala/sbt/io/JavaMilli.scala is public, but the rest of internal stuff can probably go.

@bratkartoffel
Copy link
Contributor Author

I'd be glad to help, but this is far beyond my scala knowledge.
Maybe just merge this MR as a "hotfix" and drop the whole stuff later?

@eed3si9n eed3si9n merged commit 3212880 into sbt:develop Dec 13, 2023
7 checks passed
@bratkartoffel bratkartoffel deleted the bugfix/lfs64-fixes branch December 13, 2023 15:30
mergify bot referenced this pull request in slick/slick Dec 14, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sbt/sbt](https://togithub.com/sbt/sbt) | patch | `1.9.7` -> `1.9.8` |

---

### Release Notes

<details>
<summary>sbt/sbt (sbt/sbt)</summary>

### [`v1.9.8`](https://togithub.com/sbt/sbt/releases/tag/v1.9.8): 1.9.8

[Compare Source](https://togithub.com/sbt/sbt/compare/v1.9.7...v1.9.8)

#### updates

- Fixes `IO.getModifiedOrZero` on Alpine etc, by using clib `stat()`
instead of non-standard `__xstat64` abi by
[@&#8203;bratkartoffel](https://togithub.com/bratkartoffel) in
[https://github.com/sbt/io/pull/362](https://togithub.com/sbt/io/pull/362)
- As a temporary fix for JLine issue, this disables vi-style effects
inside emacs by [@&#8203;hvesalai](https://togithub.com/hvesalai) in
[https://github.com/sbt/sbt/pull/7420](https://togithub.com/sbt/sbt/pull/7420)
- Backports fix for `updateSbtClassifiers` not downloading sources
[https://github.com/sbt/sbt/pull/7437](https://togithub.com/sbt/sbt/pull/7437)
by [@&#8203;azdrojowa123](https://togithub.com/azdrojowa123)
- Backports missing logger methods that take Java Supplier
[https://github.com/sbt/sbt/pull/7447](https://togithub.com/sbt/sbt/pull/7447)
by [@&#8203;mkurz](https://togithub.com/mkurz)

**Full Changelog**: sbt/sbt@v1.9.7...v1.9.8

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log [here](https://developer.mend.io/github/slick/slick).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy45My4xIiwidXBkYXRlZEluVmVyIjoiMzcuOTMuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
cwienberg referenced this pull request in cwienberg/spark-sorting-helpers Jan 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sbt/sbt](https://togithub.com/sbt/sbt) | patch | `1.9.7` -> `1.9.8` |

---

### Release Notes

<details>
<summary>sbt/sbt (sbt/sbt)</summary>

### [`v1.9.8`](https://togithub.com/sbt/sbt/releases/tag/v1.9.8): 1.9.8

[Compare Source](https://togithub.com/sbt/sbt/compare/v1.9.7...v1.9.8)

#### updates

- Fixes `IO.getModifiedOrZero` on Alpine etc, by using clib `stat()`
instead of non-standard `__xstat64` abi by
[@&#8203;bratkartoffel](https://togithub.com/bratkartoffel) in
[https://github.com/sbt/io/pull/362](https://togithub.com/sbt/io/pull/362)
- As a temporary fix for JLine issue, this disables vi-style effects
inside emacs by [@&#8203;hvesalai](https://togithub.com/hvesalai) in
[https://github.com/sbt/sbt/pull/7420](https://togithub.com/sbt/sbt/pull/7420)
- Backports fix for `updateSbtClassifiers` not downloading sources
[https://github.com/sbt/sbt/pull/7437](https://togithub.com/sbt/sbt/pull/7437)
by [@&#8203;azdrojowa123](https://togithub.com/azdrojowa123)
- Backports missing logger methods that take Java Supplier
[https://github.com/sbt/sbt/pull/7447](https://togithub.com/sbt/sbt/pull/7447)
by [@&#8203;mkurz](https://togithub.com/mkurz)

**Full Changelog**: sbt/sbt@v1.9.7...v1.9.8

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cwienberg/spark-sorting-helpers).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alpine 3.19 + Java 8: Symbol not found: __xstat64
2 participants