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

depends: Cross-compiling qt for arm-linux-gnueabihf fails #29980

Closed
hebasto opened this issue Apr 27, 2024 · 1 comment · Fixed by #29985
Closed

depends: Cross-compiling qt for arm-linux-gnueabihf fails #29980

hebasto opened this issue Apr 27, 2024 · 1 comment · Fixed by #29985

Comments

@hebasto
Copy link
Member

hebasto commented Apr 27, 2024

On Ubuntu 24.04 with glibc 2.39:

compiling ../3rdparty/zlib/src/gzclose.c
In file included from /usr/arm-linux-gnueabihf/include/features.h:394,
                 from /usr/arm-linux-gnueabihf/include/bits/libc-header-start.h:33,
                 from /usr/arm-linux-gnueabihf/include/stdio.h:28,
                 from ../3rdparty/zlib/src/gzguts.h:40,
                 from ../3rdparty/zlib/src/gzclose.c:6:
/usr/arm-linux-gnueabihf/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"
      |     ^~~~~

Some similar issues in https://bugreports.qt.io suggest to switch from the builtin zlib to a system one. But that doesn't look like an option for us.

@laanwj
Copy link
Member

laanwj commented Apr 28, 2024

This is caused by the 32 to 64 bit time_t transition (for the 2038 epoch problem). It will affect all 32-bit Linux systems.

I would guess solving this requires a minimal patch to the zlib inside Qt to make the right combination of defines. i'll take a look at it.

@laanwj laanwj self-assigned this Apr 28, 2024
laanwj added a commit to laanwj/bitcoin that referenced this issue Apr 28, 2024
The 32 to 64 bit time_t transition causes a build failure in the built-in
gzip about conflicting _TIME_BITS and _FILE_OFFSET_BITS.

Note that gzip doesn't use time_t at all, so it is a false alarm.

Take the following patch from upstream gzip:
https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch

Closes bitcoin#29980.
laanwj added a commit to laanwj/bitcoin that referenced this issue Apr 28, 2024
The 32 to 64-bit time_t transition causes a build failure in the built-in
gzip about conflicting _TIME_BITS and _FILE_OFFSET_BITS.

Note that gzip doesn't use time_t at all, so it is a false alarm.

Take the following patch from upstream gzip:
https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch

Closes bitcoin#29980.
laanwj added a commit to laanwj/bitcoin that referenced this issue Apr 28, 2024
The 32 to 64-bit time_t transition causes a build failure in the built-in
gzip about conflicting _TIME_BITS and _FILE_OFFSET_BITS.

Note that gzip doesn't use time_t at all, so it is a false alarm.

Take the following patch from upstream gzip:
https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch

Closes bitcoin#29980.
laanwj added a commit to laanwj/bitcoin that referenced this issue Apr 28, 2024
The 32 to 64-bit time_t transition causes a build failure in the built-in
zlib about conflicting _TIME_BITS and _FILE_OFFSET_BITS.

Note that zlib doesn't use time_t at all, so it is a false alarm.

Take the following patch from upstream zlib:
https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch

Closes bitcoin#29980.
fanquake added a commit that referenced this issue Apr 30, 2024
…nt glibc

2e266f3 depends: Fix build of Qt for 32-bit platforms (laanwj)

Pull request description:

  The 32 to 64-bit `time_t` transition causes a build failure in the built-in zlib about conflicting `_TIME_BITS` and `_FILE_OFFSET_BITS`.

  Note that zlib doesn't use `time_t` at all, so it is a false alarm.

  Take the following patch from upstream zlib:
  https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch

  Closes #29980.

ACKs for top commit:
  hebasto:
    re-ACK 2e266f3.
  fanquake:
    ACK 2e266f3 - at some point qt's open source 5.15.x branch will catch up to where they bumped the internal zlib to >= 1.3 (which contains this change), and we'll be able to drop this patch. Checked that it fixes the build issue in the interim.

Tree-SHA512: b297aed8b299c671ff439b5b7b410832ff5004fd9b13c3b4a5fb5bde9dcf24a5eda08cd0a39565ae0641d9533711142bdc2889a32d343b9c4b41bfac24f0ca28
fanquake pushed a commit to fanquake/bitcoin that referenced this issue Apr 30, 2024
The 32 to 64-bit time_t transition causes a build failure in the built-in
zlib about conflicting _TIME_BITS and _FILE_OFFSET_BITS.

Note that zlib doesn't use time_t at all, so it is a false alarm.

Take the following patch from upstream zlib:
https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch

Closes bitcoin#29980.

Github-Pull: bitcoin#29985
Rebased-From: 2e266f3
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this issue May 8, 2024
The 32 to 64-bit time_t transition causes a build failure in the built-in
zlib about conflicting _TIME_BITS and _FILE_OFFSET_BITS.

Note that zlib doesn't use time_t at all, so it is a false alarm.

Take the following patch from upstream zlib:
https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch

Closes bitcoin#29980.

Github-Pull: bitcoin#29985
Rebased-From: 2e266f3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants