Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239050 - sys-devel/bison-2.3: Unable to build application using bison because of missing library
Summary: sys-devel/bison-2.3: Unable to build application using bison because of missi...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High minor
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-29 14:12 UTC by Veovis
Modified: 2008-11-22 20:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
An application that use flex/bison (sample.tar.bz2,1.33 KB, application/octet-stream)
2008-09-30 21:43 UTC, Veovis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Veovis 2008-09-29 14:12:42 UTC
During installation, the ebuild specify that all /usr/lib* generated during compilation must be deleted.
There is a library /usr/lib/liby.a that IS needed to build some basic applications which are using bison.

Reproducible: Always

Steps to Reproduce:
1. Create a very bacic application bison.flex
2. Try to compile this with gcc (you need -ly -ll switch)
3.

Actual Results:  
ld search for a library named liby* (because of `gcc -ly`), but failed because /usr/lib/liby.a does not exist.


To resolve this, juste delete the line
'rm -r "${D}"/usr/lib* || die' in bison-2.3.ebuild

Previous bison ebuild have the same problem.
Comment 1 SpanKY gentoo-dev 2008-09-29 23:24:52 UTC
post some example code you ran through bison and the exact commands you used
Comment 2 Veovis 2008-09-30 21:43:27 UTC
Created attachment 166871 [details]
An application that use flex/bison

I've put all the code source to build a very small application.
The purpose of this sample is to recognise then execute a simple mathematic operation.

So extract this under a folder, then juste type 'make'.
To run the app, type './test < a' (a is a text test file)

Makefile parses bison file (specif.y) then flex file (specif.l).
Then gcc compiles all *.c file with '-ly -ll' switch. Without -ll for lex.yy.c (flex) and -ly for specif.tac.b (bison), compilation fails.
Comment 3 SpanKY gentoo-dev 2008-11-09 07:27:31 UTC
use -lfl to get flex's lib
Comment 4 Veovis 2008-11-10 23:55:51 UTC
You are just fixing the flex's problem (libfl.a libl.a), not the bison's problem (missing liby.a)
Comment 5 SpanKY gentoo-dev 2008-11-18 15:17:53 UTC
and there's nothing in -ly that you need.  all applications should be defining their own yyerror().
Comment 6 Veovis 2008-11-22 20:09:06 UTC
You right ! I had nod define yyerror() function.
Sorry to disturb you with that.