We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 oneflow from source in ubuntu22.04 with libudev-dev installed, after install oneflow, exec python3 -m oneflow will get this error:
python3 -m oneflow
# python3 -m oneflow Traceback (most recent call last): File "/usr/local/lib/python3.10/runpy.py", line 187, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/local/lib/python3.10/runpy.py", line 146, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/local/lib/python3.10/runpy.py", line 110, in _get_module_details __import__(pkg_name) File "/workspace/oneflow/python/oneflow/__init__.py", line 26, in <module> import oneflow._oneflow_internal ImportError: /workspace/oneflow/build/liboneflow.so: undefined symbol: udev_unref
A short description about the bug/issue
cd /workspace && git clone https://github.com/Oneflow-Inc/oneflow.git && cd oneflow && git checkout v1.0.0 apt update && apt install -y libopenblas-dev nasm g++ gcc python3-pip cmake autoconf libtool mkdir build cd build cmake .. -C ../cmake/caches/cn/cuda.cmake make -j$(nproc)
python3 -m oneflow --doctor
hwloc is built as libhwloc.a, and liboneflow.so linked to libhwloc.a. When libudev-dev is installed, according to hwloc.pc:
# cat hwloc.pc prefix=/workspace/oneflow/build/third_party_install/hwloc exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: hwloc Description: Hardware locality detection and management library Version: 2.4.1rc3-git Requires.private: pciaccess Cflags: -I${includedir} Libs: -L${libdir} -lhwloc Libs.private: -lm -ludev -L/workspace/oneflow/build/third_party_install/pciaccess/lib -lpciaccess -lpthread
link to hwloc should add Libs.private, which include udev. while in cmake/third_party.cmake, hwloc is linked without libraries in Libs.private.
The text was updated successfully, but these errors were encountered:
if udev for hwloc is not needed,maybe can be fixed by:
diff --git a/cmake/third_party/hwloc.cmake b/cmake/third_party/hwloc.cmake index 87ba638bd..07b29226d 100644 --- a/cmake/third_party/hwloc.cmake +++ b/cmake/third_party/hwloc.cmake @@ -90,7 +90,7 @@ if(BUILD_HWLOC) CONFIGURE_COMMAND ${HWLOC_SOURCE_DIR}/src/hwloc/autogen.sh COMMAND ${HWLOC_SOURCE_DIR}/src/hwloc/configure --prefix=${HWLOC_INSTALL} PKG_CONFIG_PATH=${PCIACCESS_INSTALL}/lib/pkgconfig --disable-libxml2 --enable-static - --enable-shared=no + --enable-shared=no --disable-libudev BUILD_COMMAND make -j${PROC_NUM} CFLAGS=${HWLOC_CFLAGS} BUILD_BYPRODUCTS ${ONEFLOW_HWLOC_STATIC_LIBRARIES} INSTALL_COMMAND make install
Sorry, something went wrong.
No branches or pull requests
Summary
Build oneflow from source in ubuntu22.04 with libudev-dev installed, after install oneflow, exec
python3 -m oneflow
will get this error:A short description about the bug/issue
Code to reproduce bug
System Information
python3 -m oneflow --doctor
):1.0.0hwloc is built as libhwloc.a, and liboneflow.so linked to libhwloc.a. When libudev-dev is installed, according to hwloc.pc:
link to hwloc should add Libs.private, which include udev. while in cmake/third_party.cmake, hwloc is linked without libraries in Libs.private.
The text was updated successfully, but these errors were encountered: