Menu

#1280 parallel build fatal error: soapcpp2_yacc.h: No such file or directory

v1.0 (example)
closed-fixed
None
5
2020-05-23
2020-05-19
No

make -j$(nproc) fails on multicore machines with the following error:

...
gcc -DHAVE_CONFIG_H -I. -I../..   -Os -fomit-frame-pointer -DWITH_BISON -DWITH_FLEX  -DSOAPCPP2_IMPORT_PATH="\"/usr/share/gsoap/import\"" -DLINUX -Os -fomit-frame-pointer -D_GNU_SOURCE -MT soapcpp2-soapcpp2.o -MD -MP -MF .deps/soapcpp2-soapcpp2.Tpo -c -o soapcpp2-soapcpp2.o `test -f 'soapcpp2.c' || echo './'`soapcpp2.c
error2.c:39:10: fatal error: soapcpp2_yacc.h: No such file or directory
   39 | #include "soapcpp2_yacc.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
init2.c:39:10: fatal error: soapcpp2_yacc.h: No such file or directory
   39 | #include "soapcpp2_yacc.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:535: soapcpp2-error2.o] Error 1
make[4]: *** Waiting for unfinished jobs....
symbol2.c:40:10: fatal error: soapcpp2_yacc.h: No such file or directory
   40 | #include "soapcpp2_yacc.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:549: soapcpp2-init2.o] Error 1
make[4]: *** [Makefile:521: soapcpp2-symbol2.o] Error 1

Fix is trivial. From Gentoo:

--- a/gsoap/src/Makefile.am
+++ b/gsoap/src/Makefile.am
@@ -10,11 +10,13 @@ AUTOMAKE_OPTIONS = foreign 1.4
 AM_YFLAGS=-d -v
 AM_LFLAGS=$(LEX_FLAGS)

+BUILT_SOURCES = soapcpp2_yacc.h
+
 bin_PROGRAMS=soapcpp2

 soapcpp2_CFLAGS=$(BISON_DEFINE) $(LEX_DEFINE) $(C_DEBUG_FLAGS) $(SOAPCPP2_IMPORTPATH) -D$(platform)
 soapcpp2_LDADD=$(YACC_LIB) $(LEXLIB)
-soapcpp2_SOURCES= soapcpp2_yacc.y soapcpp2_yacc.h soapcpp2_lex.l symbol2.c error2.c init2.c soapcpp2.c
+soapcpp2_SOURCES= soapcpp2_yacc.y soapcpp2_lex.l symbol2.c error2.c init2.c soapcpp2.c

 CLEANFILES= *~ soapcpp2_lex.c soapcpp2_yacc.c soapcpp2_yacc.h soapcpp2_yacc.output

Discussion

  • Robert van Engelen

    Thanks for the feedback. Will be fixed today.

     
  • Robert van Engelen

    • status: open --> pending
    • assigned_to: Robert van Engelen
     
  • Robert van Engelen

    • status: pending --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB