Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 206302 - [PATCH] dev-libs/newt-0.52.7 fails to compile with uclibc due to missing libintl.h
Summary: [PATCH] dev-libs/newt-0.52.7 fails to compile with uclibc due to missing libi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on: 206088
Blocks:
  Show dependency tree
 
Reported: 2008-01-17 08:43 UTC by Natanael Copa
Modified: 2008-03-19 16:18 UTC (History)
1 user (show)

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


Attachments
newt-0.52.7-nonls.patch (newt-0.52.7-nonls.patch,996 bytes, patch)
2008-01-17 08:45 UTC, Natanael Copa
Details | Diff
newt-0.52.7-nonls.patch (newt-0.52.7-nonls.patch,1.39 KB, patch)
2008-01-17 11:02 UTC, Natanael Copa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2008-01-17 08:43:35 UTC
i386-gentoo-linux-uclibc-gcc -march=i386 -Os -pipe -fomit-frame-pointer -D_GNU_SOURCE -I/usr/include/slang    -c -o test.o test.c
i386-gentoo-linux-uclibc-gcc -march=i386 -Os -pipe -fomit-frame-pointer -D_GNU_SOURCE -I/usr/include/slang    -c -o newt.o newt.c
i386-gentoo-linux-uclibc-gcc -march=i386 -Os -pipe -fomit-frame-pointer -D_GNU_SOURCE -I/usr/include/slang    -c -o button.o button.c
In file included from whiptail.c:12:
nls.h:9:22: libintl.h: No such file or directory
In file included from dialogboxes.c:12:
nls.h:9:22: libintl.h: No such file or directory
i386-gentoo-linux-uclibc-gcc -march=i386 -Os -pipe -fomit-frame-pointer -D_GNU_SOURCE -I/usr/include/slang    -c -o form.o form.c
i386-gentoo-linux-uclibc-gcc -march=i386 -Os -pipe -fomit-frame-pointer -D_GNU_SOURCE -I/usr/include/slang    -c -o checkbox.o checkbox.c
make: *** [depend] Error 1
make: *** Waiting for unfinished jobs....

NOTE: patches from #206088 needs to be applied first to be able to reproduce.
Comment 1 Natanael Copa 2008-01-17 08:45:39 UTC
Created attachment 141111 [details, diff]
newt-0.52.7-nonls.patch

Attatched patch fixes the problem.

...
IUSE="gpm nls tcl"
...
use nls || epatch "${FILESDIR}"/${P}-nonls.patch
Comment 2 SpanKY gentoo-dev 2008-01-17 09:22:39 UTC
there's no need to hack it out like that ... if it doesnt already have a standard --disable-nls option to key off of, add one and wrap the header logic in that
Comment 3 Natanael Copa 2008-01-17 09:45:28 UTC
(In reply to comment #2)
> there's no need to hack it out like that ... if it doesnt already have a
> standard --disable-nls option to key off of, add one and wrap the header logic
> in that
> 

It does not have a standard --disable-nls option. Adding it would require gettext.m4 which is provided in gettext which is masked on uclibc.

If upstream would do that for next release problem would be solved. There was no easy way to find out how to report things upstream (HOMEPAGE points to a major Linux distribution/vendor rather than a project page for newt)

I went for the quick and dirty solution and moved on.
Comment 4 Natanael Copa 2008-01-17 10:15:00 UTC
Got contact with upstream developer, mlichvar at redhat.

Package uses autoconf but not automake so AM_GNU_GETTEXT will not work.
Comment 5 SpanKY gentoo-dev 2008-01-17 10:21:13 UTC
sorry, when i said "standard" i was merely referring to the user interface for building the package

so you'd do AC_ARG_ENABLE(....nls..........) and handle the enable/disable stuff yourself rather than relying on adding gettext cruft

does that make sense ?
Comment 6 Natanael Copa 2008-01-17 10:32:00 UTC
(In reply to comment #5)
> sorry, when i said "standard" i was merely referring to the user interface for
> building the package
> 
> so you'd do AC_ARG_ENABLE(....nls..........) and handle the enable/disable
> stuff yourself rather than relying on adding gettext cruft
> 
> does that make sense ?
> 

yes. thanks!
Comment 7 Natanael Copa 2008-01-17 11:02:12 UTC
Created attachment 141126 [details, diff]
newt-0.52.7-nonls.patch

adds a standard --disable-nls option to the configure script. tested on uclibc x86 (without nls) and glibc amd64 (with nls).

patch is submitted to upstream maintainer.
Comment 8 SpanKY gentoo-dev 2008-01-17 15:45:02 UTC
usually people macro away all functions when !NLS:
# define setlocale(category,locale
# define bindtextdomain(domainname, dirname)
....

that way people dont need to sprinkle #ifdef checks throughout their code

you should use AC_HELP_STRING([--disable-nls],[compile without NLS support])

otherwise i think this looks good and can be submitted upstream to see how they feel about it
Comment 9 Natanael Copa 2008-01-18 07:14:12 UTC
(In reply to comment #8)
> usually people macro away all functions when !NLS:
> # define setlocale(category,locale
> # define bindtextdomain(domainname, dirname)
> ....
> 
> that way people dont need to sprinkle #ifdef checks throughout their code

Thanks for the tip! Will do this next time.

> 
> you should use AC_HELP_STRING([--disable-nls],[compile without NLS support])

Don't think this is needed. It is already listed under "Optional Features" help text.

> 
> otherwise i think this looks good and can be submitted upstream to see how they
> feel about it
> 

I already submitted upstream and he said he would apply it to his CVS.

Thanks!
Comment 10 SpanKY gentoo-dev 2008-01-18 10:57:38 UTC
i'm not saying AC_HELP_STRING() will make any practical difference at all ... i'm saying that is the correct way for generating help strings in autotools rather than padding it with whitespace yourself
Comment 11 Natanael Copa 2008-01-24 10:36:34 UTC
The patch is included in newt-0.52.8.
http://koji.fedoraproject.org/koji/buildinfo?buildID=32661
Comment 12 Natanael Copa 2008-03-17 12:51:56 UTC
Could we either bump to 0.52.8 or commit this patch? Would be nice to close this bug.

Thanks!
Comment 13 Christian Zoffoli (RETIRED) gentoo-dev 2008-03-19 16:18:30 UTC
0.52.8 in cvs