Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where did INSTALL go? #402

Closed
nic-hartley opened this issue Nov 4, 2018 · 12 comments
Closed

Where did INSTALL go? #402

nic-hartley opened this issue Nov 4, 2018 · 12 comments

Comments

@nic-hartley
Copy link

nic-hartley commented Nov 4, 2018

From the README (emphasis mine):

The flex distribution contains the following files which may be of interest:

  • README - This file.
  • NEWS - current version number and list of user-visible changes.
  • INSTALL - basic installation information.

INSTALL no longer seems to exist -- I downloaded the latest release, tar xzf'd it, and in flex-2.6.4, there's no file called INSTALL. There isn't even a file containing INSTALL anywhere in its name. Has the file been renamed? Or is it just gone? Either way, the README should be updated.

@westes
Copy link
Owner

westes commented Nov 4, 2018 via email

@AndreyB22
Copy link

So what is the solution?
How to install flex?
Can't compile other libs without it, for example, gsoap
"Critical error: Cannot #import: soapcpp2 not compiled with flex (replace lex with flex)"

@xdavidliu
Copy link

for the record, I was able to install using the (completely non-obvious) instructions from this stackoverflow answer.

@cmsmcq
Copy link

cmsmcq commented Dec 17, 2019

Note that in addition to INSTALL, the readme file announces the presence of an ABOUT-NLS file with "description of internationalization support in flex".

@westes
Copy link
Owner

westes commented Dec 17, 2019

the ABOUT-NLS file is included in the flex distribution. (For the record, it's the standard GNU gettext created file).

@westes
Copy link
Owner

westes commented Dec 17, 2019

In terms of how to build flex:

  • From a flex source distribution (e.g. a file with a name like flex-2.6.4.tar.gz), the standard "./configure && make" will build flex for you. "make check" will run the test suite once flex has been built. (Note that this is the standard for automake/autoconf-managed projects.)
  • from the git repository or an archive of it (but you realy should not download those github-generated archives), run "./autogen.sh" first, but note that building from git requires a lot more of your development environment than starting with a flex source distribution. Unless you're contirbuting to flex itself, you probably don't want to do this.

If all you need is a binary of flex to let you build your application, consult your operating system's package manager or other software installation tooling. Likewise if you need the c++ header FlexLexer.h or the library libfl.

@ijf8090
Copy link

ijf8090 commented Mar 6, 2020

Running
Linux rincewind 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I had some install issues

  1. could not find INSTALL
  2. As suggested above ran
    ./configure
    Got
    configure: WARNING: texi2dvi: program not found: building pdf version of manual will not work
    checking for m4 that supports -P... configure: error: could not find m4 that supports -P
    Ignored the warning (nobody reads the manual
    ;0

installed m4 using sudo apt install m4
why is this necessary, what's in the m4 directory?

$ make
Making all in src
make[1]: Entering directory '/home/ian/Downloads/flex-2.6.4/src'
make all-am
make[2]: Entering directory '/home/ian/Downloads/flex-2.6.4/src'
./stage1flex -o stage1scan.c ./scan.l
Makefile:1696: recipe for target 'stage1scan.c' failed
make[2]: *** [stage1scan.c] Segmentation fault
make[2]: Leaving directory '/home/ian/Downloads/flex-2.6.4/src'
Makefile:546: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/ian/Downloads/flex-2.6.4/src'
Makefile:533: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Am now waaaay out of my comfort zone.

@GitMensch
Copy link
Contributor

why is this necessary, what's in the m4 directory?

The m4 directory has macros in that are used for building the configure script.
When building from a release tarball (that is the result of make dist) it won't be needed.

see #337 on the process of automated tarballs, https://github.com/Mightyjo/flex/releases/tag/v2.6.4-DUMMY seems to have the result with 2.6.4 (there is no INSTALL file in there but you should be fine with ./configure && make -j $(nproc) && sudo make install using that.

... and yes, I still agree that it would be good to re-add the INSTALL file (possibly with new content) and if this is not done at least adjust the README.md which still references that file.

@Mightyjo
Copy link
Contributor

The INSTALL file was previously provided by autotools. We treated it as a build product that only existed in the distribution tarball.

Looks like the autotools project both stopped adding INSTALL to project directories and removed the test for its presence from 'make distcheck'.

Need a new copy to commit, probably including a note about building maintainer sources with autogen.sh. Need to remove INSTALL from .gitignore at the point. Need to add INSTALL to EXTRA_DIST in Makefile.am.

@Mightyjo
Copy link
Contributor

A note for myself: the default INSTALL file should be packaged with autoconf.

Also, I shouldn't have blamed autotools for removing the behavior. We changed our "strictness" in configure.ac from gnu to foreign, as westes noted. Don't want to switch back to gnu because we don't follow all the conventions.

@westes
Copy link
Owner

westes commented Sep 27, 2022

I'll work up a pr shortly. Thank you, @Mightyjo.

westes added a commit that referenced this issue Sep 27, 2022
Since GNU autotools no longer provides a stock INSTALLATION file, we provide one that speaks to flex specifically.

fixes #402
@westes
Copy link
Owner

westes commented Sep 27, 2022

@Mightyjo. If you have thoughts on the content in INSTALL as #542 currently has it, I'd appreciate your comments. (I do intend it to be aimed at people familiar with building software as folk new to things probably are poorly served by starting with something so far down in the tolchain as flex is.)

@westes westes closed this as completed in 1c49f7e Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants