[modular build] build stops at twm

Matthieu Herrb matthieu.herrb at laas.fr
Tue Dec 12 23:20:56 PST 2006


Carlo Salinari wrote:
> Dan Nicholson wrote:
>> On 12/12/06, Carlo Salinari <csali at tiscali.it> wrote:
>>> I need a little help with the modular build.
>>> Bison is 2.3.
>>> Here's where it stops (twm).
>>
>> <snip>
>>
>>> gcc  -g -O2   -o twm  twm-add_window.o twm-cursor.o twm-deftwmrc.o
>>> twm-events.o twm-gc.o twm-iconmgr.o twm-icons.o twm-list.o twm-menus.o
>>> twm-parse.o twm-resize.o twm-session.o twm-twm.o twm-util.o
>>> twm-version.o twm-gram.o twm-lex.o -L/home/carlo/devel/modular//lib
>>> -lXext -lXmu -lXt -lX11 -lSM -lICE
>>> twm-parse.o: In function `doparse':
>>> /home/carlo/devel/test/app/twm/src/parse.c:111: undefined reference to
>>> `yylineno'
>>> twm-gram.o: In function `twmrc_error_prefix':
>>> /home/carlo/devel/test/app/twm/src/gram.y:879: undefined reference to
>>> `yylineno'
>>> twm-gram.o: In function `yyparse':
>>> /home/carlo/devel/test/app/twm/src/gram.c:1726: undefined reference to
>>> `yylex'
>>> collect2: ld returned 1 exit status
>>> make[3]: *** [twm] Error 1
>>> make[3]: Leaving directory `/home/carlo/devel/test/app/twm/src'
>>
>> I think you need some sort of lex program. You can get this from flex:
>>
>> http://flex.sourceforge.net/
>>
>> It should check for a lex type program in configure. If you're
>> building from a tarball, then bison and flex aren't needed.
>>
>> -- 
>> Dan
>>
> 
> Solved.
> 
> I had both bison and flex installed. The problem  went away doing a
> fresh build. Probably an autogen issue.
> Thank for your reply.
> 

Yes. Shipping the files generated by flex as part of the source tarball
is a mistake. Different systems have different lex implementations with
different libraries requirements. The AC_PROG_LEX autoconf macro takes
care of most of these, but since make won't care rebuilding lex.c if one
is provided in the tarball the correct rules are used whith the bad file.

For bison generated files, the problem also exists but is less crucial
as the generated files are selfcontainted and pretty portable.

There are a couple of other packages which suffer from the same kind of
problems, I'll try to fix them or at least to open bugzilla entries for
them.
-- 
Matthieu Herrb



More information about the xorg mailing list