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

issues when "ragel" is missing #2

Closed
sandynomad opened this issue Jan 4, 2021 · 2 comments · Fixed by #6
Closed

issues when "ragel" is missing #2

sandynomad opened this issue Jan 4, 2021 · 2 comments · Fixed by #6

Comments

@sandynomad
Copy link

During configuration (./configure) a Makefile variable is defined:

RAGEL = sh m4/missing-dev-prog.sh ragel

This variable is executed in the sub-directory drmaa_utils however in this directory there is no "m4" directory thus if ragel is missing then the following error is reported during compilation:

$ make
make  all-recursive
make[1]: Entering directory `/home/wickhagj/git/slurm-drmaa/drmaa_utils'
Making all in drmaa_utils
make[2]: Entering directory `/home/wickhagj/git/slurm-drmaa/drmaa_utils/drmaa_utils'
sh m4/missing-dev-prog.sh ragel  -o timedelta.c timedelta.rl
sh: m4/missing-dev-prog.sh: No such file or directory
make[2]: *** [timedelta.c] Error 127
make[2]: Leaving directory `/home/wickhagj/git/slurm-drmaa/drmaa_utils/drmaa_utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wickhagj/git/slurm-drmaa/drmaa_utils'
make: *** [all] Error 2

The simplest change is to apply this patch:

--- drmaa_utils/configure.ac.orig	2021-01-04 21:07:26.423428000 +0300
+++ drmaa_utils/configure.ac	2021-01-04 21:13:49.098388000 +0300
@@ -65,7 +65,7 @@
 # code generation tools:
 AC_PROG_YACC
 AX_GPERF
-AC_CHECK_PROGS([RAGEL], [ragel], [sh m4/missing-dev-prog.sh ragel])
+AC_CHECK_PROGS([RAGEL], [ragel], [sh ../m4/missing-dev-prog.sh ragel])
 
 # reStructuredText processing:
 AX_DOCUTILS

however ideally the configuration step should fail if ragel is missing.

Also, in drmaa-utils the Makefile.am includes the conditional:

if DEVELOPER_MODE
CLEANFILES = $(BUILT_SOURCES)
endif

The file timedelta.c was never removed using a "make clean" or "make distclean". This caused narrowing down the ragel issue to take a little longer than usual due to unexpected behaviour.

@natefoo
Copy link
Owner

natefoo commented Oct 7, 2021

Thanks for digging into this, I always wondered about this myself but never looked in to the cause (it's not a problem as long as ragel is installed when you run the autotools generation, which you have to have in order to generate the source dist successfully in the first place).

@natefoo
Copy link
Owner

natefoo commented Oct 7, 2021

The file timedelta.c was never removed using a "make clean" or "make distclean". This caused narrowing down the ragel issue to take a little longer than usual due to unexpected behaviour.

I believe this behavior is correct, since this source is generated with the distribution tarball. If make clean or make distclean removed it without --enable-development, then it would break regular usage of the source distribution.

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

Successfully merging a pull request may close this issue.

2 participants