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 error on osx-arm64 #52

Open
munechika-koyo opened this issue Nov 12, 2024 · 4 comments
Open

Compile error on osx-arm64 #52

munechika-koyo opened this issue Nov 12, 2024 · 4 comments

Comments

@munechika-koyo
Copy link

Hello.

When I built the UDA conda package in #51 on an osx-arm64 M3 Mac laptop, I encountered C++ compile errors like:

error: cast from 'int (*)(XDR *, float *)' (aka 'int (*)(__rpc_xdr *, float *)') to 'xdrproc_t' (aka 'int (*)(__rpc_xdr *, void *, unsigned int)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]

The whole build log is shared by the URL link: https://app.warp.dev/block/Y9zBIX0aRzIpHZ6lkBwts3

I could avoid the above error by adding the compile option -Wno-cast-function-type into line 23 in source/CMakeLists.txt file:

add_definitions( -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-cast-function-type )

I would greatly appreciate it if you could address this issue.

@jholloc
Copy link
Collaborator

jholloc commented Nov 14, 2024

We regularly compile UDA with clang-19 on arm64 (including in the CI) and have not seen this issue before. It seems from the log you are defined a bunch of extra CXXFLAGS and CPPFLAGS - it's possible that some of these flags are causing the compiler to throw this error.

Would you be able to add this "-Wno-cast-function-type" to your CXXFLAGS? I would rather avoid turning off this warning for all code.

@munechika-koyo
Copy link
Author

Thank you for your response.
I tried to add it to CXXFLAGS, but the errors did not disappear somehow even though it can be seen in the log:https://app.warp.dev/block/shDp2SrcZvW2MmjIYhTnsL

Is there any dependency on the order of compiler args?

@jholloc
Copy link
Collaborator

jholloc commented Nov 14, 2024

Perhaps the required flag is -Wno-cast-function-type-mismatch ?

@munechika-koyo
Copy link
Author

That caused the same issue, unfortunately.

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

2 participants