Re: Problems compiling gpsd 2.37 on Fedora 7 x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/3/19 Douglas E. Warner <silfreed@xxxxxxxxxxxx>:
> It looks like I'm having some type of macro definition problem.  I'm not
>  having much luck getting this debugged upstream.  The error I'm getting is:
>
>  gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DDBUS_API_SUBJECT_TO_CHANGE=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE -MT
>  libgpsd_core.lo -MD -MP -MF .deps/libgpsd_core.Tpo -c
>  libgpsd_core.c  -fPIC -DPIC -o .libs/libgpsd_core.o
>  libgpsd_core.c: In function 'gpsd_transit_fix_dump':
>  libgpsd_core.c:419: warning: implicit declaration of function 'ZEROIZE'
>  libgpsd_core.c:419: warning: format '%.4f' expects type 'double', but argument
>  14 has type 'int'
>  libgpsd_core.c:419: warning: format '%.3f' expects type 'double', but argument
>  15 has type 'int'
>  ...
>  ./.libs/libgps.so: undefined reference to `ZEROIZE'
>
>  Here's the pastebin of the full log:
>  http://pastebin.com/mbcc3874
>
>  A suggestion I received from one of the devs was to replace the '-c' with '-E'
>  and redirect that to a different file, here's the pastebin of that:
>  http://pastebin.com/m68ab8009
>
>  Any ideas what might be going on here?

This is what happens when a macro is defined inside a macro
invocation.  The "snprintf" function is actually a macro, and the gpsd
code is trying to define a new macro, ZEROIZE, right in the middle of
the parameter list.  The expansion of the snprintf macro happens
before ZEROIZE gets defined, so the final expansion still has the
ZEROIZE tokens in it.  This is an upstream bug.  They've got to move
the ZEROIZE definition to before the snprintf call.

I know this because I made the same mistake in the XEmacs code. :-)
-- 
Jerry James
http://loganjerry.googlepages.com/

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux