[buildd-tools-devel] Bug#549407: ivtools 1.2.6-1 FTBFS on sparc and powerpc

Agustin Martin agmartin at debian.org
Sun Dec 6 03:15:01 UTC 2009


2009/11/9 Agustin Martin <agmartin at debian.org>:

> Answering myself. No, it is not. I have prepared an sbuild+schroot setup in
> a i386 box, using lenny schroot and bleeding edge sbuild (HEAD from sbuild
> git repo, 355a4dffe742445713ea089436da077fc7a40ae8).
>
> I can reproduce the problem with that sbuild version in the i386 box.
>  However, I cannot reproduce it at all with pbuilder or with plain build in
> normal filesystem.
>
> ivtools uses imake to regenerate makefiles on each run. When the problem is
> reproduced, I noticed that the path set by imake is something (wrong) like
>
> .../buildd-ivtools_1.2.6-1+nmu2-1-2p04ki
>
> while the real path is something like
>
> .../buildd-ivtools_1.2.6-1+nmu2-powerpc-2p04ki

Good news. I finally found the reason for this problem. An explanation
was not that far. Quoting http://www.ivtools.org/ivtools/faq.html,

-----------------------
* The absolute pathname used by the "make depend" pass is not the same
as the ABSTOP pathname written to config/config.mk by the configure
script.

There is a vulnerability in the "make Makefiles" pass (the use of
imake), where absolute pathnames that incorporate predefined C symbols
get these symbols expanded to another value. For example, most
PC-based uses of gcc have i386 defined to 1, so a path like
/usr/src/i386/ivtools-1.0 gets expanded to /usr/src/1/ivtools-1.0. To
check the set of pre-defined symbols, enter this command: touch
test.c;gcc -dM -E test.c.

You can either rename the affected directory in which ivtools resides,
or you can add -U undefine arguments as necessary to the imake command
line. See the definition of ImakeFlags in config/site.def.NETBSD for
an example.
-----------------------

As I understand it, this problem should also be present in other
packages using imake.  Not sure if many packages still use imake, but
if so there is a problem with the temporary dir naming in sbuild.

However, this problem seems a bit nonsensic, so if only few packages
still use imake we can try working around this problem by making sure
imake is invoked with -U`dpkg --print-architecture`. I hope this has
no side effects.

I am attaching a patch with the current changes in my box. I can
successfully build ivtools with sbuild in this i386 box where I
previously could not.

It includes some other minor changes:
 - Revert the -j introduced in my last NMU.
 - Disable 015_Makefile_dontstrip.diff. Since imake rewrites Makefile,
   patches for it cannot be  reverted later if built in the same dir. This is
   now done in configure through config.mk.

Comments are more than welcome. If there are no objections I will set
the final version number and upload at some time in the middle of next
week.

Cheers,

-- 
Agustin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ivtools_1.2.6-1+nmu2__to__pre-nmu3.diff
Type: text/x-patch
Size: 6390 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20091206/7c86aba5/attachment-0001.bin>


More information about the Buildd-tools-devel mailing list