Your message dated Thu, 18 Jan 2007 20:01:23 -0600
with message-id <[EMAIL PROTECTED]>
and subject line Bug#397591: problems linking with -lfl option
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Subject: problems linking with -lfl option
Package: flex-old
Version: 2.5.4a-7
Severity: normal

I have the following file:

%option  noyywrap
%{
int voc,con;
%}
%%
a|e|i|o|u       voc++;
[a-z]           con++;
.               ;
%%
int main(){
       yylex();
       printf("voc: %3d   con: %3d\n",voc,con);
}

just a simple example... if I do

 flex file.l; gcc lex.yy.c

everything is ok, but if i remove the

 %option  noyywrap

directive, and do

 flex file.l; gcc -lfl lex.yy.c

I get these errors:

/tmp/ccgksxij.o: In function `main':
lex.yy.c:(.text+0xfdd): multiple definition of `main'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libfl.a(libmain.o):/home/srivasta/flex-old-2.5.4a/libmain.c:10:
first defined here
/usr/bin/ld: Warning: size of symbol `main' changed from 27 in
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libfl.a(libmain.o) to 62 in
/tmp/ccgksxij.o
/tmp/ccgksxij.o: In function `yylex':
lex.yy.c:(.text+0x341): undefined reference to `yywrap'
/tmp/ccgksxij.o: In function `input':
lex.yy.c:(.text+0xaeb): undefined reference to `yywrap'
collect2: ld returned 1 exit status

I have the same problem with flex package.

Greetings
Paolo Pantaleo









-- System Information:
Debian Release: testing/unstable
 APT prefers testing
 APT policy: (800, 'testing'), (70, 'stable'), (60, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-k7
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)

Versions of packages flex-old depends on:
ii  libc6                        2.3.6.ds1-7 GNU C Library: Shared libraries

Versions of packages flex-old recommends:
ii  gcc [c-compiler]              4:4.1.1-13 The GNU C compiler
ii  gcc-4.0 [c-compiler]          4.0.3-3    The GNU C compiler
ii  gcc-4.1 [c-compiler]          4.1.1-19   The GNU C compiler

-- no debconf information


--- End Message ---
--- Begin Message ---
Hi,

        Well, it works for me, with both flex and flex-old, on Sid.

,----
| __> cat filter.l
| %{
| int voc,con;
| %}
| %%
| a|e|i|o|u       voc++;
| [a-z]           con++;
| .               ;
| %%
| int main(){
|         yylex();
|         printf("voc: %3d   con: %3d\n",voc,con);
| }
`----
,----[ flex           2.5.33-10 ]
| __> flex filter.l;   
| __> gcc lex.yy.c -lfl
| __> ./a.out< filter.l
| voc:  20   con:  35
`----
,----[ flex-old       2.5.4a-7 ]
| [EMAIL PROTECTED]:~$ flex filter.l;   
| [EMAIL PROTECTED]:~$ gcc lex.yy.c -lfl
| [EMAIL PROTECTED]:~$ ./a.out< filter.l
| voc:  20   con:  35
`----

        I think your problem is that you tried:
% gcc -lfl lex.yy.c
        instead of
% gcc lex.yy.c -lfl
        which indeed bombs out.

        manoj
--
Matz's Law: A conclusion is the place where you got tired of thinking.
Manoj Srivastava <[EMAIL PROTECTED]> <http://www.golden-gryphon.com/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

--- End Message ---

Reply via email to