resurrecting-open-source-projects / dcfldd

Enhanced version of dd for forensics and security
GNU General Public License v2.0
90 stars 19 forks source link

./configure: line 5434: syntax error near unexpected token `BASH_COMPLETION,' #19

Closed bdrung closed 7 months ago

bdrung commented 11 months ago

On Ubuntu 23.10 configure fails for a git checkout:

$ git clone https://github.com/resurrecting-open-source-projects/dcfldd.git
$ cd dcfldd/
$ ./autogen.sh 
configure.ac:48: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:48: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:48: the top level
configure.ac:33: installing './compile'
configure.ac:29: installing './config.guess'
configure.ac:29: installing './config.sub'
configure.ac:26: installing './install-sh'
configure.ac:26: installing './missing'
src/Makefile.am: installing './depcomp'

Done. You can use the 'clean' option to vanish the source code.
Example of use: $ ./autogen clean
$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
./configure: line 3248: PKG_PROG_PKG_CONFIG: command not found
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for egrep... (cached) /usr/bin/grep -E
checking for an ANSI C-conforming const... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for off_t... yes
checking for size_t... yes
./configure: line 5434: syntax error near unexpected token `BASH_COMPLETION,'
./configure: line 5434: `    PKG_CHECK_MODULES(BASH_COMPLETION, bash-completion >= 2.0,'
davidpolverari commented 11 months ago

Thanks for reporting this issue. pkg-config is required during build since https://github.com/resurrecting-open-source-projects/dcfldd/commit/055d4257123736f5f14b7937130607418a3eb378. Please, install pkg-config and execute ./autogen.sh and ./configure again. I tested it here and that solved the problem. Please let us know if it worked for you. Also, I'm going to update the documentation on dependencies.

bdrung commented 11 months ago

I have retested with installing pkg-config:

schroot-wrapper -c mantic -p autoconf,automake,ca-certificates,pkg-config,git

Then running ./configure works. I suggest to add a check to autogen.sh for pkg-config being present.