prosyslab-classroom / cs348-information-security

62 stars 10 forks source link

[Question][Hw3] Make test fails #83

Closed miraliahmadli closed 3 years ago

miraliahmadli commented 3 years ago

I was trying to test my code but when I run make test command I get

make[1]: clang-10: No such file or directory
make[1]: *** [example2.ll] Error 1
make: *** [test] Error 2

I think problem is related to clang and llvm version. In the installation page of llvm-primer, it says install llvm version 10 using homebrew, but llvm 10 is not available on homebrew. Therefore, I installed llvm 11 (so my clang version is 11 as well). I am not sure if this causes the problem or not.

I also tried to run sanitizer as given in README page. I successfully managed to run until ./example1 part, but when I run this command, I got

Error: Cannot find /proc/self/exe

I am not exactly sure what those errors mean. Did anyone face the same issue or anyone knows how to solve these problems?

UPDATE

make test failed because Makefile uses clang-10 and opt-10 and LLVM 10 is not available for Homebrew. Second issue was caused because readlink is for Linux, and it can be fixed by using _NSGetExecutablePath see

I think it is impossible to run on Apple devices without Docker. By using provided docker image, problem was fixed.

miraliahmadli commented 3 years ago

Fixed make test by removing -10 parts (version numbers) from test/Makefile :) I am not sure if it okay to do.

But I still get Error: Cannot find /proc/self/exe error.

KihongHeo commented 3 years ago

Do not change any file arbitrarily other than the thing you should implement. All the homework will be auto graded. If it does not run in TA's machine, you will get no points.

I strongly recommend you use the provided environment if you are not sure.

jirheee commented 3 years ago

Maybe you should try using docker image which is provided. The environment is set by TAs, so there won't be any environment issues.

miraliahmadli commented 3 years ago

Where can I get the docker images or provided environment?

jirheee commented 3 years ago

The dockerfile is in the classroom repository.

Junseon00 commented 3 years ago

About the docker file and environment please see here, https://github.com/prosyslab-classroom/cs448-2021-spring/issues/1#issue-822720209