Flex and libfl.so (SVN 20080603/ uclibc)

Kevin Day thekevinday at gmail.com
Mon Jul 28 06:02:51 PDT 2008


On Mon, Jul 28, 2008 at 7:57 AM, Mwanguhya Daniel Murungi
<dmurungi at dicts.mak.ac.ug> wrote:
>
> Following the current flex build instructions produces libfl.a instead of
> libfl.so as mentioned in the book (chapter 6.38).
>
> How can I get a shared version of libfl ?
>
> Daniel
> --

As far as I was able to tell, flex does not generate a shared library.
What I do is manually create a libfl.so via the following noise:

 gcc $CFLAGS -fpic -fPIC -Wl,-soname,libfl.so.2 -o libfl.so.$version
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

where $version is the particular version of the library

and then take care of the symlinkage:

  cp -v libfl.so.$version /lib/
  ln -vsf libfl.so.$version /lib/libfl.so.2
  ln -vsf libfl.so.2 /lib/libfl.so

-- 
Kevin Day



More information about the hlfs-dev mailing list