HaveF / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Patch to fix OS X Lion/Mountain Lion problems #187

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In re.hpp, you include <pcre/pcre.h> for OS X. However, pcre headers don't come 
with Lion/Mountain Lion.

The best workaround is to install pcre with Homebrew. This adds a "pcre.h" 
header to "/usr/local/include", which you include for __sun. I patched the 
"re.hpp" header to include this for __APPLE__ as well. I tested it on a dummy 
program and it translates/compiles fine.

The patch was made with "git show".

Original issue reported on code.google.com by alexchan...@gmail.com on 10 Apr 2013 at 5:36

Attachments:

GoogleCodeExporter commented 9 years ago
thanks for the patch! unfortunately though, it doesn't work here:

/home/srepmub/shedskin/shedskin/lib/re.hpp:11:15: warning: extra tokens at end 
of #ifndef directive [enabled by default]

that is, using gcc 4.7.3 under ubuntu 13.04. does the following work for you?

#if defined(__sun) || defined(__APPLE__)
#include <pcre/pcre.h>
#else
#include <pcre.h>
#endif

Original comment by mark.duf...@gmail.com on 10 Apr 2013 at 9:27

GoogleCodeExporter commented 9 years ago
Hmm, it looks like I misread the line (I thought the ifndef was an ifdef). The 
patch is unnecessary! Shedskin just requires pcre to be installed, presumably 
by Homebrew.

That could be mentioned on the project page / in the README / printed out 
during setup.py.

Original comment by alexchan...@gmail.com on 10 Apr 2013 at 10:32

GoogleCodeExporter commented 9 years ago
thanks! it is actually described here:

https://code.google.com/p/shedskin/wiki/docs#Installation

I agree it would be nice to have setup.py check whether this and other 
dependencies are installed!

Original comment by mark.duf...@gmail.com on 15 Apr 2013 at 7:01