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

please avoid use of non-portable on_exit() #202

Closed
kanavin opened this issue Jan 18, 2022 · 1 comment · Fixed by #206
Closed

please avoid use of non-portable on_exit() #202

kanavin opened this issue Jan 18, 2022 · 1 comment · Fixed by #206

Comments

@kanavin
Copy link

kanavin commented Jan 18, 2022

It is glibc-specifc, and this occurs on e.g. musl C library:

| /home/alex/development/poky/build-musl/tmp/work/core2-32-poky-linux-musl/efivar/38-r0/recipe-sysroot-native/usr/bin/i686-poky-linux-musl/../../libexec/i686-poky-linux-musl/gcc/i686-poky-linux-musl/11.2.0/ld.bfd: /home/alex/development/poky/build-musl/workspace/sources/efivar/src/efisecdb.c:382: undefined reference to `on_exit'

man on_exit says:

Portable application should avoid this function, and use the standard atexit(3) instead.

@oxr463
Copy link

oxr463 commented Jan 21, 2022

Duplicate of #197

ncopa added a commit to ncopa/efivar that referenced this issue Jan 28, 2022
Use POSIX atexit(3) instead of the GNU specific on_exit(3).

on_exit(3) does not provide any real value since the arguments passed
needs to be globals anyway.

Set oufile=NULL on success to prevent deletion from the atexit handler,
which does not take a exit status argument.

Resolves: rhboot#197
Resolves: rhboot#202
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
@ncopa ncopa mentioned this issue Jan 28, 2022
ncopa added a commit to ncopa/efivar that referenced this issue Jan 28, 2022
Refactor code to use POSIX atexit(3) instead of the GNU specific
on_exit(3).

Resolves: rhboot#197
Resolves: rhboot#202
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this issue May 27, 2022
Backport patch to get efivar working with musl.

Upstream issue:
rhboot/efivar#202

After commit meta-oe/1582f81805ee3114bc1a44bd5cf52d21f96702ca
fwupd gives an error when trying to build with musl because
efivar is not compatible. This fixes the issue.

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
github-actions bot pushed a commit to cyber-zoo/poky that referenced this issue May 27, 2022
Backport patch to get efivar working with musl.

Upstream issue:
rhboot/efivar#202

After commit meta-oe/1582f81805ee3114bc1a44bd5cf52d21f96702ca
fwupd gives an error when trying to build with musl because
efivar is not compatible. This fixes the issue.

(From OE-Core rev: 005b6aba89eaf1b79fdd7565dd028fdd9bbfcc7d)

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this issue Jun 24, 2022
Backport patch to get efivar working with musl.

Upstream issue:
rhboot/efivar#202

After commit meta-oe/1582f81805ee3114bc1a44bd5cf52d21f96702ca
fwupd gives an error when trying to build with musl because
efivar is not compatible. This fixes the issue.

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 005b6ab)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
armcc pushed a commit to lgirdk/poky that referenced this issue Jun 24, 2022
Backport patch to get efivar working with musl.

Upstream issue:
rhboot/efivar#202

After commit meta-oe/1582f81805ee3114bc1a44bd5cf52d21f96702ca
fwupd gives an error when trying to build with musl because
efivar is not compatible. This fixes the issue.

(From OE-Core rev: a121d2dd5d1e47072cb1419c9cbe9ef345de8e02)

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 005b6aba89eaf1b79fdd7565dd028fdd9bbfcc7d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
Backport patch to get efivar working with musl.

Upstream issue:
rhboot/efivar#202

After commit meta-oe/1582f81805ee3114bc1a44bd5cf52d21f96702ca
fwupd gives an error when trying to build with musl because
efivar is not compatible. This fixes the issue.

(From OE-Core rev: 005b6aba89eaf1b79fdd7565dd028fdd9bbfcc7d)

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
Backport patch to get efivar working with musl.

Upstream issue:
rhboot/efivar#202

After commit meta-oe/1582f81805ee3114bc1a44bd5cf52d21f96702ca
fwupd gives an error when trying to build with musl because
efivar is not compatible. This fixes the issue.

(From OE-Core rev: 005b6aba89eaf1b79fdd7565dd028fdd9bbfcc7d)

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants