Error Cannot Find Output From Flex
Re: Error building GCC From: Jay To: Jonathan Wakely Cc: VladimÃr Fuka , gcc-help Date: Thu, 17 Apr 2014 18:54:18 -0700 Subject: Re: Error building GCC Authentication-results: sourceware.org; auth=none References: Are you running from sh/bash/ksh/csh/zsh, or maybe, Python's os.system()? There is a bug in gmp's configure, related to flex, and revealed by non-default signal handling such as in Python. It has been reported for years, by multiple people, with simple correct fixes, but not fixed. - Jay On Apr 17, 2014, at 2:38 AM, Jonathan Wakely wrote: > On 17 April 2014 10:12, VladimÃr Fuka wrote: >> >> Nevertheless I always get this in some internal `configure` after >> running `make`: >> >> checking for bison... bison -y >> checking for flex... flex >> checking lex output file root... configure: error: cannot find >> output from flex; giving up >> make[2]: *** [configure-stage1-gmp] Error 1 >> make[2]: Leaving directory `***/gcc-bin-8' >> make[1]: *** [stage1-bubble] Error 2 >> make[1]: Leaving directory `***/gcc-bin-8' >> make: *** [all] Error 2 >> >> It is configured with: >> >> ../gcc-4.8.2/configure --enable-languages=c,c++,fortran >> --prefix=/home/***/gcc-4.8.2 >> >> I have no idea what should I try more. > > You can look in gmp/config.log to see what causes the error. In a > successful log you should see something like: > > configure:29361: flex conftest.l > configure:29365: $? = 0 > configure:29367: checking lex output file root > configure:29381: result: lex.yy Follow-Ups: Re: Error building GCC From: Marc Glisse References: Re: Error building GCC From: Jonathan Wakely Index Nav: [DateIndex] [SubjectIndex] [AuthorIndex] [ThreadIndex] Message Nav: [DatePrev][DateNext] [ThreadPrev][ThreadNext]
SCAP-on-Apple SmartCard Services WebKit XQuartz Contact Terms of Use Privacy Policy All user-submitted text and content on this website is licensed under a Creative Commons Attribution 2.5 License unless otherwise noted. Copyright © 2011 Apple Inc. All rights reserved. New Ticket Tickets Wiki Browse Source Timeline Roadmap Ticket Reports Search Search: Context Navigation ← Previous https://gcc.gnu.org/ml/gcc-help/2014-04/msg00084.html TicketNext Ticket → Ticket #32415 (closed defect: wontfix) Opened 5 years ago Last modified 4 years ago flex configure fails when an existing broken flex is installed Reported by: mparchet@… Owned by: mww@… Priority: Normal Milestone: Component: ports Version: 2.0.3 Keywords: Cc: ryandesign@… Port: flex Description Hi I wold like to https://trac.macports.org/ticket/32415 install wine to run windows application on mac os lion. When I try to install it, I get this message Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details) Log for flex is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_flex/flex/main.log Error: Unable to upgrade port: 1 Error: Unable to execute port: upgrade flex failed To report a bug, see flex main log version:1 :msg:main ---> Computing dependencies for flex:info:main .:debug:main Searching for dependency: gettext :debug:main Found Dependency: receipt exists for gettext :msg:main :debug:main Executing org.macports.main (flex) :debug:main changing euid/egid - current euid: 0 - current egid: 0 :debug:main egid changed to: 501 :debug:main euid changed to: 503 :debug:main Skipping completed org.macports.archivefetch (flex) :debug:main Privilege de-escalation not attempted as not running as root. :debug:main Skipping completed org.macports.fetch (flex) :debug:main Privilege de-escalation not attempted as not running as root. :debug:main Skipping completed org.macports.checksum (flex) :debug:main Privilege de-escalation not attempted as not running as root. :deb
failed? From: Jay To: Date: Thu, 31 Jul 2008 10:54:13 +0000 Subject: RE: flex: exec failed? Arg.. https://cygwin.com/ml/cygwin/2008-07/msg00725.html simple repro is this Python code, with the appropriate gcc source tree: http://www.justskins.com/forums/38867-new-configuerror-cannot-11270.html #! /usr/bin/env python import os import sys def Run(Directory, Command): sys.stderr.flush() sys.stdout.flush() print("cd " + Directory + " && " + Command) PreviousDirectory = os.getcwd() os.chdir(Directory) if os.name == "nt": Command = "sh -c \"" + Command + "\"" sys.stderr.flush() sys.stdout.flush() ExitCode = os.system(Command) os.chdir(PreviousDirectory) error cannot sys.stderr.flush() sys.stdout.flush() if ExitCode != 0: sys.exit(ExitCode) if not os.path.isdir("./obj"): Run(".", "mkdir ./obj") if not os.path.isfile("./obj/Makefile"): Run("./obj", "../gcc/configure") Run(".", "rm -rf ./obj/gmp") Run("./obj", "make configure-gmp") Repros in Python, not outside of Python? Why? That is the question. Other tidbits: flex actually fails to exec m4 either way, just that one way it manages to create lex.yy.c first. It error cannot find fails to exec m4 because gmp's configure has set M4=m4-not-needed. This is almost certainly a simple bug in gmp's configure. A fix would be to probe for external programs (yacc, lex), earlier, before it sets M4. Or unset M4 after it is done with it. But there is still something amiss, maybe Cygwin specific, maybe not. Oh, and whether or not gmp sets M4 varies somewhat on build/host/target. Usually, configuring gmp on its own, probably it is set. But within gcc, generally not, because gcc configures it with processor=none for reasons I don't understand.. I guess it'd be nice if flex printed what it was trying to run -- getenv("M4") and not just "m4". I'll follow up separately, at least gcc and gmp.. Still not completely solved. I do have a quick repro though, you can strip down the configure script a bunch and it repros in just a few seconds. Going through the strace logs....but need to read flex also for when it creates the output vs. running m4
lex; giving up #38867 [NEW]: configuerror: cannot find output from lex; giving up - PHP Bugs From: lucied21 at hotmail dot com Operating system: Fedora Core PHP version: 5.1.6 PHP Bug Type: Compile Failure Bug description: configure: error: cannot find output from lex; giving up Description: ------------ I wanna know how to configure this PHP in my system Fedora Core. I have installed flex, bison already in my system. Reproduce code: --------------- # ./configure --with-apxs2=/usr/local/apache2/bin/apxs loading cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for gcc... ... Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode September 18th,02:53 PM #1 #38867 [NEW]: configure: error: cannot find output from lex; giving up From: lucied21 at hotmail dot com Operating system: Fedora Core PHP version: 5.1.6 PHP Bug Type: Compile Failure Bug description: configure: error: cannot find output from lex; giving up Description: ------------ I wanna know how to configure this PHP in my system Fedora Core. I have installed flex, bison already in my system. Reproduce code: --------------- # ./configure --with-apxs2=/usr/local/apache2/bin/apxs loading cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking whether ln -s works... yes checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking for re2c... no configure: warning: You will need re2c 0.9.11 or later if you want to regenerate PHP prs. checking for gawk... gawk checkin