Closed GoogleCodeExporter closed 8 years ago
That's apparently an incompatibility of your flex version. Which version did
you use?
Original comment by aggraef@gmail.com
on 21 Dec 2009 at 8:51
The standard flex 2.5.35 in SnowLeopard btw. happened with make -B.
Also tried just 'make' it gives incompatible architecture errrors in linking
pure and llvm. I followed the
instructions in the INSTALL point by point. Perhaps 64-bit / 32-bit
incompatibility in the compilations?
I did not have these issues with Pure 0.25 but that was with the older llvm and
Mac OS X 10.5 (i.e. not 64-bit).
Also tried the MacPorts version, it gives Segmentation Fault on any use of map
and also fails the eye example
in the manual.
Original comment by autoteli...@gmail.com
on 22 Dec 2009 at 9:01
About the flex problem: 2.5.35 is what I have here on Linux, too, but it
doesn't have
this problem. Looks like your version uses a slightly different (and
incompatible)
lexer skeleton. I suggest to either use the lexer.cc that's provided in the
release
tarball (i.e., 'make' instead of 'make -B', as you already did), or you'll have
to
change the lex_input function in lexer.ll so that it takes a size_t& as the
third
parameter instead of int&.
About the linkage errors: That's a known LLVM issue (in fact, the MacPorts build
originally had the same problem). The solution is to add a slew of options to
configure. See:
http://groups.google.com/group/pure-lang/browse_thread/thread/b96c1f2c929d2c65
http://trac.macports.org/ticket/22578
http://llvm.org/bugs/show_bug.cgi?id=5012
(Judging from the LLVM port file in MacPorts, just specifying the proper --build
option when configuring LLVM might be enough. In any case, the latest version
of the
MacPorts port should work fine now.)
About the segmentation faults on 64 bit/Snow Leopard: That's a known issue, too.
Apparently the LLVM JIT is broken on OSX 2.6. See:
http://groups.google.com/group/pure-lang/browse_thread/thread/325daccbd9439a00
(But this is really a separate issue, so I'd appreciate it if you could file a
new
problem report for it.)
At present, the only known workaround for the JIT problems is to build Pure as
a 32
bit application on OSX 2.6. You should ask Ryan Schmidt (the maintainer of the
MacPorts Pure port) on the Pure mailing list about that; he's tried it and says
that
it works. There's also the possibility that this might have been fixed in LLVM
svn,
see the above mailing list thread for details. I can't test any of that myself,
as I
don't have access to an Intel/OSX machine.
Original comment by aggraef@gmail.com
on 22 Dec 2009 at 12:54
Yes, I can confirm the flex problem. Apparently, Apple's flex incorporates a
post-2.5.35 upstream patch of the scanner skeleton that changes yyleng and
yy_n_chars
from int to yy_size_t (which is typedefed to size_t, which of course is 64 bit
on a
64 bit system). See:
http://flex.cvs.sourceforge.net/viewvc/flex/flex/flex.skl?r1=2.212&r2=2.213
I'll install the cvs version of flex to reproduce the problem, so that I can
design a
workaround. This will go into Pure 0.40.
Original comment by aggraef@gmail.com
on 22 Dec 2009 at 1:09
The flex issue is fixed in r2838. Thanks for reporting.
Original comment by aggraef@gmail.com
on 22 Dec 2009 at 1:48
Original issue reported on code.google.com by
autoteli...@gmail.com
on 20 Dec 2009 at 9:12