NetBSD-Bugs archive

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

lib/48767: nearbyint() and friends missing on macppc (others?)



>Number:         48767
>Category:       lib
>Synopsis:       nearbyint() and friends missing on macppc (others?)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 28 16:00:00 +0000 2014
>Originator:     John D. Baker
>Release:        NetBSD/macppc-6.99.40, pkgsrc-2014Q1
>Organization:
>Environment:
NetBSD sawtooth.technoskunk.fur 6.99.40 NetBSD 6.99.40 (GENERIC) #2: Wed Apr 23 
13:15:38 CDT 2014  
sysop%verthandi.technoskunk.fur@localhost:/d0/build/current/obj/macppc/sys/arch/macppc/compile/GENERIC
 macppc
>Description:
macppc lacks implementation of "nearbyint{,f,l}()" functions in "-lm"
so x11/gtk3 defines its own in "${WRKSRC}/gtk/fallback-c89.c".  As the
local function is declared to be "static", gcc (4.5.4) complains about
the conflict with the prior non-static prototype in <math.h>.  As a
result, building x11/gtk3 on macppc fails.

The naive patch, removing the "static" storage class, is insufficient
as it creates multiple definitions of the function when linking the
intermediate object files.
>How-To-Repeat:
Observed while attempting to build x11/gtk3 on macppc-6.99.40 (other
ports/versions?).

Also, on macppc:

  $ nm /lib/libm.so | grep nearby
  $

Compare from i386:

  $ nm /lib/libm.so | grep nearby
  000135b8 T nearbyint
  000135fc T nearbyintf
  0001363a T nearbyintl
  &

>Fix:
Ports that lack them should grow implementations of missing, yet
prototyped, functions.



Home | Main Index | Thread Index | Old Index