Re: Using lex in a shared library

2010-07-06 Thread Matthew Fleming
On Fri, Jul 2, 2010 at 4:52 PM, Xin LI wrote: > I think you could probably just change the code and use %option noyywrap > in the .l file?  (do your code call yywrap() directly?) The code doesn't use yywrap directly, and this has fixed the build for amd64. Thanks! matthew ___

Re: Using lex in a shared library

2010-07-05 Thread Dag-Erling Smørgrav
Not related to your problem, but related to $SUBJECT: make sure to use -P in LFLAGS so your lex-generated symbols don't conflict with those present in applications that use your library, or in other libraries those applications may use. DES -- Dag-Erling Smørgrav - d...@des.no ___

Re: Using lex in a shared library

2010-07-04 Thread dhruva
On Mon, Jul 5, 2010 at 11:57 AM, Peter Jeremy wrote: > On 2010-Jul-02 23:53:17 +0100, Philip Herron wrote: Although maybe not helpful but have you considered using automake/libtool instead makes it so much simpler in my opinion. > ... >>Automake will auto-handle Lex and Yacc files too.

Re: Using lex in a shared library

2010-07-04 Thread Peter Jeremy
On 2010-Jul-02 23:53:17 +0100, Philip Herron wrote: >>> Although maybe not helpful but have you considered using >>> automake/libtool instead makes it so much simpler in my opinion. ... >Automake will auto-handle Lex and Yacc files too. And is extremely portable. You are joking, right? Of all th

Re: Using lex in a shared library

2010-07-03 Thread Kostik Belousov
On Sat, Jul 03, 2010 at 12:08:11PM +0200, Joerg Sonnenberger wrote: > On Fri, Jul 02, 2010 at 04:52:45PM -0700, Xin LI wrote: > > I think that amd64 requires a static library be compiled with -fPIC if > > it's being linked into shared object. This should not be done for > > normal static libraries

Re: Using lex in a shared library

2010-07-03 Thread Joerg Sonnenberger
On Fri, Jul 02, 2010 at 04:52:45PM -0700, Xin LI wrote: > I think that amd64 requires a static library be compiled with -fPIC if > it's being linked into shared object. This should not be done for > normal static libraries, though, as this could give some performance > penalty when it's not needed

Re: Using lex in a shared library

2010-07-02 Thread Matthew Fleming
On Fri, Jul 2, 2010 at 11:54 PM, Xin LI wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > On 2010/07/02 16:52, Xin LI wrote: >> On 2010/07/02 16:34, Matthew Fleming wrote: >>> On Fri, Jul 2, 2010 at 4:02 PM, Garrett Cooper wrote: On Fri, Jul 2, 2010 at 2:51 PM, Matthew Fleming

Re: Using lex in a shared library

2010-07-02 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 2010/07/02 16:52, Xin LI wrote: > On 2010/07/02 16:34, Matthew Fleming wrote: >> On Fri, Jul 2, 2010 at 4:02 PM, Garrett Cooper wrote: >>> On Fri, Jul 2, 2010 at 2:51 PM, Matthew Fleming wrote: I have the following Makefile for a shared lib

Re: Using lex in a shared library

2010-07-02 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 2010/07/02 16:34, Matthew Fleming wrote: > On Fri, Jul 2, 2010 at 4:02 PM, Garrett Cooper wrote: >> On Fri, Jul 2, 2010 at 2:51 PM, Matthew Fleming wrote: >>> I have the following Makefile for a shared library at $work: >>> >>> ISI_TOP=.

Re: Using lex in a shared library

2010-07-02 Thread Matthew Fleming
On Fri, Jul 2, 2010 at 4:02 PM, Garrett Cooper wrote: > On Fri, Jul 2, 2010 at 2:51 PM, Matthew Fleming wrote: >> I have the following Makefile for a shared library at $work: >> >> ISI_TOP=        ../.. >> >> LIB=            isi_date >> SHLIB_MAJOR=    1 >> SHLIB_MINOR=    0 >> SRCS=           da

Re: Using lex in a shared library

2010-07-02 Thread Garrett Cooper
On Fri, Jul 2, 2010 at 3:53 PM, Philip Herron wrote: > On 2 July 2010 23:31, Matthew Fleming wrote: >> On Fri, Jul 2, 2010 at 2:54 PM, Philip Herron wrote: >>> Although maybe not helpful but have you considered using >>> automake/libtool instead makes it so much simpler in my opinion. >> >> Inst

Re: Using lex in a shared library

2010-07-02 Thread Garrett Cooper
On Fri, Jul 2, 2010 at 2:51 PM, Matthew Fleming wrote: > I have the following Makefile for a shared library at $work: > > ISI_TOP=        ../.. > > LIB=            isi_date > SHLIB_MAJOR=    1 > SHLIB_MINOR=    0 > SRCS=           date.c date_parser.new.c lex.yy.c > INCS=           date.h > INCLUD

Re: Using lex in a shared library

2010-07-02 Thread Philip Herron
On 2 July 2010 23:31, Matthew Fleming wrote: > On Fri, Jul 2, 2010 at 2:54 PM, Philip Herron wrote: >> On 2 July 2010 22:51, Matthew Fleming wrote: >>> I have the following Makefile for a shared library at $work: >>> >>> ISI_TOP=        ../.. >>> >>> LIB=            isi_date >>> SHLIB_MAJOR=    

Re: Using lex in a shared library

2010-07-02 Thread Joerg Sonnenberger
On Fri, Jul 02, 2010 at 02:51:16PM -0700, Matthew Fleming wrote: > LDADD=-ll Have you considered providing your own yywrap function instead? (Or not using it at all?) Joerg ___ freebsd-hackers@freebsd.org mailing list http://lists.freebs

Re: Using lex in a shared library

2010-07-02 Thread Matthew Fleming
On Fri, Jul 2, 2010 at 2:54 PM, Philip Herron wrote: > On 2 July 2010 22:51, Matthew Fleming wrote: >> I have the following Makefile for a shared library at $work: >> >> ISI_TOP=        ../.. >> >> LIB=            isi_date >> SHLIB_MAJOR=    1 >> SHLIB_MINOR=    0 >> SRCS=           date.c date_p

Re: Using lex in a shared library

2010-07-02 Thread Philip Herron
On 2 July 2010 22:51, Matthew Fleming wrote: > I have the following Makefile for a shared library at $work: > > ISI_TOP=        ../.. > > LIB=            isi_date > SHLIB_MAJOR=    1 > SHLIB_MINOR=    0 > SRCS=           date.c date_parser.new.c lex.yy.c > INCS=           date.h > INCLUDEDIR=