Bug 84715 - "./configure --disable-multilib && make" fails due to "g++: error: gengtype-lex.c: No such file or directory"
Summary: "./configure --disable-multilib && make" fails due to "g++: error: gengtype-l...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-05 14:00 UTC by krichter
Modified: 2018-03-05 15:04 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description krichter 2018-03-05 14:00:00 UTC
Running `./configure --disable-multilib && make` fails due to

```
g++: error: gengtype-lex.c: No such file or directory
g++: fatal error: no input files
compilation terminated.
make[3]: *** [build/gengtype-lex.o] Error 1
make[3]: *** Waiting for unfinished jobs....
Makefile:2666: recipe for target 'build/gengtype-lex.o' failed
```

on a pretty empty docker image. I recreated the issue on Ubuntu 14.04, 16.04, 17.10 and 18.04 preview as well as Debian oldstable, stable and testing inside GitLab CI, see https://gitlab.com/krichter/gcc/pipelines/18408388 for details and [.gitlab-ci.yml](https://gitlab.com/krichter/gcc/blob/gitlab-ci/.gitlab-ci.yml) for the build instructions.

In case this is a user error, it'd be nice if `configure` would check that all conditions for the configured build are fulfilled and otherwise fail with a helpful error message.

experienced with 4225b5dcdbcadaa3d7605582f735d02b6fc50cdf
Comment 1 Jonathan Wakely 2018-03-05 14:07:30 UTC
Don't run ./configure in the source dir:
https://gcc.gnu.org/wiki/FAQ#configure

If you're building a snapshot or modifying the source, you need Flex:
https://gcc.gnu.org/install/prerequisites.html#Tools_002fpackages-necessary-for-modifying-GCC

We don't want the configure script to require flex, because most users don't need it. If you're building a snapshot (not an official release) or modifying the source then you're expected to read the docs and install the required prerequisites.
Comment 2 Richard Biener 2018-03-05 15:04:49 UTC
As documented.