Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sandy-lcq opened this issue Jul 15, 2020 · 0 comments

Comments

@sandy-lcq
Copy link

sandy-lcq commented Jul 15, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant