lavenklau / homo3d

An Optimized, Easy-to-use, Open-source GPU Solver for Large-scale Inverse Homogenization Problems
GNU General Public License v2.0
45 stars 13 forks source link

无法安装环境 #1

Closed XuGuang178 closed 1 year ago

XuGuang178 commented 1 year ago

直接输入conda env create -f environment.yaml后显示报错,这大概是因为文件里没有.yaml,但输入conda env create -f environment.yml后还是无法安装,单独安装依赖项时发现openvdb也无法安装

lavenklau commented 1 year ago

请问有相关错误信息吗? @XuGuang178

XuGuang178 commented 1 year ago

是不是只能在linux中安装,我是在window中安装的报错如下: C:\Users\dell\Desktop\homo3d-master>conda env create -f environment.yml Retrieving notices: ...working... done Collecting package metadata (repodata.json): done Solving environment: failed

ResolvePackageNotFound:

lavenklau commented 1 year ago

我在新的提交中更正了包列表 9e007f2,请试下最新版本是否可以? @XuGuang178

XuGuang178 commented 1 year ago

可以了,请问是为什么呢

XuGuang178 commented 1 year ago

CMake Error at W:/Program Files/CMake/share/cmake-3.27/Modules/FetchContent.cmake:1662 (message): Build step for openvdb failed: 1 Call Stack (most recent call first): W:/Program Files/CMake/share/cmake-3.27/Modules/FetchContent.cmake:1802:EVAL:2 (__FetchContent_directPopulate) W:/Program Files/CMake/share/cmake-3.27/Modules/FetchContent.cmake:1802 (cmake_language) W:/Program Files/CMake/share/cmake-3.27/Modules/FetchContent.cmake:2016 (FetchContent_Populate) CMakeLists.txt:35 (FetchContent_MakeAvailable)

-- Configuring incomplete, errors occurred! 现在环境创建和激活完成了,但 但在make过程中遇到了这个问题,我检查了homo3d环境下安装的库,确实没有openvdb,直接使用conda寻找也无法找到这个库

lavenklau commented 1 year ago

openvdb并不是从conda环境中安装的,是从仓库主页上直接拉取源码进行编译的,你给出的报错信息应该是因为源码下载失败,这个可能是网络问题,可以考虑下使用代理 @XuGuang178

XuGuang178 commented 1 year ago

是的,我下午解决了这个问题,现在同时在window系统和wsl上同时配置,不过window上我mingw还没下载成,linux上还遇到了一些不明问题,等我找到具体报错原因再来询问

XuGuang178 commented 1 year ago

openvdb并不是从conda环境中安装的,是从仓库主页上直接拉取源码进行编译的,你给出的报错信息应该是因为源码下载失败,这个可能是网络问题,可以考虑下使用代理 @XuGuang178

还是不太行,我以为我已经编译成功了,但基本十次里才有可能不报错一次,大部分的尝试make ..基本都失败了,而且还是上面那个问题,请问还有别的方式吗

XuGuang178 commented 1 year ago

openvdb并不是从conda环境中安装的,是从仓库主页上直接拉取源码进行编译的,你给出的报错信息应该是因为源码下载失败,这个可能是网络问题,可以考虑下使用代理 @XuGuang178

好像是因为我之前没有进入homo3d环境进行编译,但我也不清楚这算不算编译成功了,因为后面使用make -j4还是失败的 如下为编译好的build文件夹内文件: image

lavenklau commented 1 year ago

如果生成的是VS项目,可以直接打开VS项目编译,不需要用make进行编译 @XuGuang178

XuGuang178 commented 1 year ago

这个我下午也尝试了下,但直接用VS进行编译也会发生报错,VS结尾报错为:6>C:\Users\178\Desktop\LIHP\code\homo3d-master\voxelIO\openvdb_wrapper_t.cpp : fatal error C1128: 节数超过对象文件格式限制: 请使用 /bigobj 进行编译 我尝试下添加/bigobj,再次编译会报错如下图: image

XuGuang178 commented 1 year ago

如果生成的是VS项目,可以直接打开VS项目编译,不需要用make进行编译 @XuGuang178 前面都完成了,到这一步开始卡住了,我电脑上已经安装了mingw。

(homo3d) PS C:\Users\178\Desktop\LIHP\code\homo3d-master\build> make -j4 make : 无法将“make”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确 ,然后再试一次。 所在位置 行:1 字符: 1

XuGuang178 commented 1 year ago

如果生成的是VS项目,可以直接打开VS项目编译,不需要用make进行编译 @XuGuang178

这是我在wsl系统下配置的环境,但在cmake后还是报错 报错如下: (homo3d) xuguang@LDS:~/homo3d-master/build$ cmake .. -- cmake version 3.16.3 -- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using proxy : using conda environment, prefix = /home/xuguang/anaconda3/envs/homo3d -- Populating openvdb -- Configuring done -- Generating done -- Build files have been written to: /home/xuguang/homo3d-master/build/_deps/openvdb-subbuild [ 11%] Performing download step (download, verify and extract) for 'openvdb-populate' -- verifying file... file='/home/xuguang/homo3d-master/build/_deps/openvdb-subbuild/openvdb-populate-prefix/src/v8.2.0.tar.gz' -- MD5 hash of /home/xuguang/homo3d-master/build/_deps/openvdb-subbuild/openvdb-populate-prefix/src/v8.2.0.tar.gz does not match expected value expected: '2852fe7176071eaa18ab9ccfad5ec403' actual: '4eb5c219887e117102ff5d89d22a4666' -- File already exists but hash mismatch. Removing... -- Downloading... dst='/home/xuguang/homo3d-master/build/_deps/openvdb-subbuild/openvdb-populate-prefix/src/v8.2.0.tar.gz' timeout='none' -- Using src='https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v8.2.0.tar.gz' -- verifying file... file='/home/xuguang/homo3d-master/build/_deps/openvdb-subbuild/openvdb-populate-prefix/src/v8.2.0.tar.gz' -- Downloading... done -- extracting... src='/home/xuguang/homo3d-master/build/_deps/openvdb-subbuild/openvdb-populate-prefix/src/v8.2.0.tar.gz' dst='/home/xuguang/homo3d-master/build/_deps/openvdb-src' -- extracting... [tar xfz] -- extracting... [analysis] -- extracting... [rename] -- extracting... [clean up] -- extracting... done [ 22%] No patch step for 'openvdb-populate' [ 33%] No update step for 'openvdb-populate' [ 44%] No configure step for 'openvdb-populate' [ 55%] No build step for 'openvdb-populate' [ 66%] No install step for 'openvdb-populate' [ 77%] No test step for 'openvdb-populate' [ 88%] Completed 'openvdb-populate' [100%] Built target openvdb-populate -- CMake Build Type: Release -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") CMake Warning at build/_deps/openvdb-src/CMakeLists.txt:618 (message): Unable to find Jemalloc, attempting to fall back to TBB malloc.

      It is recommended to use Jemalloc for optimum performance.

-- Configuring for OpenVDB Version 8.2.0 -- Configuring for OpenVDB ABI Version 8


-- ------------- Configuring OpenVDBCore --------------


-- Found Boost: /home/xuguang/anaconda3/envs/homo3d/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found suitable version "1.82.0", minimum required is "1.61") found components: iostreams system -- Found TBB: /home/xuguang/anaconda3/envs/homo3d/include (found suitable version "2018.0", minimum required is "2018.0") found components: tbb CMake Deprecation Warning at build/_deps/openvdb-src/openvdb/openvdb/CMakeLists.txt:133 (message): Support for TBB versions < 2019.0 is deprecated and will be removed.

-- Found Blosc: /home/xuguang/anaconda3/envs/homo3d/lib/libblosc.so (found suitable version "1.21.3", minimum required is "1.5.0") CMake Warning at build/_deps/openvdb-src/openvdb/openvdb/CMakeLists.txt:162 (message): The version of Blosc located is greater than 1.5.0. There have been reported issues with using later versions of Blosc with OpenVDB. OpenVDB has been tested fully against Blosc 1.5.0, it is recommended that you use this version where possible.

-- Found ZLIB: /home/xuguang/anaconda3/envs/homo3d/lib/libz.so (found suitable version "1.2.13", minimum required is "1.2.7") -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE


-- ----------- Configuring OpenVDBBinaries ------------


-- Found TBB: /home/xuguang/anaconda3/envs/homo3d/include (found suitable version "2018.0", minimum required is "2018.0") found components: tbbmalloc -- openvdb_SOURCE_DIR = /home/xuguang/homo3d-master/build/_deps/openvdb-src -- openvdb_BINARY_DIR = /home/xuguang/homo3d-master/build/_deps/openvdb-build -- Eigen directory /home/xuguang/anaconda3/envs/homo3d/include/eigen3 -- glm dir = /home/xuguang/anaconda3/envs/homo3d/include -- glm::glm alias to glm CMake Error at CMakeLists.txt:48 (add_library): add_library cannot create ALIAS target "glm::glm" because target "glm" is imported but not globally visible.

-- Found IlmBase: /home/xuguang/anaconda3/envs/homo3d/include/OpenEXR (found version "2.5") found components: Half Iex IexMath IlmThread Imath -- The CUDA compiler identification is NVIDIA 11.8.89 -- Check for working CUDA compiler: /usr/local/cuda-11.8/bin/nvcc -- Check for working CUDA compiler: /usr/local/cuda-11.8/bin/nvcc -- works -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Found CUDA: /usr/local/cuda-11.8 (found version "11.8") -- CUDA libs /usr/local/cuda-11.8/lib64/libcudart_static.a;-pthread;dl;/usr/lib/x86_64-linux-gnu/librt.so -- CUDA lib /usr/lib/wsl/lib/libcuda.so -- CUDA sources : /home/xuguang/homo3d-master/AutoDiff/TensorExpression.cu;/home/xuguang/homo3d-master/Framework.cu;/home/xuguang/homo3d-master/culib/lib.cu;/home/xuguang/homo3d-master/culib/vector_intrinsic.cu;/home/xuguang/homo3d-master/homogenization/grid.cu;/home/xuguang/homo3d-master/homogenization/grid_ex.cu;/home/xuguang/homo3d-master/homogenization/homogenization.cu;/home/xuguang/homo3d-master/homogenization/profile_test.cu;/home/xuguang/homo3d-master/homogenization/testAutoDiff.cu;/home/xuguang/homo3d-master/homogenization/testGrid.cu;/home/xuguang/homo3d-master/optimization/OCOptimizer.cu;/home/xuguang/homo3d-master/optimization/mmaOpt.cu;/home/xuguang/homo3d-master/optimization/mmaOptimizer.cu -- deprecated sources : /home/xuguang/homo3d-master/homogenization/deprecated_grid.cu -- Configuring incomplete, errors occurred! See also "/home/xuguang/homo3d-master/build/CMakeFiles/CMakeOutput.log". See also "/home/xuguang/homo3d-master/build/CMakeFiles/CMakeError.log". 很明显中间有关于glm的报错部分: CMake Error at CMakeLists.txt:48 (add_library): add_library cannot create ALIAS target "glm::glm" because target "glm" is imported but not globally visible. 我尝试在gpt的帮助下修改,但没什么效果

lavenklau commented 1 year ago

这个是不同glm版本导致的,有的版本不会定义目标glm::glm,我在新的提交中73fd29b更新了CMakelist,请再尝试下 @XuGuang178

XuGuang178 commented 1 year ago

这个是不同glm版本导致的,有的版本不会定义目标glm::glm,我在新的提交中73fd29b更新了CMakelist,请再尝试下 @XuGuang178

很遗憾,还是相似的报错内容 (homo3d) xuguang@LDS:~/homo3d-master/build$ cmake .. -- cmake version 3.16.3 -- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using proxy : using conda environment, prefix = /home/xuguang/miniconda3/envs/homo3d -- Populating openvdb -- Configuring done -- Generating done -- Build files have been written to: /home/xuguang/homo3d-master/build/_deps/openvdb-subbuild Scanning dependencies of target openvdb-populate [ 11%] Creating directories for 'openvdb-populate' [ 22%] Performing download step (download, verify and extract) for 'openvdb-populate' -- Downloading... dst='/home/xuguang/homo3d-master/build/_deps/openvdb-subbuild/openvdb-populate-prefix/src/v8.2.0.tar.gz' timeout='none' -- Using src='https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v8.2.0.tar.gz' -- verifying file... file='/home/xuguang/homo3d-master/build/_deps/openvdb-subbuild/openvdb-populate-prefix/src/v8.2.0.tar.gz' -- Downloading... done -- extracting... src='/home/xuguang/homo3d-master/build/_deps/openvdb-subbuild/openvdb-populate-prefix/src/v8.2.0.tar.gz' dst='/home/xuguang/homo3d-master/build/_deps/openvdb-src' -- extracting... [tar xfz] -- extracting... [analysis] -- extracting... [rename] -- extracting... [clean up] -- extracting... done [ 33%] No patch step for 'openvdb-populate' [ 44%] No update step for 'openvdb-populate' [ 55%] No configure step for 'openvdb-populate' [ 66%] No build step for 'openvdb-populate' [ 77%] No install step for 'openvdb-populate' [ 88%] No test step for 'openvdb-populate' [100%] Completed 'openvdb-populate' [100%] Built target openvdb-populate -- CMake Build Type: Release -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") CMake Warning at build/_deps/openvdb-src/CMakeLists.txt:618 (message): Unable to find Jemalloc, attempting to fall back to TBB malloc.

      It is recommended to use Jemalloc for optimum performance.

-- Configuring for OpenVDB Version 8.2.0 -- Configuring for OpenVDB ABI Version 8


-- ------------- Configuring OpenVDBCore --------------


-- Found Boost: /home/xuguang/miniconda3/envs/homo3d/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found suitable version "1.82.0", minimum required is "1.61") found components: iostreams system -- Found TBB: /home/xuguang/miniconda3/envs/homo3d/include (found suitable version "2018.0", minimum required is "2018.0") found components: tbb CMake Deprecation Warning at build/_deps/openvdb-src/openvdb/openvdb/CMakeLists.txt:133 (message): Support for TBB versions < 2019.0 is deprecated and will be removed.

-- Found Blosc: /home/xuguang/miniconda3/envs/homo3d/lib/libblosc.so (found suitable version "1.21.3", minimum required is "1.5.0") CMake Warning at build/_deps/openvdb-src/openvdb/openvdb/CMakeLists.txt:162 (message): The version of Blosc located is greater than 1.5.0. There have been reported issues with using later versions of Blosc with OpenVDB. OpenVDB has been tested fully against Blosc 1.5.0, it is recommended that you use this version where possible.

-- Found ZLIB: /home/xuguang/miniconda3/envs/homo3d/lib/libz.so (found suitable version "1.2.13", minimum required is "1.2.7") -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE


-- ----------- Configuring OpenVDBBinaries ------------


-- Found TBB: /home/xuguang/miniconda3/envs/homo3d/include (found suitable version "2018.0", minimum required is "2018.0") found components: tbbmalloc -- openvdb_SOURCE_DIR = /home/xuguang/homo3d-master/build/_deps/openvdb-src -- openvdb_BINARY_DIR = /home/xuguang/homo3d-master/build/_deps/openvdb-build -- Eigen directory /home/xuguang/miniconda3/envs/homo3d/include/eigen3 -- glm dir = /home/xuguang/miniconda3/envs/homo3d/include -- glm::glm alias to glm CMake Error at CMakeLists.txt:48 (add_library): add_library cannot create ALIAS target "glm::glm" because target "glm" is imported but not globally visible.

-- Found IlmBase: /home/xuguang/miniconda3/envs/homo3d/include/OpenEXR (found version "2.5") found components: Half Iex IexMath IlmThread Imath -- The CUDA compiler identification is NVIDIA 11.8.89 -- Check for working CUDA compiler: /usr/local/cuda-11.8/bin/nvcc -- Check for working CUDA compiler: /usr/local/cuda-11.8/bin/nvcc -- works -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Found CUDA: /usr/local/cuda-11.8 (found version "11.8") -- CUDA libs /usr/local/cuda-11.8/lib64/libcudart_static.a;-pthread;dl;/usr/lib/x86_64-linux-gnu/librt.so -- CUDA lib /usr/lib/wsl/lib/libcuda.so -- CUDA sources : /home/xuguang/homo3d-master/AutoDiff/TensorExpression.cu;/home/xuguang/homo3d-master/Framework.cu;/home/xuguang/homo3d-master/culib/lib.cu;/home/xuguang/homo3d-master/culib/vector_intrinsic.cu;/home/xuguang/homo3d-master/homogenization/grid.cu;/home/xuguang/homo3d-master/homogenization/grid_ex.cu;/home/xuguang/homo3d-master/homogenization/homogenization.cu;/home/xuguang/homo3d-master/homogenization/profile_test.cu;/home/xuguang/homo3d-master/homogenization/testAutoDiff.cu;/home/xuguang/homo3d-master/homogenization/testGrid.cu;/home/xuguang/homo3d-master/optimization/OCOptimizer.cu;/home/xuguang/homo3d-master/optimization/mmaOpt.cu;/home/xuguang/homo3d-master/optimization/mmaOptimizer.cu -- deprecated sources : /home/xuguang/homo3d-master/homogenization/deprecated_grid.cu -- Configuring incomplete, errors occurred! See also "/home/xuguang/homo3d-master/build/CMakeFiles/CMakeOutput.log". See also "/home/xuguang/homo3d-master/build/CMakeFiles/CMakeError.log".

XuGuang178 commented 1 year ago

这个是不同glm版本导致的,有的版本不会定义目标glm::glm,我在新的提交中73fd29b更新了CMakelist,请再尝试下 @XuGuang178

还能有别的办法吗

lavenklau commented 1 year ago

我在CMakelist中已经去除了创建glm别名项目的命令, 新的提交a05e330是否可以通过编译? @XuGuang178

XuGuang178 commented 1 year ago

我在CMakelist中已经去除了创建glm别名项目的命令, 新的提交a05e330是否可以通过编译? @XuGuang178

还是不行,但我怀疑可能是因为我的电脑出了些问题,可以提供一下您运行的设备环境吗,比如在虚拟机还是什么,系统是win还是linux,也有可能wsl中存在一些bug,我也尝试过win环境下用VS来构建,但无法构建成功