Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

does not compile on osx (libev installed using macports) #2

Open
sagivmalihi opened this issue May 10, 2013 · 6 comments
Open

does not compile on osx (libev installed using macports) #2

sagivmalihi opened this issue May 10, 2013 · 6 comments

Comments

@sagivmalihi
Copy link

needed the following diffs to compile:

diff --git a/pypycore.py b/pypycore.py
index cc07b75..8cccd04 100644
--- a/pypycore.py
+++ b/pypycore.py
@@ -98,7 +98,7 @@ struct ev_child {
 };

 struct stat {
-    long long st_nlink;
+    short st_nlink;
     ...;
 };

@@ -200,7 +200,7 @@ void ev_sleep (ev_tstamp delay); /* sleep for a while */

 libev = C = ffi.verify("""   // passed to the real C compiler
 #include <ev.h>
-""", libraries=["ev"])
+""", libraries=["ev"], include_dirs=["/opt/local/include"], library_dirs=["/opt/local/lib"])

 libev.vfd_open = libev.vfd_get = lambda fd: fd
 libev.vfd_free = lambda fd: None
@erikvanzijst
Copy link

I just ran into the same issue and was about to change the stat struct in a similar way. However, it safe to simply go from 8 to 2 bytes?

@schmir
Copy link
Contributor

schmir commented May 11, 2013

at the moment it doesn't even matter as st_nlink isn't being used. The declaration must match what the system headers define.

@erikvanzijst
Copy link

Great, thanks!

@alanyang
Copy link

105 line chang 'long long' to 'short'

@jvsteiner
Copy link

having this issue as well. I see it's from mid 2013 - any reason it hasn't been merged yet?

@schmir
Copy link
Contributor

schmir commented Nov 18, 2014

please read the README and try gevent

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

No branches or pull requests

5 participants