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

Remove unsetting _FILE_OFFSET_BITS #764

Closed
wants to merge 1 commit into from
Closed

Conversation

kraj
Copy link

@kraj kraj commented Jan 2, 2023

This does not work when enabling 64bit time_t with glibc which is enabled with -D_TIME_BITS=64, since it also needs
_FILE_OFFSET_BITS=64 and this does not work when its undefined explicitly

Signed-off-by: Khem Raj raj.khem@gmail.com

This does not work when enabling 64bit time_t with glibc which is
enabled with -D_TIME_BITS=64, since it also needs
_FILE_OFFSET_BITS=64 and this does not work when its undefined
explicitly

Signed-off-by: Khem Raj <raj.khem@gmail.com>
mirrorswp pushed a commit to webosose/chromium94 that referenced this pull request Feb 17, 2023
:Release Notes:
Removed the unsetting _FILE_OFFSET_BITS

:Detailed Notes:
This is cherry-pick from:
madler/zlib#764
    This does not work when enabling 64bit time_t with glibc which is
    enabled with -D_TIME_BITS=64, since it also needs
    _FILE_OFFSET_BITS=64 and this does not work when its undefined
    explicitly

Apply madler/zlib#764 on bundled zlib to fix
build with time64.inc as in:
https://git.openembedded.org/openembedded-core/tree/meta/conf/distro/include/time64.inc?id=18df5694796bcfee73c3765bc991bcef055466e3

FAILED: obj/third_party/zlib/zlib/gzclose.o
cc1: warning: switch '-mcpu=cortex-a8' conflicts with switch '-march=armv7-a+simd'
In file included from /OE/build/luneos-mickledore/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-webos-linux-gnueabi/webruntime/94-r59.2/recipe-sysroot/usr/include/features.h:392,
                 from /OE/build/luneos-mickledore/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-webos-linux-gnueabi/webruntime/94-r59.2/recipe-sysroot/usr/include/bits/libc-header-start.h:33,
                 from /OE/build/luneos-mickledore/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-webos-linux-gnueabi/webruntime/94-r59.2/recipe-sysroot/usr/include/stdio.h:27,
                 from ../../git/src/third_party/zlib/gzguts.h:21,
                 from ../../git/src/third_party/zlib/gzclose.c:6:
/OE/build/luneos-mickledore/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-webos-linux-gnueabi/webruntime/94-r59.2/recipe-sysroot/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
   26 | #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
      |     ^~~~~

:Testing Performed:
Build

:QA Notes:
N/A

:Issues Addressed:
[WRP-7446] Support integration of changes to meta

Change-Id: I2d7ce8ca6701d1eed610f459d6709d20ea577d0b
Reviewed-on: http://gpro.lge.com/c/webosose/chromium94/+/344126
Reviewed-by: Ban Word Checker <ban_word@lge.com>
Reviewed-by: Commit Msg Checker <commit_msg@lge.com>
Reviewed-by: Martin Jansa <martin2.jansa@lgepartner.com>
Reviewed-by: Vladislav Mukulov <vladislav.mukulov@lge.com>
Reviewed-by: Jose Dapena Paz <j.dapena@lgepartner.com>
Reviewed-by: Donghyun Kim <donghyun11.kim@lge.com>
Tested-by: Test BTS <test.bts@lge.com>
shr-project pushed a commit to meta-qt5/qtwebengine-chromium that referenced this pull request Apr 12, 2023
This does not work when enabling 64bit time_t with glibc which is enabled with -D_TIME_BITS=64, since it also needs
_FILE_OFFSET_BITS=64 and this does not work when its undefined explicitly

Upstream-Status: Submitted [madler/zlib#764]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request Apr 26, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: b1939329502d4c83b8d5725a6e594ab196e62f9b)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request Apr 27, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: d2a2da382353053ff9981395bb97b8cc3e3701e2)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request Apr 27, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: 7502daebee9e455fd31e234e0f024d60e1862daa)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request Apr 28, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: 15109c52884dceed28b16eb3ea53633e2a254f31)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request Apr 29, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: c954448db4f5bc00b2c49ee853606c1a68e8a762)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request Apr 29, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: 802b49d851cd4e3c3da1637fea0a24c1455677de)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request Apr 30, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: a5862720c61d7c1c2314e3f3735a3f42548f6035)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request May 1, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: a5862720c61d7c1c2314e3f3735a3f42548f6035)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request May 2, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: ec399a829cfc01f6a2f3e6c5237158e76d030e65)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request May 3, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: dd769f039aceda0fdc915d411a785c87846231cc)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request May 4, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: ee633e01995fb95c1e827e30e14b776c468027b8)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
kraj pushed a commit to YoeDistro/poky that referenced this pull request May 4, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: ee633e01995fb95c1e827e30e14b776c468027b8)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
rpurdie pushed a commit to yoctoproject/poky that referenced this pull request May 4, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: 99911726380547a10f438e424db71d5a3d006bb1)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request May 4, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
rpurdie pushed a commit to yoctoproject/poky that referenced this pull request May 4, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: 99911726380547a10f438e424db71d5a3d006bb1)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
rpurdie pushed a commit to yoctoproject/poky that referenced this pull request May 4, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: 99911726380547a10f438e424db71d5a3d006bb1)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
rpurdie pushed a commit to yoctoproject/poky that referenced this pull request May 5, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: c0fb603c9e26e91388320c02842b42cc7b091d6c)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request May 5, 2023
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
@madler
Copy link
Owner

madler commented Jan 17, 2024

What is it that does not work? This #undef is internal to the compilation of the gz code of zlib, where that code does not even use the time() function.

@Neustradamus
Copy link

@kraj: Can you look with develop branch?

@thesamesam
Copy link

What is it that does not work? This #undef is internal to the compilation of the gz code of zlib, where that code does not even use the time() function.

If you set _TIME_BITS=64 globally (as one should do, given it affects ABI) to opt-in to 64-bit time_t with glibc, its headers will abort if they find _FILE_OFFSET_BITS aren't used too.

@madler
Copy link
Owner

madler commented Jan 25, 2024

The code in gzguts.h is:

#  undef _FILE_OFFSET_BITS
#  undef _TIME_BITS

so, no problem.

@madler madler closed this Jan 25, 2024
@thesamesam
Copy link

Right, fixed with a566e15.

daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
Otherwise assimp will silently fall back to a vendored copy of zlib
which will fail with -D_TIME_BITS=64 due to madler/zlib#764

This was exposed by multilib mips core-image-minimal SDKs, where the default
64 bit sysroot has zlib, but 32 bit sysroot does not.

(From OE-Core rev: c0fb603c9e26e91388320c02842b42cc7b091d6c)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.

4 participants