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

build failure on debian 10? #124

Closed
inorton opened this issue Mar 25, 2022 · 3 comments
Closed

build failure on debian 10? #124

inorton opened this issue Mar 25, 2022 · 3 comments

Comments

@inorton
Copy link

inorton commented Mar 25, 2022

Hi, trying to build locally, I do:

./bootstrap
./configure
make

bootstrap and configure succeed without errors or warnings, but make fails part way in with:

  LEX      configfile.c
  CC       pcscd-configfile.o
gcc: error: ./configfile.c: No such file or directory
gcc: fatal error: no input files

@LudovicRousseau
Copy link
Owner

It works for me.
Check if the file configfile.c has been created.
Check you have flex installed.

@inorton
Copy link
Author

inorton commented Mar 25, 2022

Thanks, missing flex is the problem, should bootstrap or configure catch that?

@LudovicRousseau
Copy link
Owner

I added a Dependencies section on https://pcsclite.apdu.fr/

eli-schwartz added a commit to eli-schwartz/CCID that referenced this issue Jun 11, 2024
This explicitly reverts commit eec7cdf
because it was a bad idea.

The motivating bug report was LudovicRousseau/PCSC#124
and the issue there occurred when building from a git clone, running
./bootstrap && ./configure && make, and having:

- configure succeed
- make "succeeeds" at having $LEX run, do nothing and fail to generate
  required sources
- compiling nonexistent files fail with highly confusing errors

The autoconf manual has always documented the correct way to handle this
is to check if lex is unavailable, and set it to the famous automake
wrapper "missing", which checks if a program is missing at build time
rather than at ./configure time, and fails the build if the rule cannot
be run. This means:

When building from a git clone, if flex is not available then
- configure succeeds
- make fails to run $LEX, and tells you to install flex

The previous attempt to fix the highly confusing error instead resulted
in configure erroring out, and saying flex is required, even when it is
*not* required because a `make dist` tarball was used, which contains
pregenerated tokenparser.c for the express purpose of making flex
unnecessary.

See autoconf documentation on $LEX:
https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Particular-Programs.html#index-AC_005fPROG_005fLEX-1

And automake documentation on why to use "missing":
https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html
eli-schwartz added a commit to eli-schwartz/PCSC that referenced this issue Jun 11, 2024
This explicitly reverts commit 3f89340
because it was a bad idea.

The motivating bug report was LudovicRousseau#124
and the issue there occurred when building from a git clone, running
./bootstrap && ./configure && make, and having:

- configure succeed
- make "succeeeds" at having $LEX run, do nothing and fail to generate
  required sources
- compiling nonexistent files fail with highly confusing errors

The autoconf manual has always documented the correct way to handle this
is to check if lex is unavailable, and set it to the famous automake
wrapper "missing", which checks if a program is missing at build time
rather than at ./configure time, and fails the build if the rule cannot
be run. This means:

When building from a git clone, if flex is not available then
- configure succeeds
- make fails to run $LEX, and tells you to install flex

The previous attempt to fix the highly confusing error instead resulted
in configure erroring out, and saying flex is required, even when it is
*not* required because a `make dist` tarball was used, which contains
pregenerated tokenparser.c for the express purpose of making flex
unnecessary.

See autoconf documentation on $LEX:
https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Particular-Programs.html#index-AC_005fPROG_005fLEX-1

And automake documentation on why to use "missing":
https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html
LudovicRousseau pushed a commit to LudovicRousseau/CCID that referenced this issue Jun 11, 2024
This explicitly reverts commit eec7cdf
because it was a bad idea.

The motivating bug report was LudovicRousseau/PCSC#124
and the issue there occurred when building from a git clone, running
./bootstrap && ./configure && make, and having:

- configure succeed
- make "succeeeds" at having $LEX run, do nothing and fail to generate
  required sources
- compiling nonexistent files fail with highly confusing errors

The autoconf manual has always documented the correct way to handle this
is to check if lex is unavailable, and set it to the famous automake
wrapper "missing", which checks if a program is missing at build time
rather than at ./configure time, and fails the build if the rule cannot
be run. This means:

When building from a git clone, if flex is not available then
- configure succeeds
- make fails to run $LEX, and tells you to install flex

The previous attempt to fix the highly confusing error instead resulted
in configure erroring out, and saying flex is required, even when it is
*not* required because a `make dist` tarball was used, which contains
pregenerated tokenparser.c for the express purpose of making flex
unnecessary.

See autoconf documentation on $LEX:
https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Particular-Programs.html#index-AC_005fPROG_005fLEX-1

And automake documentation on why to use "missing":
https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html
LudovicRousseau pushed a commit that referenced this issue Jun 11, 2024
This explicitly reverts commit 3f89340
because it was a bad idea.

The motivating bug report was #124
and the issue there occurred when building from a git clone, running
./bootstrap && ./configure && make, and having:

- configure succeed
- make "succeeeds" at having $LEX run, do nothing and fail to generate
  required sources
- compiling nonexistent files fail with highly confusing errors

The autoconf manual has always documented the correct way to handle this
is to check if lex is unavailable, and set it to the famous automake
wrapper "missing", which checks if a program is missing at build time
rather than at ./configure time, and fails the build if the rule cannot
be run. This means:

When building from a git clone, if flex is not available then
- configure succeeds
- make fails to run $LEX, and tells you to install flex

The previous attempt to fix the highly confusing error instead resulted
in configure erroring out, and saying flex is required, even when it is
*not* required because a `make dist` tarball was used, which contains
pregenerated tokenparser.c for the express purpose of making flex
unnecessary.

See autoconf documentation on $LEX:
https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Particular-Programs.html#index-AC_005fPROG_005fLEX-1

And automake documentation on why to use "missing":
https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html
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

2 participants