It's currently not possible to cross-compile libgpg-error without having built it natively at least once , to create /src/syscfg/lock-obj-pub.$ARCHITECTURE.h.
It would be nice if we could avoid this bootstrapping step.
Over on https://bugs.debian.org/869609, Steven Capper asks:
So going through this my understanding is that for Linux this library
creates weak references to the pthread_mutex_ functions as well as
simulates the size of the pthread_mutex_t type. IIUC this obviates the
need to cross-compile against pthreads. When one loads the library,
the weak references will be overridden by the C library and, providing
the data type is the same as simulated, should operate as one is using
If the simulated data type does not match the system implementation, I
am not sure what behaviour will manifest.
I don't understand why one cannot cross-compile a library that makes
use of pthreads directly though? Was this weak function/type
simulation workaround needed for a bug in the past that has since been
Have we missed something obvious?
If this is something that simply isn't architecturally possible, it'd be great to have an explanation for that.
Otherwise, if this is a transition that the GnuPG team would be fine with, but hasn't had the time to prioritize, perhaps this could be marked as such here, and any interested parties could propose a simplification of the codebase for further review.