Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kona API does not build on Linux #407

Closed
PaulBatchelor opened this issue Jan 28, 2016 · 6 comments
Closed

Kona API does not build on Linux #407

PaulBatchelor opened this issue Jan 28, 2016 · 6 comments
Labels

Comments

@PaulBatchelor
Copy link

(Completely new to Kona and K)

In trying to compile libkona.a (make lib), the build fails.

I can get libkona.a to build if I comment out the functions sdf and scd (lines 35 and 36 in src/kapi.c). Not sure what I break when I do this, but it seems to work.

Thanks!

-P

@nsmaciej
Copy link
Contributor

sdf and scd are for registering even loop callbacks (I'm not sure.. I'm new too, was able to find this.)

I think those lines meant to be:

I sdf(I i, I(*f)()) { R kerr("nyi"); } // XXX
I scd(I i) { I r=close(i); if(r)R kerr("file"); R r;} // XXX

(Or adding bits of ts.h to define FE and NYI)

I thought about submitting a pull request but I wanted to try make ./kapi-test pass first.

@refi64
Copy link
Contributor

refi64 commented Jan 28, 2016

What's the build error? It builds correctly for me.

@PaulBatchelor
Copy link
Author

running "make lib" gives me this:

In file included from src/kapi.c:4:0:
src/kapi.c: In function 'sdf':
src/kona.h:16:11: warning: return makes integer from pointer without a cast [enabled by default]
#define R return
^
src/kapi.c:35:23: note: in expansion of macro 'R'
I sdf(I i, I(_f)()) { R NYI; } // XXX
^
src/kapi.c: In function 'scd':
src/kapi.c:36:1: warning: parameter names (without types) in function declaration [enabled by default]
I scd(I i) { I rclose(i); if(r)R FE; R r;} // XXX
^
src/kapi.c:36:30: error: 'r' undeclared (first use in this function)
I scd(I i) { I rclose(i); if(r)R FE; R r;} // XXX
^
src/kapi.c:36:30: note: each undeclared identifier is reported only once for each function it appears in
src/kapi.c:36:34: error: 'FE' undeclared (first use in this function)
I scd(I i) { I rclose(i); if(r)R FE; R r;} // XXX
^
src/kapi.c: In function 'jd':
src/kapi.c:40:35: warning: initialization makes pointer from integer without a cast [enabled by default]
I jd(I d) { I j; K a = gi(d), r = _jd(a); cd(a); j = Ki(r); cd(r); R j; }
^
src/kapi.c: In function 'dj':
src/kapi.c:41:35: warning: initialization makes pointer from integer without a cast [enabled by default]
I dj(I j) { I d; K a = gi(j), r = jd(a); cd(a); d = Ki(r); cd(r); R d; }
^
make: *
* [src/kapi.o] Error 1

@nsmaciej
Copy link
Contributor

Fails on OS X with clang too.

@fenollp
Copy link
Contributor

fenollp commented Jan 28, 2016

seems FE which is defined in ts.h isn't included in kapi.c nor kona.h

@tavmem
Copy link
Collaborator

tavmem commented Mar 2, 2016

Just as a note:
This issue is a regression.
"make lib" compiles in commit c311ae9 of Aug 5, 2015.
"make lib" fails in commit b1ed4b9 also of Aug 5, 2015.

@tavmem tavmem closed this as completed in aea1a88 Mar 2, 2016
tavmem added a commit that referenced this issue Mar 2, 2016
@tavmem tavmem added the build label Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants