Debian Bug report logs - #618488
incorrect value for libIDL_cv_long_long_format in /etc/dpkg-cross/cross-config.cache

version graph

Package: dpkg-cross; Maintainer for dpkg-cross is Debian Embedded Group <debian-embedded@lists.debian.org>; Source for dpkg-cross is src:dpkg-cross.

Reported by: Wookey <wookey@wookware.org>

Date: Tue, 15 Mar 2011 16:03:02 UTC

Severity: normal

Found in version dpkg-cross/2.5.8

Fixed in version dpkg-cross/2.6.3

Done: Neil Williams <codehelp@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#618488; Package dpkg-cross. (Tue, 15 Mar 2011 16:03:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@wookware.org>:
New Bug report received and forwarded. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. (Tue, 15 Mar 2011 16:03:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: submit@bugs.debian.org
Subject: incorrect value for libIDL_cv_long_long_format in /etc/dpkg-cross/cross-config.cache
Date: Tue, 15 Mar 2011 16:02:01 +0000
Package: dpkg-cross
Version: 2.5.8
Severity: normal

This bug corresponds to
https://bugs.launchpad.net/ubuntu/+source/dpkg-cross/+bug/659805
in Ubuntu.

Somewhere along the line the value of the 
libIDL_cv_long_long_format configure value has changed (or the
original in dpkg-cross was never right).

The correct value is 'll' not '%llu'. The percent and the u are now
provided elsewhere, as can be seen from the configure.in snippet:
AC_CACHE_VAL(libIDL_cv_long_long_format,[
    for format in ll q I64; do
        AC_TRY_RUN([#include <stdio.h>
            #include <stdlib.h>
            int main()
            {
                long long b, a = -0x3AFAFAFAFAFAFAFALL;
                char buffer[1000];
                sprintf (buffer, "%${format}u", a);
                sscanf (buffer, "%${format}u", &b);
                exit (b!=a);
            }
            ],
            libIDL_cv_long_long_format=${format}
            break)



Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#618488; Package dpkg-cross. (Tue, 15 Mar 2011 16:27:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@wookware.org>:
Extra info received and forwarded to list. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. (Tue, 15 Mar 2011 16:27:08 GMT) Full text and rfc822 format available.

Message #10 received at 618488@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: 618488@bugs.debian.org
Subject: Re: Bug#618488: Acknowledgement (incorrect value for libIDL_cv_long_long_format in /etc/dpkg-cross/cross-config.cache )
Date: Tue, 15 Mar 2011 16:22:46 +0000
+++ Debian Bug Tracking System [2011-03-15 16:03 +0000]:

forgot the patch:

diff -ur dpkg-cross-2.5.8ubuntu2/config/cross-config.cache dpkg-cross-2.5.8ubun$
--- dpkg-cross-2.5.8ubuntu2/config/cross-config.cache   2010-05-23 16:34:11.000$
+++ dpkg-cross-2.5.8ubuntu2-libidlfix/config/cross-config.cache 2011-03-15 15:3$
@@ -113,7 +113,7 @@

 # libidl
 if [ "$PACKAGE" = "libidl" -o "$PACKAGE_NAME" = "libIDL" ]; then
-libIDL_cv_long_long_format=%llu
+libIDL_cv_long_long_format=ll
 fi

 # libopenobex does not support PACKAGE_NAME or PACKAGE




Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#618488; Package dpkg-cross. (Wed, 16 Mar 2011 01:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@wookware.org>:
Extra info received and forwarded to list. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. (Wed, 16 Mar 2011 01:33:03 GMT) Full text and rfc822 format available.

Message #15 received at 618488@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: Neil Williams <codehelp@debian.org>
Cc: 618488@bugs.debian.org
Subject: Re: dpkg-cross libidl fix
Date: Wed, 16 Mar 2011 01:31:14 +0000
+++ Neil Williams [2011-03-15 22:29 +0000]:
> On Tue, 15 Mar 2011 15:29:44 +0000
> Wookey <wookey@wookware.org> wrote:
> 
> 
> > I just checked and that is now right.
> 
> But will then break for anyone building older versions of the package.

Indeed, but dpkg-cross is normally going to be used to build the
version in the distro. I don't know when this changed, but the new
answr is likely more useful than the old one for sensible situations. 

> > i.e the % and the u are now not part of libIDL_cv_long_long_format
> > 
> > can you fix that upstream? I'll fix it in the ubuntu version.
> 
> The change may need to have a version check sorted out somewhere around:
> if [ "$PACKAGE" = "libidl" -o "$PACKAGE_NAME" = "libIDL" ]; then

I wondered if we could supply values for different versions. That
would indeed be more correct (except that I have no idea what cutoff
version to use). 

> In other words, it's about time that this change and all the others
> like it, get pushed upstream and handled properly.

How would this be handled upstream? For a configure-time compiled test
which needs to be run on the host arch dpkg-cross cached supply of the
answers is correct is it not?

> The value we do have is probably only usable for ARM anyway.

I did wonder about that. It's the same on amd64 so 'll' may be quite
widespread. The other options or 'i' and 'I64' which may well only
apply on strange systems with funny C-libraries.


Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#618488; Package dpkg-cross. (Wed, 16 Mar 2011 09:51:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. (Wed, 16 Mar 2011 09:51:10 GMT) Full text and rfc822 format available.

Message #20 received at 618488@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: Wookey <wookey@wookware.org>
Cc: 618488@bugs.debian.org
Subject: Re: dpkg-cross libidl fix
Date: Wed, 16 Mar 2011 09:48:30 +0000
[Message part 1 (text/plain, inline)]
On Wed, 16 Mar 2011 01:31:14 +0000
Wookey <wookey@wookware.org> wrote:

> +++ Neil Williams [2011-03-15 22:29 +0000]:
> > > i.e the % and the u are now not part of libIDL_cv_long_long_format
> > > 
> > > can you fix that upstream? I'll fix it in the ubuntu version.
> > 
> > The change may need to have a version check sorted out somewhere around:
> > if [ "$PACKAGE" = "libidl" -o "$PACKAGE_NAME" = "libIDL" ]; then
> 
> I wondered if we could supply values for different versions. That
> would indeed be more correct (except that I have no idea what cutoff
> version to use). 

:-(

Upstream would know and their VCS will reveal where the value is
expanded and hence when the code changed.
 
> > In other words, it's about time that this change and all the others
> > like it, get pushed upstream and handled properly.
> 
> How would this be handled upstream? For a configure-time compiled test
> which needs to be run on the host arch dpkg-cross cached supply of the
> answers is correct is it not?

Upstream need to change their m4 support to explicitly handle
cross-compiling just like glib do - when cross-compiling, the m4 macros
fall back to a set of values which upstream determine based on the
$host_alias value. Yes, the m4 can produce a warning and moan about
cross-compiling being unsupported or whatever, just as glib does, but
upstream have a FAR better understanding of what this value should be
and they are the only ones who can ensure that it remains in sync with
the rest of their code.

dpkg-cross caches are/were *never* the right long term answer - except
where the value is absolutely identical across all packages on the
relevant architecture (so endianness etc.). Caches need to be
expendable, caches need to be temporary and I already regret adding
this support to dpkg-cross in the first place. I see no reason for this
to survive when dpkg-cross finally merges into the Multi-Arch dpkg. The
genuinely architecture-specific config files can merge, the cache
cannot.

The other choice for upstream is that they change to using #ifdef and
other mechanisms in the compile-time code itself, exactly as glib does
- or, indeed, change to using glib as a dependency and get this
information via glib macros.
 
> > The value we do have is probably only usable for ARM anyway.
> 
> I did wonder about that. It's the same on amd64 so 'll' may be quite
> widespread. The other options or 'i' and 'I64' which may well only
> apply on strange systems with funny C-libraries.

All the more reason for this to be handled upstream in a series of
#ifdef sections or by using a library which uses such sections to expose
a macro which does the work for them.

There are ways to do this, the libidl upstream just need to be told
that the current system was never usable, never properly supported and
only ever worked due to a series of horrible hacks like dpkg-cross -
hacks which are going way quite soon now.

This specific test is a solved problem. Numerous libraries already
implement precisely this kind of support and do it in ways that do not
rely on executing a compiled test during the ./configure. libidl needs
to do the same.

I think this bug should be cloned and the clone re-assigned to libidl
with a view to getting it forwarded upstream. Then I can remove the
libidl support and possibly the entire cache support from dpkg-cross
(closing this bug in the process) so that it is easier to convince the
dpkg maintainers to take the configs which we DO need in dpkg - the
actual arch-specific ones, not the package-specific ones which,
frankly, I added in error during the development of Crush.

cross-config.cache is my fault, it's my error and dpkg-cross should
move away from providing it. It cannot survive Multi-Arch.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#618488; Package dpkg-cross. (Mon, 21 Mar 2011 21:21:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@wookware.org>:
Extra info received and forwarded to list. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. (Mon, 21 Mar 2011 21:21:05 GMT) Full text and rfc822 format available.

Message #25 received at 618488@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: Neil Williams <codehelp@debian.org>
Cc: 618488@bugs.debian.org, orbit-list@gnome.org
Subject: Re: dpkg-cross libidl fix
Date: Mon, 21 Mar 2011 21:18:24 +0000
+++ Neil Williams [2011-03-16 09:48 +0000]:

This mail copied to orbit-list as place to ask libIDL development
questions.

It currently doesn't cross-build without an autoconf value for
libIDL_cv_long_long_format being supplied. I'd like to agree on a way
to have the upstream configurey DTRT when cross-building, or at least
make a good guess, and not just bail saying "can't".

Further discussion in debian bugrep:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618488

> On Wed, 16 Mar 2011 01:31:14 +0000
> Wookey <wookey@wookware.org> wrote:
> 
> > +++ Neil Williams [2011-03-15 22:29 +0000]:
> > > > i.e the % and the u are now not part of libIDL_cv_long_long_format
> > > > 
> > > > can you fix that upstream? I'll fix it in the ubuntu version.
> > > 
> > > The change may need to have a version check sorted out somewhere around:
> > > if [ "$PACKAGE" = "libidl" -o "$PACKAGE_NAME" = "libIDL" ]; then
> > 
> > I wondered if we could supply values for different versions. That
> > would indeed be more correct (except that I have no idea what cutoff
> > version to use). 

OK. I just checked and '%llu' has _always_ been wrong.
libIDL_cv_long_long_format was introduced in libidl 0.8.1 in 2003 and
has always been of the form
AC_MSG_RESULT(%${libIDL_cv_long_long_format}u)

So there is no need for a version check and dpkg-cross should at least
set this value correctly if it's setting it at all. 

> Upstream need to change their m4 support to explicitly handle
> cross-compiling just like glib do - when cross-compiling, the m4 macros
> fall back to a set of values which upstream determine based on the
> $host_alias value. Yes, the m4 can produce a warning and moan about
> cross-compiling being unsupported or whatever, just as glib does, but
> upstream have a FAR better understanding of what this value should be
> and they are the only ones who can ensure that it remains in sync with
> the rest of their code.

Hmm, but glib2.0 has almost the exact same .m4 stuff for this test.
It's just surrounded by a 'if we know this is windows native then
don't bother running the test set it to I64'. For linux it looks like
it should do exactly the same as libIDL. However dpkg-cross does not
have glib_cv_long_long_format defined and glib2.0 ./configure just
sets it to 'none', rather than bailing, so something different is
happening. I dont think 'none' is actually a very good answer though,
and glib falls over a couple of tests later with 
"checking for growing stack pointer... configure: error: in
/home/wookey/debian/squeeze/build/glib2.0-2.28.2/debian/build/deb':
configure: error: cannot run test program while cross compiling
"
so it's not realy doing any better than libIDL here. 

The two ./configure files are somewhat different. I assume that's down
to autoconf generating them differently as the input is extremely
similar.


> dpkg-cross caches are/were *never* the right long term answer - except
> where the value is absolutely identical across all packages on the
> relevant architecture (so endianness etc.). 

In this case 'll' is always the right answer on Linux. I64 is there
for Windows support. I don't know when 'q' might be right.

I think the question here boils down to "when cross compiling who
should be responsible for guessing this value". 

It seems to me that this 'll' is actually a system value and supplying
it in some kind of debian system cache file makes sense, rather than
implementing defaults in every app that used it. The problem there is
that every app uses it under a different name

libIDL_cv_long_long_format 
glib_cv_long_long_format
are exactly the same thing.



> Caches need to be
> expendable, caches need to be temporary and I already regret adding
> this support to dpkg-cross in the first place. I see no reason for this
> to survive when dpkg-cross finally merges into the Multi-Arch dpkg. The
> genuinely architecture-specific config files can merge, the cache
> cannot.

It's a genuinely useful facility as a mechanism to fix code which
doesn't cross-build properly yet. We are nowhere near being able to
get rid of it yet. I quite agree that these things should be pushed
upstream as much as possible for reasons of maintainability and
remaining synchronised.

> The other choice for upstream is that they change to using #ifdef and
> other mechanisms in the compile-time code itself, exactly as glib does
> - or, indeed, change to using glib as a dependency and get this
> information via glib macros.

I'll leave it to upstream to comment on what would be the most
appropriate mechanism for setting this. 

> > > The value we do have is probably only usable for ARM anyway.

Nope. We have the 'linux', or more accurately 'glibc' value. 

> This specific test is a solved problem. Numerous libraries already
> implement precisely this kind of support and do it in ways that do not
> rely on executing a compiled test during the ./configure. libidl needs
> to do the same.

Do you have any examples of this we can point them at. This is a
2003-vintage test so there is indeed likely to be a 'better way' by
now. 

> I think this bug should be cloned and the clone re-assigned to libidl
> with a view to getting it forwarded upstream. 

I shall certainly clone it. I'm not sure it's clear what the best
solution is yet. 

> Then I can remove the
> libidl support and possibly the entire cache support from dpkg-cross
> (closing this bug in the process) so that it is easier to convince the
> dpkg maintainers to take the configs which we DO need in dpkg - the
> actual arch-specific ones, not the package-specific ones which,
> frankly, I added in error during the development of Crush.

The cache support will need to stay until we've upstreamed all 29
packages currently catered for using this mechanism.

> cross-config.cache is my fault, it's my error and dpkg-cross should
> move away from providing it. It cannot survive Multi-Arch.

I don't agree with that assessment, but this bug report isn't the
place to argue about it. We'll just deal with the libIDL issue here.


Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/




Added tag(s) pending. Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Sat, 26 Mar 2011 13:51:03 GMT) Full text and rfc822 format available.

Reply sent to Neil Williams <codehelp@debian.org>:
You have taken responsibility. (Sat, 02 Apr 2011 13:36:09 GMT) Full text and rfc822 format available.

Notification sent to Wookey <wookey@wookware.org>:
Bug acknowledged by developer. (Sat, 02 Apr 2011 13:36:09 GMT) Full text and rfc822 format available.

Message #32 received at 618488-close@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 618488-close@bugs.debian.org
Subject: Bug#618488: fixed in dpkg-cross 2.6.3
Date: Sat, 02 Apr 2011 13:32:18 +0000
Source: dpkg-cross
Source-Version: 2.6.3

We believe that the bug you reported is fixed in the latest version of
dpkg-cross, which is due to be installed in the Debian FTP archive:

dpkg-cross_2.6.3.dsc
  to main/d/dpkg-cross/dpkg-cross_2.6.3.dsc
dpkg-cross_2.6.3.tar.gz
  to main/d/dpkg-cross/dpkg-cross_2.6.3.tar.gz
dpkg-cross_2.6.3_all.deb
  to main/d/dpkg-cross/dpkg-cross_2.6.3_all.deb
libdebian-dpkgcross-perl_2.6.3_all.deb
  to main/d/dpkg-cross/libdebian-dpkgcross-perl_2.6.3_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 618488@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Neil Williams <codehelp@debian.org> (supplier of updated dpkg-cross package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 01 Apr 2011 19:54:09 +0100
Source: dpkg-cross
Binary: dpkg-cross libdebian-dpkgcross-perl
Architecture: source all
Version: 2.6.3
Distribution: unstable
Urgency: low
Maintainer: Debian Embedded Group <debian-embedded@lists.debian.org>
Changed-By: Neil Williams <codehelp@debian.org>
Description: 
 dpkg-cross - tools for cross compiling Debian packages
 libdebian-dpkgcross-perl - functions to aid cross-compiling Debian packages
Closes: 618488 618490 619400
Changes: 
 dpkg-cross (2.6.3) unstable; urgency=low
 .
   [ Neil Williams ]
   * Drop old apt-cross multiarch behaviour - outdated.
 .
   [ Wookey ]
   * Add (interim) --convert-multiarch behaviour to cross even
     multiarch packages (Closes: #619400)
   * Drop X11R6 lib/include dirs as they are no longer present
 .
   [ Neil Williams ]
   * Drop unsupported variables from config file
   * Correct the value for libIDL_cv_long_long_format in /etc/dpkg-
     cross/cross-config.cache. (Closes: #618488)
   * Add tclconfig.sh to the list of interesting files for
     cross-building. (Closes: #618490)
   * Fix some unitialised variables in rarely used -Q option dpkg-cross
   * Fix handling of arch-dependent include headers under multi-arch only
     support.
Checksums-Sha1: 
 71f3be23798c7adda09762cab5dbfcc27eb9ee4b 1209 dpkg-cross_2.6.3.dsc
 ebb38972a7804d2a835840ce1afba1689b56be98 75766 dpkg-cross_2.6.3.tar.gz
 c5c8a1e8bd28cec8aa0e36f22b938595d3b50e4a 53116 dpkg-cross_2.6.3_all.deb
 954dd8f37d8c5e86abe2cd820ab1f4ca63502079 28976 libdebian-dpkgcross-perl_2.6.3_all.deb
Checksums-Sha256: 
 d512982fe4109d8f2d1625f185ad434f679cd6d62543c70c2bae5fc66ad84dad 1209 dpkg-cross_2.6.3.dsc
 72694dbd761ac0cce64c00a2cfe3a720f34060450b86303739dcea253f3f21f6 75766 dpkg-cross_2.6.3.tar.gz
 6f8a62ffeba1569abfa797fde759bac9472c3be48766e375af61c085795bc25f 53116 dpkg-cross_2.6.3_all.deb
 5cdc2e627cfc0f94287237ce21ca89573899cf80260e61193d06be1d7d393e57 28976 libdebian-dpkgcross-perl_2.6.3_all.deb
Files: 
 47e9efeeaa780d70892d71e99758a645 1209 utils extra dpkg-cross_2.6.3.dsc
 97f6c922f09f10086a38ba8ff6967af0 75766 utils extra dpkg-cross_2.6.3.tar.gz
 4a0aed4bfaa9f969ae9c7ca5a5fe0197 53116 utils extra dpkg-cross_2.6.3_all.deb
 5cc039f8e0c2aa5e4dce61cc10cfbd76 28976 perl extra libdebian-dpkgcross-perl_2.6.3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk2XIcwACgkQiAEJSii8s+O4DQCeOVq1d8mtyU95bWtaiRK7Ar+9
AtYAn2YCxwqPAYZqrz0VWXwtyVwGHXpW
=Vip2
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 11 May 2011 07:40:39 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 13:50:32 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.