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 508435 - Compile failure due to local round() function
Compile failure due to local round() function
Status: RESOLVED FIXED
Product: dasher
Classification: Applications
Component: core
4.6.x
Other Mac OS
: Normal normal
: ---
Assigned To: Phil Cowans
Phil Cowans
Depends on:
Blocks:
 
 
Reported: 2008-01-10 06:09 UTC by Daniel Macks
Modified: 2013-02-01 19:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Macks 2008-01-10 06:09:04 UTC
A fink user has reported that while compiling dasher-4.6.1 on OS X 10.4 (gcc 4.0.1), the final linking of the dasher binary fails with:

/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: multiple definitions of symbol _round
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libpthread.dylib (rndint.o) definition of _round
DasherCore/libdashercore.a(AutoSpeedControl.o) definition of _round in section (__TEXT,__text)

On OS X, libpthread is a symlink to libSystem (comparable to libc on linux) and round() is declared in math.h. There are several places in dasher where round() compatibility functions are provided (and based on different criteria each time), so maybe this whole mess could be solved everywhere in a more unified fashion. How about a configure test for it (AC_SEARCH_LIBS or AC_CHECK_FUNCS or somesuch) and then use the result of that test to decide whether to implement a compatibilility function?
Comment 1 Patrick Welche 2013-01-27 12:16:31 UTC
This should be fixed by

http://git.gnome.org/browse/dasher/commit/?id=f31353a3525e3c2d0b94acedbcb21b1ebcb84785

though I may remove the round() compatibility function entirely later: do you know of a system without it? (Even windows seems to have it.)
Comment 2 Patrick Welche 2013-02-01 19:57:06 UTC
Amazingly  a test compile shows that windows (VS2010) doesn't have round() !