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

[BUILD] MacOS does not support version-script #7495

Closed
zml1206 opened this issue Oct 12, 2024 · 9 comments · Fixed by #7497
Closed

[BUILD] MacOS does not support version-script #7495

zml1206 opened this issue Oct 12, 2024 · 9 comments · Fixed by #7497
Labels

Comments

@zml1206
Copy link
Contributor

zml1206 commented Oct 12, 2024

Problem description

MacOS does not support version-script, it seems to be caused by #7209

System information

dev/info.sh: line 47: lscpu: command not found

Gluten Version: 1.3.0-SNAPSHOT
Commit: f46f86d
CMake Version: 3.30.5
System: Darwin-23.5.0
Arch: x86_64
CPU Name:
C++ Compiler: /Library/Developer/CommandLineTools/usr/bin/c++
C++ Compiler Version: 15.0.0.15000309
C Compiler: /Library/Developer/CommandLineTools/usr/bin/cc
C Compiler Version: 15.0.0.15000309
CMake Prefix Path: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr;/usr/local;/usr;/;/usr/local/Cellar/cmake/3.30.5;/usr/local;/usr/X11R6;/usr/pkg;/opt;/sw;/opt/local

CMake log

[ 48%] Building CXX object core/CMakeFiles/gluten.dir/utils/ObjectStore.cc.o
[ 50%] Building CXX object core/CMakeFiles/gluten.dir/jni/JniError.cc.o
[ 51%] Building CXX object core/CMakeFiles/gluten.dir/jni/JniCommon.cc.o
In file included from /Users/zml/Desktop/git_hub/incubator-gluten1/cpp/core/jni/JniCommon.cc:18:
/Users/zml/Desktop/git_hub/incubator-gluten1/cpp/core/jni/JniCommon.h:283:12: warning: private field 'runtime_' is not used [-Wunused-private-field]
  Runtime* runtime_;
           ^
1 warning generated.
[ 52%] Linking CXX shared library ../releases/libgluten.dylib
ld: unknown options: --version-script=/Users/zml/Desktop/git_hub/incubator-gluten1/cpp/core/symbols.map
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [releases/libgluten.dylib] Error 1
make[1]: *** [core/CMakeFiles/gluten.dir/all] Error 2
make: *** [all] Error 2
@zml1206 zml1206 added the triage label Oct 12, 2024
@zml1206
Copy link
Contributor Author

zml1206 commented Oct 12, 2024

cc @PHILO-HE

@PHILO-HE
Copy link
Contributor

@zml1206, thanks for raising this issue! I will try to fix it.

@zml1206
Copy link
Contributor Author

zml1206 commented Oct 12, 2024

How about directly filter out macOS, I tried it and it worked, @PHILO-HE

IF (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
  target_link_options(
    gluten PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)
endif()

@PHILO-HE
Copy link
Contributor

How about directly filter out macOS, I tried it and it worked

IF (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
  target_link_options(
    gluten PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)
endif()

@zml1206, seems build on macOS also needs to hide those symbols. Otherwise, conflict issue can also happen when glog is statically linked to libgluten.so and libvelox.so.

@PHILO-HE
Copy link
Contributor

@zml1206, you can create a pr to firstly fix this issue by adding the mentioned check.

@zml1206
Copy link
Contributor Author

zml1206 commented Oct 12, 2024

@zml1206, you can create a pr to firstly fix this issue by adding the mentioned check.

OK, I'll do it right away.

@zhouyuan
Copy link
Contributor

The macOS code path is not covered in CI/CD TBH

@zml1206
Copy link
Contributor Author

zml1206 commented Oct 12, 2024

The macOS code path is not covered in CI/CD TBH

Is there plan to cover it? Local compilation of new versions often fails.

@zhouyuan
Copy link
Contributor

@zml1206
It's not planned for now - but we do find Velox has some macos based CI/CD, gluten should be able to setup one following their design. We may bring this up after we deprecated some old Spark unit tests thus the CI resource will be enough at that time

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

Successfully merging a pull request may close this issue.

3 participants