Discussion:
geda-gaf compile fails because of undefined "LC_ALL"
(too old to reply)
Kai-Martin Knaak
2014-09-04 18:42:53 UTC
Permalink
Raw Message
After the last monthly update to my debian/testing desktop, compile of
geda-gaf failed with errors. It complained about implicit declaration of
'setlocale' and undeclared 'LC_ALL'. I was able to compile successfully
with an include of <locale.h> in the affected files:
gattrib.c
gnetlist.c
gaf.c

I suspect, something changed slightly in the way *.h files are processed by
gcc. Should I prepare a patch for launchpad? Or would the correct fix be at
some other part of the code base?

---<)kaimartin(>---


PS: Here is the relevant section of the compiler output:

/-----------------------------------
$ make -j8
(...)
make[4]: Entering directory '/usr/local/src/geda/geda-gaf/gaf'
(...)
gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../libgeda/include -
I/usr/local/include -I../intl -I/include -Wall -pthread -I/usr/include/guile/2.0 -pthread -
I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -
I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -
I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -
I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -
I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -pthread -I/usr/include/gdk-pixbuf-2.0 -
I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -
I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/cairo -
I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -
I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/cairo -
I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -
I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/cairo -
I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -
I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng12 -MT gaf-shell.o -MD -MP -MF .deps/gaf-
shell.Tpo -c -o gaf-shell.o `test -f 'shell.c' || echo './'`shell.c
d=`LANG=C date -d 20140308 "+%B %-d, %Y"` ; \
v="1.9.1.20140308" ; \
sed -e"s:[@]DATE@:$d:" -e"s:[@]VERSION@:$v:" < gaf.1.in > gaf.1
rm -rf gaf.html.tmp && \
LC_NUMERIC=C groff -man -T html gaf.1 >gaf.html.tmp && \
mv -f gaf.html.tmp gaf.html
gaf.c: In function ‘main’:
gaf.c:109:3: warning: implicit declaration of function ‘setlocale’ [-Wimplicit-function-declaration]
setlocale (LC_ALL, "");
^
gaf.c:109:14: error: ‘LC_ALL’ undeclared (first use in this function)
setlocale (LC_ALL, "");
^
gaf.c:109:14: note: each undeclared identifier is reported only once for each function it appears in
Makefile:671: recipe for target 'gaf-gaf.o' failed
make[4]: *** [gaf-gaf.o] Error 1
make[4]: *** Waiting for unfinished jobs....
mv -f .deps/gaf-config.Tpo .deps/gaf-config.Po
mv -f .deps/gaf-shell.Tpo .deps/gaf-shell.Po
mv -f .deps/gaf-export.Tpo .deps/gaf-export.Po
make[4]: Leaving directory '/usr/local/src/geda/geda-gaf/gaf'
Makefile:803: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/usr/local/src/geda/geda-gaf/gaf'
Makefile:550: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/usr/local/src/geda/geda-gaf/gaf'
Makefile:567: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/geda/geda-gaf'
Makefile:496: recipe for target 'all' failed
make: *** [all] Error 2
\----------------------------------
--
Kai-Martin Knaak tel: +49-511-762-2895
Universität Hannover, Inst. für Quantenoptik fax: +49-511-762-2211
Welfengarten 1, 30167 Hannover http://www.iqo.uni-hannover.de
GPG key: http://pgp.mit.edu:11371/pks/lookup?search=Knaak+kmk&op=get
Edward Hennessy
2014-09-06 15:34:20 UTC
Permalink
Raw Message
Post by Kai-Martin Knaak
After the last monthly update to my debian/testing desktop, compile of
geda-gaf failed with errors. It complained about implicit declaration of
'setlocale' and undeclared 'LC_ALL'. I was able to compile successfully
gattrib.c
gnetlist.c
gaf.c
I suspect, something changed slightly in the way *.h files are processed by
gcc. Should I prepare a patch for launchpad? Or would the correct fix be at
some other part of the code base?
I believe the correct solution is to add the include directive.

Cheers,
Ed

Loading...