Bug#643341: [pkg-gnupg-maint] Bug#643341: Bug#643341: libgpg-error-dev: cross-compiling anything based on libgpg-error is painful

2018-10-18 Thread NIIBE Yutaka
Simon McVittie  wrote:
> The multiarch tuple used to form ${libdir} on Debian is not always
> identical to the GNU host.
[...]
> There's a Debian-specific option "gcc -print-multiarch" added by a
> Debian patch, although not all of our compilers have a similar patch
> (gcc does but clang doesn't).

I see.  Thanks for your teaching.  I realized that there are more detail
than I had expected.

Today, I updated the change [0] to allow CC as one of clang.  I'm going
to push this change, soon.

My intention is to show our support making gpg-error-config script
architecture independent on multiarch environment, to avoid having many
-gpg-error-config scripts.  I wish we will have co-installable
libgpg-error-dev:amd64 and libgpg-error-dev:i386 on Debian, and we won't
need any change for gpg-error.m4 (and updating it in several packages).


Now, I think that more changes (Debian specific) are better to be left
to Debian Maintainer of libgpg-error.

FYI, upstream discussion is here [1].


[0] https://dev.gnupg.org/D467
[1] https://dev.gnupg.org/T4085
-- 



Bug#643341: [pkg-gnupg-maint] Bug#643341: Bug#643341: libgpg-error-dev: cross-compiling anything based on libgpg-error is painful

2018-10-17 Thread Simon McVittie
On Wed, 17 Oct 2018 at 14:31:50 +0900, NIIBE Yutaka wrote:
> At configure time, if it detects libdir for multiarch, it lets
> gpg-error-config script architecture independent to dynamically define
> PKG_CONFIG_LIBDIR (by CC or gcc -dumpmachine).

The multiarch tuple used to form ${libdir} on Debian is not always
identical to the GNU host. On some architectures (mainly i386 and the
32-bit ARM family) it's a normalized form of the GNU host, using the
oldest or most generic compatible CPU: for instance Debian i386:

% dpkg-architecture -ai386 -qDEB_HOST_MULTIARCH
i386-linux-gnu

# in current Debian/Ubuntu (older Debian used i486, i586 here)
# same as gcc -dumpmachine
% dpkg-architecture -ai386 -qDEB_HOST_GNU_TYPE
i686-linux-gnu

and similarly the multiarch tuple for 32-bit ARM is something like
arm-linux-gnueabi, not armv5tel-linux-gnueabi.

There's a Debian-specific option "gcc -print-multiarch" added by a
Debian patch, although not all of our compilers have a similar patch
(gcc does but clang doesn't).

I think it would probably be better for Debian to patch
src/gpg-error-config-new.in in our version of gpg-error, rather than
trying to solve this generically upstream, because we can make a lot
more assumptions about install paths than you can.

smcv



Bug#643341: [pkg-gnupg-maint] Bug#643341: Bug#643341: libgpg-error-dev: cross-compiling anything based on libgpg-error is painful

2018-10-16 Thread NIIBE Yutaka
Hello, again,

Simon McVittie  wrote:
> For Debian, I wonder whether we might be able to patch the script to
> remove this part, which looks like the only architecture variation:
>
> prefix=@prefix@
> exec_prefix=@exec_prefix@
> libdir=${PKG_CONFIG_LIBDIR:-@libdir@}
> PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}${libdir}/pkgconfig"

How about a change like this?

https://dev.gnupg.org/D467

At configure time, if it detects libdir for multiarch, it lets
gpg-error-config script architecture independent to dynamically define
PKG_CONFIG_LIBDIR (by CC or gcc -dumpmachine).

With this, we don't need to have -gpg-error-config.
-- 



Bug#643341: [pkg-gnupg-maint] Bug#643341: Bug#643341: libgpg-error-dev: cross-compiling anything based on libgpg-error is painful

2018-10-16 Thread Werner Koch
On Tue, 16 Oct 2018 09:51, s...@debian.org said:

> However, none of this solves co-installability in Debian:
> libgpg-error-dev:amd64 and libgpg-error-dev:armhf can't be
> installed at the same time, because they have different content in
> /usr/bin/gpg-error-config, and that will be a problem for as long as

/usr/bin/gpg-error-config should only be used for native building.  For
cross-building it is expected that a dedicated gpg-error-config script
is installed in the root directory of the host platform (e.g. as
/usr/i686-w64-mingw32/bin/gpg-error-config) and only that
gpg-error-config should ever be considered.  In past this required
manual configuration but meanwhile SYSROOT seems to be an accepted
standard and we can make use of it.  This means to only look there for
the config script to get the right version and not take whatever we find
and only print a warning if the platform is wrong.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


pgp3e0bdhz6hy.pgp
Description: PGP signature