-
Notifications
You must be signed in to change notification settings - Fork 221
Do not use open64 #326
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Do not use open64 #326
Conversation
Why do we ever need to use open64 in the first place? Since we never seek it seems like we should just avoid the conditional logic. |
I am fine by using |
It's likely we have inherited it from |
What does libstd do for musl targets? |
The change to drop/deprecate LFS64 functions in musl is recent and has not yet made it to a GA release. |
Looking through the various documentation, the only difference (if any) is the presence of Let's change this patch to just unconditionally use |
If you rebase this PR onto the latest master, the tests should be passing. |
done |
cool. Uploaded a new version of PR. Lets see |
glibc is providing open64 and other lfs64 functions but musl aliases them to normal equivalents since off_t is always 64-bit on musl, therefore check for target env along when target OS is linux before using open64, this is more available. Latest Musl has made these namespace changes [1] There is no need for using LFS64 open explicitly as we are only using it for opening device files and not real files [1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4 Signed-off-by: Khem Raj <raj.khem@gmail.com>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap At this point USE=system-boostrap will be required with >= musl-1.2.4 until uptream merges these patches and updates their boostrap. This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap At this point USE=system-boostrap will be required with >= musl-1.2.4 until uptream merges these patches and updates their boostrap. This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap At this point USE=system-boostrap will be required with >= musl-1.2.4 until uptream merges these patches and updates their boostrap. This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap At this point USE=system-boostrap will be required with >= musl-1.2.4 until uptream merges these patches and updates their boostrap. This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap At this point USE=system-boostrap will be required with >= musl-1.2.4 until uptream merges these patches and updates their boostrap. This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap At this point USE=system-boostrap will be required with >= musl-1.2.4 until uptream merges these patches and updates their boostrap. This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap At this point USE=system-boostrap will be required with >= musl-1.2.4 until uptream merges these patches and updates their boostrap. This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap At this point USE=system-boostrap will be required with >= musl-1.2.4 until uptream merges these patches and updates their boostrap. This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, for those that are still experiencing issues these steps should resolve them: 1. Downgrade to musl-1.2.3 2. Rebuild dev-lang/rust with these patches 3. Upgrade to musl-1.2.4 again 4. Rebuild rust with USE=system-bootstrap This was tested with musl-1.2.3, musl-1.2.4 and glibc-2.37-r3. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, may need -system-bootstrap after updating musl. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-Commit: rust-lang/libc@1e8c55c Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This fixes the build with musl-1.2.4, may need -system-bootstrap after updating musl. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-Commit: rust-lang/libc@1e8c55c Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
This version fixes compatibility with musl libc (rust-random/getrandom#326).
This version fixes compatibility with musl libc (rust-random/getrandom#326).
This version fixes compatibility with musl libc (rust-random/getrandom#326).
This fixes the build with musl-1.2.4, may need -system-bootstrap after updating musl. Closes: https://bugs.gentoo.org/903607 Upstream-PR: rust-lang/rust#106246 Upstream-Issue: rust-lang/libc#2934 Upstream-PR: rust-lang/libc#2935 Upstream-Commit: rust-lang/libc@1e8c55c Upstream-PR: rust-random/getrandom#326 Upstream-Commit: rust-random/getrandom@7f73e3c Signed-off-by: orbea <orbea@riseup.net>
glibc is providing open64 and other lfs64 functions but musl aliases them to normal equivalents since off_t is always 64-bit on musl, therefore check for target env along when target OS is linux before using open64, this is more available. Latest Musl has made these namespace changes [1]
[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
Signed-off-by: Khem Raj raj.khem@gmail.com