Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196041 - sys-apps/texinfo-4.11 doesn't cross-compile (make dependency problem and mbstate_t undeclared)
Summary: sys-apps/texinfo-4.11 doesn't cross-compile (make dependency problem and mbst...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: MIPS Linux
: High normal with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-16 14:03 UTC by Joel Martin (RETIRED)
Modified: 2009-02-24 08:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Martin (RETIRED) gentoo-dev 2007-10-16 14:03:36 UTC
The new texinfo-4.11 fails to cross-compile (x86_64 -> mips64el-gentoo-linux-gnu)

The first problem is that there is some sort of dependency breakage when cross-compiling that results in this error:
make[5]: *** No rule to make target `../gnulib/lib/libgnu.a', needed by `makedoc'.  Stop.


If I add `emake -C gnulib/lib` prior to the main emake call then I get this error:
mbswidth.c: In function 'mbsnwidth':
mbswidth.c:103: error: 'mbstate_t' undeclared (first use in this function)
mbswidth.c:103: error: (Each undeclared identifier is reported only once
mbswidth.c:103: error: for each function it appears in.)
mbswidth.c:103: error: expected ';' before 'mbstate'
mbswidth.c:104: error: 'mbstate' undeclared (first use in this function)
make[2]: *** [mbswidth.o] Error 1
make[2]: *** Waiting for unfinished jobs....


Interestingly I see a similar issue with cross-compiling the new tar-1.19:
In file included from mbscasecmp.c:29:
mbuiter.h:113: error: expected specifier-qualifier-list before 'mbstate_t'
mbuiter.h: In function 'mbuiter_multi_next':
...

texinfo 4.8 and tar-1.18 cross-compile fine.

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-16 14:06:24 UTC
One issue = one bug please.
Comment 2 Joel Martin (RETIRED) gentoo-dev 2007-10-16 15:04:22 UTC
I mentioned the tar issue because the problem may represent a more global interface change happening across multiple GNU packages.
Comment 3 Ryan Tandy 2008-04-07 21:30:57 UTC
The problem seems to occur in any package using gnulib - these two, as well as findutils and coreutils, fail for me with the same mbstate_t error (which, incidentally, results from some bizarre include sequence in which stdio.h and wchar.h occur a particular number of times in a particular order).  The problem seems to be triggered by configure: when cross compiling a number of checks are bypassed and simply forced to assumed values, at least some of which are apparently incorrect.  I've been able to get some things to compile by forcing the checks to return the same values as they do when compiling natively, but that's by no means an acceptable solution.

WRT comment #1 I'd suggest either renaming this bug or creating a new one to track the general gnulib cross-compilation problem.
Comment 4 Paul Davis 2008-06-30 11:53:50 UTC
Similarly, it appears that this bug is like https://bugs.gentoo.org/show_bug.cgi?id=226039, and therefore has a similar work around as https://bugs.gentoo.org/attachment.cgi?id=156473&action=view alas.
Comment 5 Nigel 2008-09-22 13:00:03 UTC
This works for me (i686 -> armv4tl-softfloat-linux-gnueabi)

--- /usr/portage/sys-apps/texinfo/texinfo-4.11-r1.ebuild	2008-04-19 17:07:04.000000000 +1000
+++ ./texinfo-4.11-r1.ebuild	2008-09-22 22:46:59.000000000 +1000
@@ -37,6 +37,9 @@
 src_compile() {
 	use static && append-ldflags -static
 	econf $(use_enable nls) || die
+	if tc-is-cross-compiler; then
+		emake -C tools/gnulib/lib || die "emake -C tools/gnulib/lib"
+	fi
 	emake || die "emake"
 }
Comment 6 Marat Radchenko 2008-10-16 11:45:35 UTC
also affects texinfo-4.12
Comment 7 Marat Radchenko 2008-10-17 07:46:50 UTC
Both build ok with patch from comment #5.
Comment 8 Joshua Kinard gentoo-dev 2009-02-24 08:58:26 UTC
Fixed in 4.13.  That looks to be what arches will target for stabilization, so not going to worry about 4.12 or earlier.