Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250495 - media-video/guvcview fails to build due to a locale error
Summary: media-video/guvcview fails to build due to a locale error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Samuli Suominen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-10 09:38 UTC by Ivan
Modified: 2008-12-10 11:52 UTC (History)
0 users

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


Attachments
#include <locale.h> (guvcview-src-0.9.6-implicit_declaration_setlocale.patch,423 bytes, patch)
2008-12-10 10:20 UTC, Samuli Suominen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan 2008-12-10 09:38:42 UTC
When trying to build the new guvcview package, the following error arose:

guvcview.c: In function 'main':
guvcview.c:170: warning: implicit declaration of function 'setlocale'
guvcview.c:170: error: 'LC_ALL' undeclared (first use in this function)
guvcview.c:170: error: (Each undeclared identifier is reported only once
guvcview.c:170: error: for each function it appears in.)

However, I do indeed have LC_ALL set:

# locale
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=en_AU.UTF-8
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2008-12-10 10:09:30 UTC
emerge --info,

the implicit declaration refers to a missing #include <locale.h> in guvcview.c but why in the *eck I didn't get this when building? that's why I want to see your emerge --info.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2008-12-10 10:15:38 UTC
I see, I don't have LC_ALL set which might have prevented me from hitting this bug.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2008-12-10 10:20:56 UTC
Created attachment 174837 [details, diff]
#include <locale.h>

Try this and report back.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2008-12-10 10:22:12 UTC
Add "inherit eutils" to the ebuild, and

src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${P}-implicit_declaration_setlocale.patch
}

To apply the patch.
Comment 5 Ivan 2008-12-10 10:29:43 UTC
After removing the "-src" from the patch filename, it worked!

Thanks Samuli
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2008-12-10 11:52:01 UTC
(In reply to comment #5)
> After removing the "-src" from the patch filename, it worked!
> 
> Thanks Samuli
> 

yeah that was a typing error from my part, sorry about it....

+  10 Dec 2008; <ssuominen@gentoo.org>
+  +files/guvcview-0.9.6-implicit_declaration_setlocale.patch,
+  guvcview-0.9.6.ebuild:
+  Add include for locale.h to get setlocale wrt #250495, thanks to Ivan
+  Miljenovic.

added in portage now, thanks for testing