milvus icon indicating copy to clipboard operation
milvus copied to clipboard

[Bug]:

Open lookou opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Environment

- Milvus version: master version 
- OS(Ubuntu or CentOS):  MacOS
- CPU/Memory: M1 MAX / 32G 
- GPU: 
- Others: 14.6 (23G80)
- llvm version:  16.0.6
- go version:  go1.21.4 darwin/arm64
- Conan version:  1.61.0

Current Behavior

c-ares/1.33.0: CMake command: cmake --build "/Users/xxx/.conan/data/c-ares/1.33.0///build/aa424c3b8d58a9506811f973948500f1f0993dbe/build/Release" '--' '-j10' /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferences.h:196:6: error: unknown type name 'AuthorizationRef' AuthorizationRef __nullable authorization ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferences.h:196:23: error: nullability specifier '_Nullable' cannot be applied to non-pointer type 'int' AuthorizationRef __nullable authorization ^ <built-in>:337:20: note: expanded from here #define __nullable _Nullable

when i compile it on M1 Max, it come out the error above. But i can compile c-ares 1.33 independently.

Expected Behavior

No response

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

lookou avatar Aug 26 '24 11:08 lookou

check this pr https://github.com/milvus-io/milvus/pull/35385

make sure you rollback grpc version to 1.50.1 and see how it works?

xiaofan-luan avatar Aug 26 '24 22:08 xiaofan-luan

/assign @lookou please retry as comments above.

yanliang567 avatar Aug 27 '24 05:08 yanliang567

/assign @lookou please retry as comments above.

Nothing change. The same error!

lookou avatar Sep 04 '24 02:09 lookou

this is related https://github.com/milvus-io/milvus/discussions/35614

xiaofan-luan avatar Sep 04 '24 18:09 xiaofan-luan

same as #35614

xiaofan-luan avatar Sep 04 '24 19:09 xiaofan-luan

The error SCPreferences.h:196:6: error: unknown type name 'AuthorizationRef' occurs because, when installing c-ares, there is an environment issue with SCPreferences.h in this code:

#if !TARGET_OS_IPHONE
#include <Security/Security.h>
#else // !TARGET_OS_IPHONE
typedef const struct AuthorizationOpaqueRef * AuthorizationRef;
#endif // !TARGET_OS_IPHONE

The solution is to adjust the compilation settings to ensure it can locate and reference this header file. And one workaround is to comment out other lines and retain typedef const struct AuthorizationOpaqueRef * AuthorizationRef;

//#if !TARGET_OS_IPHONE
//#include <Security/Security.h>
//#else // !TARGET_OS_IPHONE
typedef const struct AuthorizationOpaqueRef * AuthorizationRef;
//#endif // !TARGET_OS_IPHONE

tinswzy avatar Nov 06 '24 04:11 tinswzy

good to know that! thanks for the feedback. could you create a fix for that.

xiaofan-luan avatar Nov 06 '24 21:11 xiaofan-luan

good to know that! thanks for the feedback. could you create a fix for that.

Of course, I’ll look into it and see what needs to be done to fix it.

tinswzy avatar Nov 07 '24 02:11 tinswzy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

stale[bot] avatar Dec 08 '24 09:12 stale[bot]

SCPreferences.h:196:6: error: unknown type name 'AuthorizationRef'
                                        AuthorizationRef        __nullable      authorization

I got this error in the following situation:

  • xcode-select was set to use my XCode installation, which was version 14.
  • My XCode command line tools (installed separately) were version 16.

It was resolved by updating XCode to be version 16 as well.

mhsmith avatar Feb 10 '25 21:02 mhsmith

Hi @lookou ! do you solve the issue? same thing happens to me.

proost avatar Mar 17 '25 15:03 proost

1、If you llvm version < 16, please

brew install llvm@17
export LDFLAGS="-L/usr/local/opt/llvm@17/lib"
export CPPFLAGS="-I/usr/local/opt/llvm@17/include"

2、Delete all conan libraries

conan remove "*"

3、make,and good luck to you。

CharlesJames13586 avatar Jun 30 '25 09:06 CharlesJames13586

1、If you llvm version < 16, please

brew install llvm@17 export LDFLAGS="-L/usr/local/opt/llvm@17/lib" export CPPFLAGS="-I/usr/local/opt/llvm@17/include" 2、Delete all conan libraries

conan remove "*" 3、make,and good luck to you。

After looking around, I found this to be the most useful. So, the macOS compile dependencies for the M1/2/3/4 chip should be: go: >= 1.21 (this is fine) cmake: >= 3.26.4 (but cmake 4.x won't work, as it's incompatible with conan 1.x) llvm: >= 15 (tested only llvm 17 can work; llvm 20 is also incompatible with Conan 1.x) python: > 3.8 and <= 3.11 (this is fine)

lmzzzzz1 avatar Aug 20 '25 03:08 lmzzzzz1