From: Ola x Nilsson <ola.x.nilsson@axis.com>
To: Ola x Nilsson <Ola.x.Nilsson@axis.com>
Cc: Alexander Kanavin <alex.kanavin@gmail.com>,
Niko Mauno <niko.mauno@vaisala.com>,
<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [RFC PATCH 2/3] kbd: Disable 64 bit time with 32 bit glibc
Date: Tue, 8 Nov 2022 18:56:06 +0100 [thread overview]
Message-ID: <jwq4jv9s4zi.fsf@axis.com> (raw)
In-Reply-To: <1725A47F2FC9966F.2170@lists.openembedded.org>
And here is a link to the documentation for the _TIME_BITS Feature Test
Macro
https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html#index-_005fTIME_005fBITS
The docs for _FILE_OFFSET_BITS is just above.
/Ola
On Tue, Nov 08 2022, Ola x Nilsson wrote:
> Sorry, that link did not explain the -D_USE_TIME_BITS=64 flag.
>
> I was sure I had read official docs of this somewhere but now I can only
> find https://sourceware.org/glibc/wiki/Y2038ProofnessDesign#Detailed_implementation
>
> /Ola
>
> On Tue, Nov 08 2022, Ola x Nilsson wrote:
>
>> As far as I can tell from glibc's documentation, this is how you are
>> supposed to do it. glibc chose to always support both 32 and 64 bit
>> APIs for time and file offset and make the normal int size the default.
>> musl chose to switch to 64bit altogether.
>>
>> https://www.gnu.org/software/libc/manual/html_node/64_002dbit-time-symbol-handling.html
>>
>> /Ola
>>
>> On Tue, Nov 08 2022, Alexander Kanavin wrote:
>>
>>> I suppose what I want to say is - perhaps this should be discussed
>>> with upstreams first? Things should 'just work' without having to set
>>> some magic flags in an external configuration.
>>>
>>> Alex
>>>
>>> On Tue, 8 Nov 2022 at 13:18, Alexander Kanavin via
>>> lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
>>> wrote:
>>>>
>>>> Is this a recommendation somewhere official?
>>>>
>>>> Alex
>>>>
>>>> On Tue 8. Nov 2022 at 13.04, Niko Mauno <niko.mauno@vaisala.com> wrote:
>>>>>
>>>>> My understanding wrt. Y2038 and 32-bit glibc hosts was such that it
>>>>> makes sense to set said compiler flags globally to ensure user space
>>>>> wide Y2038 compliance. So I encountered this compiler error while
>>>>> building poky reference images with additional effective
>>>>>
>>>>> TARGET_CPPFLAGS += "-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
>>>>>
>>>>> declaration in meta/conf/distro/include/tclibc-glibc.inc.
>>>>>
>>>>> -Niko
>>>>>
>>>>> On 8.11.2022 13.50, Alexander Kanavin wrote:
>>>>> > So you need to set -D_TIME_BITS=64
>>>>> > -D_FILE_OFFSET_BITS=64 to get some error? But why set that, shouldn’t
>>>>> > the defaults work?
>>>>> >
>>>>> > Alex
>>>>> >
>>>>> > On Tue 8. Nov 2022 at 12.48, Niko Mauno <niko.mauno@vaisala.com
>>>>> > <mailto:niko.mauno@vaisala.com>> wrote:
>>>>> >
>>>>> > I have not studied the issue, but in order to reproduce this error I
>>>>> > add
>>>>> > 'MACHINE = "qemuarm"' to local.conf then issue 'bitbake kbd' against
>>>>> > current master while TARGET_CPPFLAGS value is set to "-D_TIME_BITS=64
>>>>> > -D_FILE_OFFSET_BITS=64".
>>>>> >
>>>>> > -Niko
>>>>> >
>>>>> > On 8.11.2022 11.14, Alexander Kanavin wrote:
>>>>> > > We do build for 32 bit arm targets, so is this seen only in specific
>>>>> > > circumstances? What are they?
>>>>> > >
>>>>> > > Alex
>>>>> > >
>>>>> > > On Tue, 8 Nov 2022 at 01:09, Niko Mauno via
>>>>> > lists.openembedded.org
>>>>> > <http://lists.openembedded.org/
>>>>> > > <niko.mauno=vaisala.com@lists.openembedded.org
>>>>> > <mailto:vaisala.com@lists.openembedded.org>> wrote:
>>>>> > >>
>>>>> > >> For now add exemption in order to avoid following failure during
>>>>> > >> do_compile()
>>>>> > >>
>>>>> > >> |
>>>>> > .../build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/kbd/2.5.1-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/12.2.0/ld:.libs/libtswrap.ver:2:
>>>>> > syntax error in VERSION script
>>>>> > >> | collect2: error: ld returned 1 exit status
>>>>> > >>
>>>>> > >> Signed-off-by: Niko Mauno <niko.mauno@vaisala.com
>>>>> > <mailto:niko.mauno@vaisala.com>>
>>>>> > >> ---
>>>>> > >> meta/recipes-core/kbd/kbd_2.5.1.bb
>>>>> > <http://kbd_2.5.1.bb/
>>>>> > >> 1 file changed, 3 insertions(+)
>>>>> > >>
>>>>> > >> diff --git a/meta/recipes-core/kbd/kbd_2.5.1.bb
>>>>> > <http://kbd_2.5.1.bb/
>>>>> > >> index aa3ab6e121..b623aecd36 100644
>>>>> > >> --- a/meta/recipes-core/kbd/kbd_2.5.1.bb
>>>>> > <http://kbd_2.5.1.bb/
>>>>> > >> +++ b/meta/recipes-core/kbd/kbd_2.5.1.bb
>>>>> > <http://kbd_2.5.1.bb/
>>>>> > >> @@ -18,6 +18,9 @@ SRC_URI =
>>>>> > "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
>>>>> > >>
>>>>> > >> SRC_URI[sha256sum] =
>>>>> > "ccdf452387a6380973d2927363e9cbb939fa2068915a6f937ff9d24522024683"
>>>>> > >>
>>>>> > >> +# Compiling 64 bit time for 32 bit host is broken
>>>>> > >> +GLIBC_64BIT_TIME_CPPFLAGS = ""
>>>>> > >> +
>>>>> > >> PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam',
>>>>> > d)} \
>>>>> > >> "
>>>>> > >>
>>>>> > >> --
>>>>> > >> 2.36.1
>>>>> > >>
>>>>> > >>
>>>>> > >>
>>>>> > >>
>>>>> >
>>>>
>>>>
>>>>
>>>>
>>> [4. ATT00001.txt --- text/plain; ATT00001.txt]...
>
> [4. ATT00001.txt --- text/plain; ATT00001.txt]...
next prev parent reply other threads:[~2022-11-08 17:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 0:08 [RFC PATCH 1/3] Try to ensure 64 bit time on 32 bit glibcful hosts Niko Mauno
2022-11-08 0:08 ` [RFC PATCH 2/3] kbd: Disable 64 bit time with 32 bit glibc Niko Mauno
2022-11-08 9:14 ` [OE-core] " Alexander Kanavin
2022-11-08 11:48 ` Niko Mauno
2022-11-08 11:50 ` Alexander Kanavin
2022-11-08 12:04 ` Niko Mauno
2022-11-08 12:18 ` Alexander Kanavin
[not found] ` <17259B3874804FB3.24550@lists.openembedded.org>
2022-11-08 12:57 ` Alexander Kanavin
2022-11-08 14:56 ` Ola x Nilsson
2022-11-08 15:00 ` Ola x Nilsson
[not found] ` <1725A47F2FC9966F.2170@lists.openembedded.org>
2022-11-08 17:56 ` Ola x Nilsson [this message]
2022-11-08 18:38 ` Alexander Kanavin
2022-11-09 7:44 ` Ola x Nilsson
2022-11-09 15:42 ` Alexandre Belloni
2022-11-08 16:40 ` Khem Raj
2022-11-08 16:45 ` Alexander Kanavin
2022-11-08 0:08 ` [RFC PATCH 3/3] pulseaudio: " Niko Mauno
2022-11-08 10:17 ` [OE-core] " Peter Kjellerstedt
2022-11-08 3:30 ` [OE-core] [RFC PATCH 1/3] Try to ensure 64 bit time on 32 bit glibcful hosts Khem Raj
2022-11-08 10:51 ` Ola x Nilsson
2022-11-08 16:38 ` Khem Raj
2022-11-09 6:33 ` Niko Mauno
2022-11-09 15:47 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwq4jv9s4zi.fsf@axis.com \
--to=ola.x.nilsson@axis.com \
--cc=alex.kanavin@gmail.com \
--cc=niko.mauno@vaisala.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox