Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 14 May 2003 08:36:19 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Chu Wang cc: cygwin AT cygwin DOT com Subject: RE: Help: problems with unreferenced yywrap In-Reply-To: <12B3AE0049C5D511A59A00D0B7B77ED506A3BC84@bilbo.hud.ac.uk> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To the maintainer of "gcc" (still CGF?): Should we have a /bin/cc symbolic link pointing to /bin/gcc? That's a question, not even a suggestion at this point. Chu, The Unix trouble is not related, but the symptoms are the same - you can't execute "cc", which is the default value for the CC variable. So, let configure know that your CC is "gcc", and it should work. Just type "./configure CC=gcc ", where "" are whatever options you normally pass to configure (possibly empty). Then let it run its course and see if that link still fails. This problem is due to a *bug* in your project's configure: it checks for the flex-specific names *before* it finds out which compiler it should use, so it defaults to one that's non-existent on your system. Igor P.S. "CC=gcc" is not an option, it's an environment variable setting, most configure scripts should accept that. If it doesn't work, put "CC=gcc" *before* the script name (that way, the shell sets it). On Wed, 14 May 2003, Chu Wang wrote: > Igor > > I found something like: > ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' > > But there are no options like "CC=gcc" for "./configure" for that > package. And I checked error message under a unix server, which has the > same unrefenced yywrap info, like: > > configure:624: cc -o conftest conftest.c -lfl 1>&5 > /usr/ucb/cc: language optional software package not installed > configure: failed program was: > #line 613 "configure" > #include "confdefs.h" > ... (following are same) > > > Does the line about "/usr/ucb/cc..." indicate any lack of a particular > software tool? Thanks. > > Chu > > > -----Original Message----- > From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu] > Sent: 13 May 2003 18:10 > To: Chu Wang > Cc: cygwin AT cygwin DOT com > Subject: RE: Help: problems with unreferenced yywrap > > > Chu, > > This is a buggy configure. Your first clue should have been the > underlined line below. Check for the setting of ac_link in configure -- > if it's set to something like > > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' > > try running "./configure CC=gcc" or even put "export CC=gcc" into your > .bashrc... For more info, "./configure --help". > Igor > P.S. I'm not very familiar with autotools -- maybe running autoreconf or > something will fix this -- I just don't know. > > On Tue, 13 May 2003, Chu Wang wrote: > > > Hello, Igor > > > > Thanks for your help. I have checked config.log. and related message as > > below: > > > > configure:605: checking for yywrap in -lfl > > configure:624: cc -o conftest conftest.c -lfl 1>&5 > > cc: not found > ^^^^^^^^^^^^^ > > configure: failed program was: > > #line 613 "configure" > > #include "confdefs.h" > > /* Override any gcc2 internal prototype to avoid an error. */ > > /* We use char because int might match the return type of a gcc2 > > builtin and then its argument prototype would still apply. */ > > char yywrap(); > > > > int main() { > > yywrap() > > ; return 0; } > > > > > > I really don't know what this problem is. Can you help me? By the way, > > this project works under some Unix system, but have this similar > > problems under others, and same under Cygwin. Do you have any idea about > > that? > > > > Thanks, > > Chu > > > > -----Original Message----- > > From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu] > > Sent: 13 May 2003 17:04 > > To: Chu Wang > > Cc: cygwin AT cygwin DOT com > > Subject: Re: Help: problems with unreferenced yywrap > > > > On Tue, 13 May 2003, Chu Wang wrote: > > > > > Hi, all > > > > > > I tried to compile and install a package under Cygwin, and the package > > > requires lex and yacc tool. I have installed bison and flex into > > > Cygwin, but the configuration process didn't find yywrap... actually I > > > don't know what the yywrap is for and have few ideas about lex and yacc. > > > I just want to install the package and run it. Part of the configuration > > > results like below: > > > > > > creating cache ./config.cache > > > checking for name and version number... \c > > > concepts 0.3f > > > checking for bison... \c > > > bison -y > > > checking for flex... \c > > > flex > > > checking for yywrap in -lfl... \c > > > no > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > checking for gcc... \c > > > gcc > > > > > > A Makefile is created after configuration. When I tried to make the > > > files, errors appeared like below: > > > > > > gcc -c -DHAVE_CONFIG_H -g concept.c > > > gcc -c -DHAVE_CONFIG_H -g hash.c > > > gcc -c -DHAVE_CONFIG_H -g list.c > > > gcc -c -DHAVE_CONFIG_H -g main.c > > > gcc -c -DHAVE_CONFIG_H -g panic.c > > > gcc -c -DHAVE_CONFIG_H -g print.c > > > gcc -c -DHAVE_CONFIG_H -g relation.c > > > gcc -c -DHAVE_CONFIG_H -g set.c > > > gcc -c -DHAVE_CONFIG_H -g context.c > > > gcc -c -DHAVE_CONFIG_H -g input.c > > > gcc -c -DHAVE_CONFIG_H -g arrow.c > > > flex scanner.lex > > > mv lex.yy.c scanner.c > > > bison -y -d parser.yacc > > > mv y.tab.c parser.c > > > mv y.tab.h parser.h > > > gcc -c -DHAVE_CONFIG_H -g scanner.c > > > gcc -c -DHAVE_CONFIG_H -g parser.c > > > gcc -c -DHAVE_CONFIG_H -g lib.c > > > gcc -g -o concepts concept.o hash.o list.o main.o panic.o print.o relation.o set.o context.o input.o arrow.o scanner.o parser.o lib.o > > > scanner.o(.text+0x92e): In function `yylex': > > > /cygdrive/c/work/concept/lex.yy.c:793: undefined reference to `_yywrap' > > > scanner.o(.text+0x111f): In function `input': > > > /cygdrive/c/work/concept/lex.yy.c:1142: undefined reference to `_yywrap' > > > collect2: ld returned 1 exit status > > > make: *** [concepts] Error 1 > > > > > > I checked with previous email archieves, and found yywrap is a function in flex library libfl.a. However, I have installed flex , what else do I need to get the package installed? > > > > > > Any suggestion will be highly appreciated! Thanks a lot. > > > > > > Regards, > > > Chu > > > > Chu, > > > > Note the underlined line above. "configure" is not all-knowing, and > > sometimes makes mistakes. In this particular case, the program that > > tested for yywrap in libfl.a failed (possibly for an unrelated reason), > > and configure assumed that yywrap is not available in -lfl, and, judging > > by the lower commands, decided not to link it in. This probably is a bug > > in the configure script. > > > > To find out why the test program failed, look in "config.log" for the line > > "checking for yywrap in -lfl". The exact failed program, and the nature > > of the failure (i.e., compiler errors) should be right around that line. > > Once that is fixed (which might require editing "configure", or rerunning > > autoconf if the project uses "configure.in"). > > Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Knowledge is an unending adventure at the edge of uncertainty. -- Leto II -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/