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

Missing include files in makefile #215

Closed
sasagawa888 opened this issue Aug 30, 2022 · 5 comments
Closed

Missing include files in makefile #215

sasagawa888 opened this issue Aug 30, 2022 · 5 comments

Comments

@sasagawa888
Copy link
Owner

sasagawa888 commented Aug 30, 2022

The lisp library is now automatically compiled by make. But I get an error as follows:

initialize
pass1
pass2
compiling CREATE-SERVER 
compiling SERVER-ACCEPT 
compiling CLIENT-CONNECT 
compiling SOCKET-SEND 
compiling SOCKET-RECEIVE 
compiling SOCKET-CLOSE 
compiling GET-HOST-ADDRESS 
finalize
invoke CC
library/tcpip0.c:1:10: fatal error: fast.h: No such file or directory
    1 | #include "fast.h"
      |          ^~~~~~~~
compilation terminated.
T
> 

The C compiler is invoked like this: It should have been correctly specified with the -I option. I thought about it, but I'm stuck.

cc -O3 -w -shared -fPIC -s -o library/tcpip.o -I$HOME/eisl library/tcpip0.c 
@poldy
Copy link
Contributor

poldy commented Aug 31, 2022

I can take a better look later. The solution may require customising the "-I" options to cc in compiler.lsp depending on the value of PREFIX in the makefile, but I'm not sure yet.

@glv2
Copy link

glv2 commented Aug 31, 2022

Adding the following in the makefile helps the compiler find where the headers are:

EASY_ISLISP := $(CURDIR)
export EASY_ISLISP

Also, can "fast.h" and "ffi.h" be required to compile libraries written by users? If yes, I guess they should be installed to SHAREDIR.

poldy added a commit to poldy/eisl that referenced this issue Aug 31, 2022
@poldy
Copy link
Contributor

poldy commented Aug 31, 2022

Ok, I logged a pull request for this. Feedback welcome.

sasagawa888 added a commit that referenced this issue Aug 31, 2022
Fixes for issue #215, remove dependency on source dir after installation
@sasagawa888
Copy link
Owner Author

worked fine. Thank you.

@sasagawa888
Copy link
Owner Author

I learned how to write a makefile. I couldn't figure out why the -I option didn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants