You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I just started trying this library. I'm not sure if I've encountered a real issue on Mac and Linux. when I build with CMake, the produced module is named with the suffix .so.so. To proceed I have to add set(CMAKE_SHARED_MODULE_SUFFIX "").
Is this intended behavior? I tried pybind11 with the same setup and did not encounter this issue.
CMake version : 4.0.3
OS : Mac OS & Archlinux
Compiler : Clang17, clang21, gcc 15.1
code:
#include<nanobind/nanobind.h>intadd(int a, int b) { return a + b; }
NB_MODULE(my_ext, m) {
m.def("add", &add);
}
CMakeLists.txt
cmake_minimum_required(VERSION 3.19)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(Python 3.8 COMPONENTS Interpreter Development.Module REQUIRED)
project(my_ext LANGUAGES C CXX)
# set(CMAKE_SHARED_MODULE_SUFFIX "") # I must have this to remove one duplicated .soadd_subdirectory(3rdparty/nanobind)
nanobind_add_module(${PROJECT_NAME} main.cpp)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I just started trying this library. I'm not sure if I've encountered a real issue on Mac and Linux. when I build with CMake, the produced module is named with the suffix
.so.so. To proceed I have to addset(CMAKE_SHARED_MODULE_SUFFIX "").Is this intended behavior? I tried pybind11 with the same setup and did not encounter this issue.
CMake version : 4.0.3
OS : Mac OS & Archlinux
Compiler : Clang17, clang21, gcc 15.1
code:
CMakeLists.txt
Beta Was this translation helpful? Give feedback.
All reactions