https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98318
--- Comment #7 from Hao Liu <hliu at amperecomputing dot com> --- I found that: 1. "make -j1" can pass, but "make -j8" always fails. It seems something wrong with parallel build 2. When "make -j8" failed, if I try "make -j8" again, it can pass. > What happens if you cd into the libcody obj directory and try a 'make' there? > (after you've hit the failure). I tried "make -j8" and libcody.a can be built successfully. This is why the 2nd "make -j8" try can pass. > What does that dir's config.log look like? The config.log look OK, as "make -j1" can always work well. I compared config.log of Ubuntu vs Centos, they are similar. The tail lines of config.log: --- /* confdefs.h */ #define PACKAGE_NAME "codylib" #define PACKAGE_TARNAME "codylib" #define PACKAGE_VERSION "0.0" #define PACKAGE_STRING "codylib 0.0" #define PACKAGE_BUGREPORT "github.com/urnathan/libcody" #define PACKAGE_URL "" #define BUGURL "github.com/urnathan/libcody" #define NMS_CHECKING 0 configure: exit 0 --- > The toplevel make knows that libcody must be built before gcc. So the problem seems to be why libcody.a is not built. The build log of "make -j8" on CentOS is strange, as it enters build/libcody/ and then leave the dir without doing anything. The log is as following: --- $ grep "libcody" out-j8.log checking for memchr... mkdir -p -- ./libcody checking for unistd.h... Configuring in ./libcody checking bugurl... github.com/urnathan/libcody checking for strtol... make[2]: Entering directory '.../build/libcody' checking whether gcc hidden aliases work... make[2]: Leaving directory '.../build/libcody' make[2]: *** No rule to make target '../libcody/libcody.a', needed by 'cc1-checksum.c'. Stop. --- It seems nothing happenend afer entering build/libcody, no building is triggered in build/libcody (If it is triggered, it should success just as manually run "make -j8" in build/libcody). The log of success job is: --- $ grep "libcody" out-j1.log mkdir -p -- ./libcody Configuring in ./libcody checking bugurl... github.com/urnathan/libcody make[2]: Entering directory '/home/ec2-user/gcc_tmp/build/libcody' g++ -g -O2 -fno-enforce-eh-specs -fno-stack-protector -fno-threadsafe-statics -fno-exceptions -fno-rtti -fdebug-prefix-map=../../gcc/libcody/= -W -Wall -include config.h -I../../gcc/libcody \ -MMD -MP -MF buffer.d -c -o buffer.o ../../gcc/libcody/buffer.cc ... ar -cr libcody.a buffer.o client.o fatal.o netclient.o netserver.o resolver.o packet.o server.o ranlib libcody.a make[2]: Leaving directory '.../build/libcody' --- Nathan, do you have any idea why libcody.a is not built with "make -j8"? It seems configure is OK but something wrong with parallel build. Other libraries (e.g. gmp, libdecnumber) don't have such problem. Thanks very much.