compiledb icon indicating copy to clipboard operation
compiledb copied to clipboard

compiledb not working with autoconf

Open aghag10 opened this issue 5 years ago • 5 comments

Hi,

I have 2 projects - one with Makefile and other with autoconf/automake. I'm able to successfully create a database with Makefile but not with automake. It's failing to read local macros generated by autoconf with error "command not found"

AM I missing something?

Thanks!

aghag10 avatar Jan 17 '19 19:01 aghag10

Hi, could you please provide more details? The exact output? Which project? (if they are open source, please provide their URLs so that I can have it a try) Thanks for reporting it.

nickdiego avatar Jan 21 '19 00:01 nickdiego

OpenJDK

Archengius avatar Mar 15 '19 14:03 Archengius

Hi, could you please provide more details? The exact output? Which project? (if they are open source, please provide their URLs so that I can have it a try) Thanks for reporting it.

Sorry, I missed your message. It's not an open source project. I'm pasting partial output - src/cpp/Makefile.am:32: error: * does not appear in AM_CONDITIONAL : :

make[3]: *** [../Makefile.in] Error 1 configure.ac:55: error: possibly undefined macro: AC_MSG_ERROR If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. make[3]: *** [../configure] Error 1 make[3]: Failed to remake makefile `Makefile'.

aghag10 avatar Mar 15 '19 17:03 aghag10

Hi, I am also experience similar problem. I want to create compile_commands.json for GNU coreutils (https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz), but I am getting an empty json file. To reproduce:

wget https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz && tar xfj coreutils-8.31.tar.xz && cd coreutils-8.31 ./configure compiledb -n make cat compile_commands.json []

Platform: macOS Mojave, compiledb 0.10.0

unixnme avatar Jun 21 '19 05:06 unixnme

It seems this happens when make is called recursively. As a workaround, I use make V=1 | compiledb.

AleXoundOS avatar Jan 05 '22 10:01 AleXoundOS