Bug 89199 - u_math.h:591:4: error: implicit declaration of function 'ffsll'
Summary: u_math.h:591:4: error: implicit declaration of function 'ffsll'
Status: NEW
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) NetBSD
: medium blocker
Assignee: mesa-dev
QA Contact: mesa-dev
Keywords: bisected, regression
Depends on:
Reported: 2015-02-18 06:18 UTC by Vinson Lee
Modified: 2016-07-09 00:10 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:

proposed patch (389 bytes, patch)
2015-02-19 16:33 UTC, Brian Paul
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2015-02-18 06:18:16 UTC
mesa: 599cbe5508ccb246fe06b64116c84ce976165fed (master 10.6.0-devel)

NetBSD build error

  CC       state_tracker/st_atom_array.lo
In file included from state_tracker/st_atom_array.c:46:0:
../../src/gallium/auxiliary/util/u_math.h: In function 'u_bit_scan64':
../../src/gallium/auxiliary/util/u_math.h:591:4: error: implicit declaration of function 'ffsll'
gmake[4]: *** [state_tracker/st_atom_array.lo] Error 1
Comment 1 Vinson Lee 2015-02-19 01:20:00 UTC
Introduced in 10.5.0-devel by this commit.

50433ea526942dbeac75cc415becadea157e5d33 is the first bad commit
commit 50433ea526942dbeac75cc415becadea157e5d33
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Sat Jan 31 17:15:16 2015 +0100

    gallium/util: add u_bit_scan64
    Same as u_bit_scan, but for uint64_t.
    Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
    Reviewed-by: Brian Paul <brianp@vmware.com>

:040000 040000 4eb1909ac455e690d7de4dbea87cb21b8678ed4b a1d1419d9af472fc2b366764bf8b2a772d11849d M      src
bisect run success
Comment 2 Brian Paul 2015-02-19 16:31:25 UTC
Hi Vinson,
Is that with gcc?  Which compiler version?

I'll attach a patch proposal for you to try...
Comment 3 Brian Paul 2015-02-19 16:33:14 UTC
Created attachment 113670 [details] [review]
proposed patch

If you're using gcc, maybe a gcc version check would be better.
This patch also assumes the radeonsi driver isn't used on NetBSD (the only user of u_bit_scan64() at this time.)
Comment 4 Vinson Lee 2015-02-19 23:56:56 UTC
$ gcc --version
gcc (NetBSD nb2 20110806) 4.5.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

attachment 113670 [details] [review] fixes the NetBSD build.

Tested-by: Vinson Lee <vlee@freedesktop.org>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.