Re: [Flex-devel] flex 2.5.33 under MSYS
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Will E. <wl...@us...> - 2007-04-21 18:56:10
|
Thanks for your report. We're always happy to learn about portability fixes and workarounds. Based on your comments, it looks like you could set an LDFLAGS variable to include -lregex, and then you wouldn't have to re-run the link command when building flex. Is that correct? Thanks, Will Estes Flex Project Maintainer On Saturday, 21 April 2007,17:00 +0200, Julien Lecomte wrote: > x-post: mingw-dvlpr & flex-devel > > I recently was trying to compile flex under MSYS, and stumbled upon > MinGW/MSYS mailing-list documentation on the compiling problems of it > and of libregex. > For archive purposes, I'm posting the solution I had to use to correctly > compile flex for MSYS; as the current archives didn't post a full > solution. This might also be of use for the next MSYS release. > > Among the problems of the compiling flex, there's a 'regex.h' problem > (header not found) and then I stumbled upon another problem where all 40 > test cases fail (internal regcomp error). > > Here's my solution: > - download libregex (currently 0.12, on ftp.gnu.org/old-gnu/regex) > - extract, configure and make only object (make CFLAGS="-O2" regex.o) as > we (I?) don't care about tex. > - make a library out of it (ar -crs libregex.a regex.o) > - copy them to correct locations (cp libregex.a /usr/lib/ && cp regex.h > /usr/include/) > > - extract flex, configure and make (make should succeed, but flex.exe > should have regcomp errors if you try './flex.exe') > - remove flex.exe, and use a modified link command: > rm flex.exe > gcc -o flex.exe ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o parse.o > scan.o skel.o sym.o tblcmp.o yylex.o options.o scanopt.o buf.o tables.o > tables_shared.o filter.o -lregex regex.o > > If you now run the test case, you should have 4 errors, most are because > they are C++ errors and inclusion of non existing _G_config.h; and one > of them is just solved by running test case with correct CFLAGS and LDFLAGS. > > Cheers, > Julien > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Flex-devel mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-devel |