mcelog icon indicating copy to clipboard operation
mcelog copied to clipboard

compile failed for ./cases/stress/hwpoison/tools/fs-metadata/k-tree-gen.c

Open sandy-lcq opened this issue 5 years ago • 0 comments

Hi,

There are 2 problems:

  1. build error: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
  2. above build error is hided since not strong enough Makefile

here is log:

| ^~~~~~~~~~ In file included from build/tmp-glibc/work/core2-64-wrs-linux/mce-test/20190917+gitAUTOINC+7643baf6c3-r0/recipe-sysroot/usr/include/fcntl.h:329, from k-tree-gen.c:32: In function 'open', inlined from 'k_tree_gen.part.0' at k-tree-gen.c:63:8: build/tmp-glibc/work/core2-64-wrs-linux/mce-test/20190917+gitAUTOINC+7643baf6c3-r0/recipe-sysroot/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments 50 | __open_missing_mode (); | ^~~~~~~~~~~~~~~~~~~~~~ : recipe for target 'k-tree-gen.o' failed make[5]: *** [k-tree-gen.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[5]: Leaving directory '/build/tmp-glibc/work/core2-64-wrs-linux/mce-test/20190917+gitAUTOINC+7643baf6c3-r0/git/cases/stress/hwpoison/tools/fs-metadata' make[5]: Entering directory '/build/tmp-glibc/work/core2-64-wrs-linux/mce-test/20190917+gitAUTOINC+7643baf6c3-r0/git/cases/stress/hwpoison/tools/page-poisoning'

k-tree-gen.o build failed, since error call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments

but in below Makefile, usually, fs-metadata is build first, and then page-poisoning, although fs-metadata failed, but page-poisoning successed, so the whole build looks successed, but actually, target k-tree-gen not generated. From above log, we can see that fs-metadata failed, but page-poisoning will continue to build

SUBDIRS ?= fs-metadata page-poisoning all: @for i in ${SUBDIRS}; do
${MAKE} -C $$i $@;
done

sandy-lcq avatar Jul 15 '20 05:07 sandy-lcq