[GRASS-dev] Compiler error in /lib/calc

Michael Barton Michael.Barton at asu.edu
Thu Jul 5 15:06:44 PDT 2018


PS: The errors are undeclared identifiers. Is there something missing that needs to be there on the Mac? Or do these need to be declared in a different place in function.c to be recognized? 

function.c
function.c:14:22: error: use of undeclared identifier 'f_ceil'
     {"ceil", c_unop, f_ceil},
                      ^
function.c:15:23: error: use of undeclared identifier 'f_floor'; did you
mean 'f_float'?
     {"floor", c_unop, f_floor},

Thanks Vaclav,

I tried this first with a make distclean and svn update.
Then, to be sure, I deleted all files and trunk and restored them fresh. 
Same problem. 
This all compiled with no errors a week or two back. 

When I did the svn up, the items that had changed in lib/calc since my last update are

U    lib/calc/function.c
A    lib/calc/xceil.c
A    lib/calc/xfloor.c

Michael

______________________________
C. Michael Barton 
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University
Tempe, AZ  85287-2402
USA
 
voice:    480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax:          480-965-7671(SHESC), 480-727-0709 (CSDC)
www:      http://csdc.asu.edu, http://shesc.asu.edu
                                http://www.public.asu.edu/~cmbarton

On 7/5/18, 2:54 PM, "grass-dev on behalf of grass-dev-request at lists.osgeo.org" <grass-dev-bounces at lists.osgeo.org on behalf of grass-dev-request at lists.osgeo.org> wrote:

    Date: Thu, 5 Jul 2018 17:54:24 -0400
    From: Vaclav Petras <wenzeslaus at gmail.com>
    To: Michael Barton <Michael.Barton at asu.edu>
    Cc: "grass-dev at lists.osgeo.org" <grass-dev at lists.osgeo.org>
    Subject: [GRASS-dev] Compiler error in /lib/calc
    Message-ID:
    	<CABo5uVsCZT=Vz3odmBD76zsNF_V9t09PvcVi1GhwiT85HVncZQ at mail.gmail.com>
    Content-Type: text/plain; charset="utf-8"
    
    [Response to Re: [GRASS-dev] grass-dev Digest, Vol 149, Issue 11]
    
    Hi Michael,
    
    I'm not able to reproduce this issue on Linux with clang (which is used on
    Mac) even with more strict compiler settings:
    
    clang  -O2 -fno-common -Wall -pedantic -Wextra ...
    
    Since both "installation/dist" and source paths appear in the command line,
    even the error message says the function is there (actually, already in the
    installed/dist path), the includes were not changed (in r72940), and the
    errors are only related to the newly added functions (f_ceil, f_floor), I
    suggest just updating and recompiling again and making sure that two source
    codes or installations are not tangled together.
    
    For the record, this is not related to m.nviz.image changes. It might be
    related to r72940 r.mapcalc: +ceil, +floor (fixes #769).
    
    Best,
    Vaclav
    
    On Thu, Jul 5, 2018 at 5:14 PM, Michael Barton <Michael.Barton at asu.edu>
    wrote:
    
    >To try and test the fix to m.nviz.image, I just now did for trunk:
    >
    >Make distclean
    >Svn update
    >Configure (no problem)
    >Compile
    >
    >I got a compiler error in /lib/calc (error below)
    >Is this due to the recent fix?
    >
    >I also tried it with a completely new version of trunk downloaded and got
    >the same errors.
    >
    >Michael
    >




More information about the grass-dev mailing list