flex icon indicating copy to clipboard operation
flex copied to clipboard

Where did INSTALL go?

Open nic-hartley opened this issue 5 years ago • 7 comments

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.

nic-hartley avatar Nov 04 '18 19:11 nic-hartley

Good catch. The file itself contains the generic installation information, so there's not much there that is different about flex. That being said, yes, either reference to it should be removed or it should be re-included. I expect this is a result of changing the project to a "foreign" project from automake's point of view. I'll have to dig to see what the options are.

On Sunday, 4 November 2018, 11:42 am -0800, Nic Hartley [email protected] wrote:

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.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/westes/flex/issues/402

-- Will Estes [email protected]

westes avatar Nov 04 '18 19:11 westes

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)"

AndreyB22 avatar Mar 27 '19 16:03 AndreyB22

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

xdavidliu avatar Dec 08 '19 01:12 xdavidliu

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

cmsmcq avatar Dec 17 '19 22:12 cmsmcq

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

westes avatar Dec 17 '19 22:12 westes

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.

westes avatar Dec 17 '19 22:12 westes

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.

ijf8090 avatar Mar 06 '20 18:03 ijf8090

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.

GitMensch avatar Sep 26 '22 19:09 GitMensch

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 avatar Sep 27 '22 11:09 Mightyjo

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.

Mightyjo avatar Sep 27 '22 15:09 Mightyjo

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

westes avatar Sep 27 '22 18:09 westes

@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 avatar Sep 27 '22 19:09 westes