After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 321274 - Incorrect log2 definition/detection
Incorrect log2 definition/detection
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.6.x
Other Mac OS
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2005-11-11 23:10 UTC by Daniel Macks
Modified: 2005-11-13 08:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Macks 2005-11-11 23:10:47 UTC
Version details: 2.6.8
Distribution/Version: OS X 10.4.3 with XCode 2.2 compiler suite

A fink user reported the following compiler crash during 'make':

 gcc -DHAVE_CONFIG_H -I. -I. -I.. -DXTHREADS -D_REENTRANT -
DXUSE_MTSAFE_API -DXNO_MTSAFE_UNISTDAPI -DORBIT2=1 -I/sw/include/
glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/pango-1.0 -I/usr/
X11R6/include -I/usr/X11R6/include/freetype2 -I/sw/include/gtk-2.0 -I/
sw/include/atk-1.0 -I/sw/lib/gtk-2.0/include -I/sw/include/libart-2.0
-I/sw/include/libxml2 -I/sw/include -I/sw/include/libgnomecanvas-2.0 -
I/sw/include/libgnomeprint-2.2 -I/sw/include/libgnomeprintui-2.2 -I/
sw/include/libglade-2.0 -I/sw/include/orbit-2.0 -I/sw/include/bonobo-
activation-2.0 -I/sw/include/gnome-vfs-2.0 -I/sw/include/gnome-vfs-
module-2.0 -I/sw/lib/gnome-vfs-2.0/include -I/sw/include/gconf/2 -I/
sw/include/libbonobo-2.0 -I/sw/include/libgnome-2.0 -I/sw/include/
libbonoboui-2.0 -I/sw/include/libgnomeui-2.0 -DGTHUMB_MODULEDIR=\"/sw/
lib/gthumb/modules\" -DGTHUMB_GLADEDIR=\"/sw/share/gthumb/glade\" -no-
cpp-precomp -I/sw/include -O3 -funroll-loops -fstrict-aliasing -c
print-callbacks.c  -fno-common -DPIC -o .libs/print-callbacks.o
... long series of warnings, then:
print-callbacks.c: At top level:
print-callbacks.c:2020: error: static declaration of 'log2' follows
non-static declaration

and diagnosed that print-callbacks.c gets the declaration:
  extern double log2( double );
from <math.h> and noted that since log2 is not a macro, using "#ifndef log2" to
protect your local definition of log2 (line 2017) is not working (completely
removing that #ifndef ... #endif block allows compiling to complete normally).

A better arrangement would be to test for the presence of the log2 function
during ./configure and then use the ./configure result when determining whether
to declare log2 locally. For example, AC_CHECK_FUNCS(log2) and then #ifndef
HAVE_LOG2.
Comment 1 Paolo Bacchilega 2005-11-13 08:18:41 UTC
fixed in HEAD and in gthumb-2-6 branch