You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fails to build on x86 and armhf due to undefined reference to __va_copy #77
why is __va_copy even used instead of just va_copy (which is standardized and widely used)?
because this code is much older than you think, and the 'standardised' va_copy wasn't really standardised prior to 2011/10. i forget which standard.
so, at the time, on powerpc32 (yes, that old), va_copy most likely didn't exist, but the libc provided __va_copy to not clash with a potential future implementation. you'll have to do some archaelogical digging to find it for sure.
these days though, sure, as long as you target the new standards you can use va_copy instead.
the 'standardised' va_copy wasn't really standardised prior to 2011/10
from what i've been able to find (it's a bit unclear though, as the standard costs 60 dollars to download (😠)), va_copy was supposed to be guaranteed to exist since at least C99
It guess it's more than just alpine being an issue. It's the combination of alpine and some platforms. In any case, it seems better choice is to use va_copy everywhere now. I've done that.
Activity
testing/pacparser: do not build on x86
manugarg commentedon Sep 26, 2016
Digging this a bit further, I changed Makefile to set HAVE_VA_COPY in Sep 2010, by this change:
53ebc46#diff-f57f2991a6aa25fe45d8036c51bf8b4d
Not sure why it wasn't reported until now. Also, debian is able to build it just fine:
https://packages.debian.org/unstable/libpacparser1
manugarg commentedon Sep 26, 2016
On further investigation, it seems that GCC defines MACRO __va_copy to be a builtin:
https://github.com/gcc-mirror/gcc/blob/master/gcc/ginclude/stdarg.h#L54
I wonder why are you getting this error. I'll try to build it myself to see if I can reproduce it.
guangzhi-ran-hpeprod commentedon Mar 9, 2020
See this issue on apline. Works by replacing __va_copy with va_copy.
manugarg commentedon Apr 4, 2022
This issue is super old now. Please re-open if it's still an issue.
ptrcnull commentedon Dec 20, 2022
it is still an issue: https://gitlab.alpinelinux.org/ptrcnull/aports/-/jobs/931243
please reopen the issue
ptrcnull commentedon Dec 20, 2022
why is
__va_copyeven used instead of justva_copy(which is standardized and widely used)?it looks like 53ebc46 was some weird debian ppc workaround, is there any issue / bug report related to that?
nekopsykose commentedon Dec 20, 2022
because this code is much older than you think, and the 'standardised' va_copy wasn't really standardised prior to 2011/10. i forget which standard.
so, at the time, on powerpc32 (yes, that old), va_copy most likely didn't exist, but the libc provided __va_copy to not clash with a potential future implementation. you'll have to do some archaelogical digging to find it for sure.
these days though, sure, as long as you target the new standards you can use
va_copyinstead.ptrcnull commentedon Dec 20, 2022
from what i've been able to find (it's a bit unclear though, as the standard costs 60 dollars to download (😠)),
va_copywas supposed to be guaranteed to exist since at least C99moszajca commentedon Jan 12, 2024
Still an issue on Alpine:
Using
va_copyfixes itmanugarg commentedon Jan 12, 2024
I think I understand this issue better now. Alpine uses musl for C library and musl doesn't define __va_copy. I'll submit a fix soon.
Fix Makefile for Alpine
manugarg commentedon Jan 13, 2024
It guess it's more than just alpine being an issue. It's the combination of alpine and some platforms. In any case, it seems better choice is to use va_copy everywhere now. I've done that.
moszajca commentedon Jan 15, 2024
@manugarg thanks for the update. Do you plan to release it soon?
manugarg commentedon Jan 15, 2024
Yeah, I plan to cut a release in a couple of days.