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
NetBSD sawtooth.technoskunk.fur 6.99.40 NetBSD 6.99.40 (GENERIC) #2: Wed Apr 23 
13:15:38 CDT 2014  
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.
Observed while attempting to build x11/gtk3 on macppc-6.99.40 (other

Also, on macppc:

  $ nm /lib/ | grep nearby

Compare from i386:

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

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

Home | Main Index | Thread Index | Old Index