Open zacky1972 opened 5 years ago
This problem is fixed according to this: https://qiita.com/yoya/items/630c991a98e4554e6e87
I guess Pelemay should check whether /usr/include
exists or not on Mac OS.
If not, Pelemay should put a message to reinstall command line tools at that directory.
I found this article: https://qiita.com/yoya/items/c0b26cba3c040c581643
This said, /usr/include is deprecated by Catalina and Xcode 11.
The code
{usr_include_org, usr_lib_org} = {"/usr/include", "/usr/lib"}
{usr_include, usr_lib} =
case :os.type() do
{:unix, :darwin} ->
if is_nil(System.find_executable("xcrun")) do
{usr_include_org, usr_lib_org}
else
{result, error_code} = System.cmd("xcrun", ["--sdk", "macosx", "--show-sdk-path"])
if error_code != 0 do
{usr_include_org, usr_lib_org}
else
p = result |> String.trim
{p <> usr_include_org, p <> usr_lib_org}
end
end
_ -> {usr_include_org, usr_lib_org}
end
will give the "/usr/include" and "/usr/lib" paths.
@cflags_includes
in lib/pelemay/generator/builder.ex should be replaced into them.
Describe the bug
Error occurs when Clang compiled from the original site, not Apple Clang
To Reproduce Steps to reproduce the behavior:
Expected behavior Compilation and benchmarking run successful.
Screenshots None.
Desktop (please complete the following information):
elixir --version
): 1.9.2 OTP 22uname -a
): macOS Mojaveclang -v
):Additional context Compilation options may be wrong.