I want to install Caffe on CentOS 7, but got stuck at 'make runtest'. one warning like
Warning! HDF5 library version mismatched error
And the abortion code followd as
SIGABRT (#0xc8b) received by PID 3211 (TID 0x7fcfd38c29c0) from PID 3211; stack trace: ***
# 0x7fcfcede5100 (unknown)
# 0x7fcfcea4a5f7 __GI_raise
# 0x7fcfcea4bce8 __GI_abort
# 0x7fcfd26c0592 H5check_version
# 0x7fcfcf6e2630 caffe::HDF5DataLayer<>::LoadHDF5FileData()
# 0x7fcfcf6e1518 caffe::HDF5DataLayer<>::LayerSetUp()
# 0x7fcfcf7f5ecc caffe::Net<>::Init()
# 0x7fcfcf7f6d55 caffe::Net<>::Net()
# 0x7fcfcf6af93a caffe::Solver<>::InitTrainNet()
# 0x7fcfcf6b0a3c caffe::Solver<>::Init()
# 0x7fcfcf6b0d6a caffe::Solver<>::Solver()
# 0x49e598 caffe::AdaGradSolverTest<>::InitSolver()
# 0x49fc40 caffe::GradientBasedSolverTest<>::InitSolverFromProtoString()
# 0x4942a4 caffe::GradientBasedSolverTest<>::RunLeastSquaresSolver()
# 0x498c72 caffe::GradientBasedSolverTest<>::TestLeastSquaresUpdate()
# 0x6f7923 testing::internal::HandleExceptionsInMethodIfSupported<>()
# 0x6ef6c7 testing::Test::Run()
# 0x6ef76e testing::TestInfo::Run()
# 0x6ef875 testing::TestCase::Run()
# 0x6f1b08 testing::internal::UnitTestImpl::RunAllTests()
# 0x6f1d97 testing::UnitTest::Run()
# 0x459d62 main
# 0x7fcfcea36b15 __libc_start_main
# 0x460ef9 (unknown)
make: *** [runtest] Aborted
I use anaconda to manage the libs, and the version of hdf5 library is 1.8.16. How can i get over this problem? Please help me, thank you!
Check the requirement for the HDF5 library version the Caffe installation requires. I think you will find it is different than the version you have installed on your system.
Warning! HDF5 library version mismatched error
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked. Data corruption or segmentation faults may occur if the application continues. This can happen when an application was compiled by one version of HDF5 but linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related settings such as 'LD_LIBRARY_PATH'. You can, at your own risk, disable this warning by setting the environment
variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.
Related
I think this is a bug I should report but will ask here first to see if I am missing something simple.
Firstly I need to build from source for various reasons including the fact that I don't have sudo access to the system I am trying to install on.
The system I am trying to compile on is a ppc64el system running RedHat 7 (3.10.0-1160.62.1.el7.ppc64le). I can successfully compile on a x86_64 system running the same version RedHat 7 (3.10.0-1160.62.1.el7.x86_64)
When I configure with the following, make completes fine, but if I remove the --disable-jit-support it fails with the following error.
Am I missing a setting on ./configure that can fix this?
./configure --enable-shared --enable-load-relative --disable-install-doc --prefix=$RUBY_PREFIX --exec-prefix=$RUBY_PREFIX/rh_ppc --disable-jit-support
building rb_mjit_header.h
rb_mjit_header.h updated
building .ext/include/powerpc64le-linux/rb_mjit_min_header-3.1.2.h
error in final header file:
In file included from /tmp/20220525-12786-q2ndz2.c:1:0:
/tmp/20220525-12786-vf3xbh.h:16627:1: error: multiple storage classes in declaration specifiers
__attribute__ ((__visibility__("default"))) extern
^
compilation terminated due to -Wfatal-errors.
make: *** [.ext/include/powerpc64le-linux/rb_mjit_min_header-3.1.2.h] Error 1
I've tried following the intel instructions to install sgx, but it requires the sgx_linux_x64_psw_.bin file, which i cannot find anywhere. I've got the driver installer (sgx_linux_x64_driver_1.35.bin) and the sdk installer(sgx_linux_x64_sdk_2.10.100.2.bin), intel seems not to have a psw for linux? If so, how do i properly work with sgx? I tried simply executing the driver and sdk .bin files, but the sample code in the sdk would not compile (after make SGX_MODE=SIM), even after setting the sgxsdk directory to /opt/intel/sgxsdk. I'd get the following compile error:
/usr/bin/ld: warning: libsgx_uae_service_sim.so, needed by /opt/intel/sgxsdk/lib64/libsgx_urts_sim.so, not found (try using -rpath or -rpath-link)
/opt/intel/sgxsdk/lib64/libsgx_urts_sim.so: undefined reference to `get_launch_token'
collect2: error: ld returned 1 exit status
Makefile:235: recipe for target 'app' failed
make[1]: * [app] Error 1
make[1]: Leaving directory '/opt/intel/sgxsdk/SampleCode/SampleEnclave'
Makefile:180: recipe for target 'all' failed
make: * [all] Error 2
Any help with either issue would be much appreciated!
So at least in my case, it seems the issue was that I was A, using a virtual machine, which can ONLY run in simulation mode, so getting a fully working version of sgx is impossible. Secondly, I was using an outdated installation guide, for anyone else trying to use this stuff, make sure to get the installation guide from the intel download page along with the version you are downloading.
download source code from https://github.com/intel/linux-sgx, compile according to the instructions and then install psw.
I am getting a linking error while compiling opencv with cuda on Mac OS X high Sierra (10.13.6).
Error message:
[ 21%] Linking CXX shared library ../../lib/libopencv_cudev.dylib
ld: warning: directory not found for option '-L/Users/unknownn/opencv/-Wl,-rpath,/usr/local/cuda'
ld: warning: directory not found for option '-L-Wl,-rpath,/usr/local/cuda'
ld: library not found for -llib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libopencv_cudev.4.0.1.dylib] Error 1
make[1]: *** [modules/cudev/CMakeFiles/opencv_cudev.dir/all] Error 2
make: *** [all] Error 2
I have already tried pretty much every cuda (9, 9.2, 10) and opencv (3.4, 4.0.1) version. Also I am aware that every cuda version requires a specific Xcode version.
I have also tried various cmake versions
I checked for the correct cuda paths in ccmake.
I dont know why the ld warnings appear since /usr/local/cuda exist.
What is -llib?
I had the same problem as well, what's interesting is that the problem does not appear to be with OpenCV, but with cmake.
The FindCUDA that comes with cmake seems to be broken, producing that strange -llib. You can see it during the cmake run as well as:
Extra dependencies: cudart_static lib nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda/lib -L-Wl,-rpath,/usr/local/cuda
(Note the second element "lib", the last two -L... elements will cause problem when you do make install as well)
However, the opencv source package comes with FindCUDA.cmake files that seem to work.
Assuming:
cmake is in /usr/local/share/cmake
opencv source is in ~/opencv
Do the following first:
mv /usr/local/share/cmake/Modules/FindCUDA* /tmp # Or some other back up location
cp -r ~/opencv/cmake/FindCUDA* /usr/local/share/cmake/Modules
Then run your build steps as before (cmake ..., make ..., make install), and hopefully it will work this time (it did for me).
As far as I can tell, cmake has deprecated FindCUDA.cmake, so I'm guessing it won't get fixed any time soon.
Answer by Jack Leow was very usefull, but I had to make farther investigation, because indeed his solution doesn't work any more.
Finally I have found this answer on opencv github by alalek. If in short, he proposes to add following cmake definition:
-DOPENCV_CUDA_FORCE_BUILTIN_CMAKE_MODULE=ON
This solution works to me.
P.S.: Currently I managed to solve few more issues on my way to get awesome opencv build. But currently build is in progress (44%) hope it will be finished in next half an hour, haha!
sorry, although this workaround worked once with opencv-3.4.9 / XCode8.2 (Clang 8) / CMake 3.12, now the switching of the FindCUDA files does not work anymore with the combination
opencv-3.4.9 / XCode9.2 (Clang 9) / CMake 3.16 with the following error:
CMake Error at /Applications/CMake.app/Contents/share/cmake3.16/Modules/FindCUDA.cmake:416 (file):
file failed to open for writing (Permission denied):
/Users/filippo/opencv- 3.4.9/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_genera ted_gpu_mat.cu.o.depend
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.16/Modules/FindCUDA.cmake:1363 (cuda_include_nvcc_dependencies)
/Applications/CMake.app/Contents/share/cmake-3.16/Modules/FindCUDA.cmake:1650 (CUDA_WRAP_SRCS)
/Applications/CMake.app/Contents/share/cmake-3.16/Modules/FindCUDA.cmake:1663 (cuda_compile_base)
cmake/OpenCVDetectCUDA.cmake:262 (CUDA_COMPILE)
cmake/OpenCVUtils.cmake:1513 (ocv_cuda_compile)
cmake/OpenCVModule.cmake:927 (ocv_add_library)
cmake/OpenCVModule.cmake:848 (_ocv_create_module)
modules/core/CMakeLists.txt:81 (ocv_create_module)
I had to update XCode to the 9.2 because I had a "nullability" compiling error in the building opencv-3.4.9 probably caused by Clang.
I'm trying to compile Qt Creator from source on MacOS 10.13 from the following repository:
https://github.com/qt-creator/qt-creator
I followed the instructions in README.md but had no success.
Most likely I missed out something.
Steps that I've done:
Installed latest Xcode
Installed LLVM using brew install --with-toolchain llvm
Installed QBS using brew install qbs
(that also brew-installed qt 5.11.1 as a dependency to /usr/local/opt/qt)
Installed precompiled Qt 5.11.1 with QtWebEngine (without sources)
Cloned Qt Creator repository into /Users/username/builds/qtcreator_src
Created directory for out-of-source build: /Users/username/builds/qtc_build
From that directory ran following commands:
export LLVM_INSTALL_DIR=/usr/local/opt/llvm
export QBS_INSTALL_DIR=/usr/local/opt/qbs
PATH=/usr/local/opt/qt/bin:/usr/local/opt/llvm/bin:$PATH
qmake -r /Users/username/builds/qtcreator_src/4.7
make
After approximately 40 minutes of compilation I get following error:
../../../../qtcreator_src/4.7/src/plugins/qbsprojectmanager/customqbspropertiesdialog.cpp:29:10: fatal error: 'qbs.h' file not found
#include <qbs.h>
(I checked that the file is present in /usr/local/opt/qbs/include/qbs directory).
One more question. If I use make -j8, that boosts the build process, but then
I end up with following obscure error:
mv -f libDebugger.dylib ../../../bin/Qt\ Creator.app/Contents/PlugIns/
make[1]: *** [sub-plugins-make_first-ordered] Error 2
I could find neither additional error messages in the console output above, nor
any error.log files.
P.S. Here are original build instructions from github README.md:
# Optional, needed for the Clang Code Model if llvm-config is not in PATH:
export LLVM_INSTALL_DIR=/path/to/llvm (or "set" on Windows)
# Optional, needed to let the QbsProjectManager plugin use system Qbs:
export QBS_INSTALL_DIR=/path/to/qbs
# Optional, needed for the Python enabled dumper on Windows
set PYTHON_INSTALL_DIR=C:\path\to\python
cd $SOURCE_DIRECTORY
qmake -r
make (or mingw32-make or nmake or jom, depending on your platform)
Installation ("make install") is not needed. It is however possible, using
make install INSTALL_ROOT=$INSTALL_DIRECTORY
Update 2:
after excluding Qt from PATH I receive another error:
In file included from ../../../../qtcreator_src/4.7/src/plugins/qbsprojectmanager/customqbspropertiesdialog.cpp:29:
/usr/local/Cellar/qbs/1.12.0/include/qbs/qbs.h:63:10: fatal error:
'tools/settingsrepresentation.h' file not found
#include "tools/settingsrepresentation.h"
Update 3: I managed to build Qt Creator with the following commands issued from the build directory:
export LLVM_INSTALL_DIR=/usr/local/opt/llvm
/usr/local/opt/qt/bin/qmake /Users/username/builds/qtcreator_src/4.7
make
But even though build process completed without errors, the application doesn't run:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libBookmarks.dylib 0x0000000115166cb0 Bookmarks::Internal::BookmarksPlugin::~BookmarksPlugin() + 32
1 libExtensionSystem.4.7.0.dylib 0x000000010b58b3eb ExtensionSystem::Internal::PluginSpecPrivate::kill() + 27
2 libExtensionSystem.4.7.0.dylib 0x000000010b576778 ExtensionSystem::Internal::PluginManagerPrivate::loadPlugins() + 888
3 org.qt-project.qtcreator 0x000000010b558159 main + 13353
4 libdyld.dylib 0x00007fff7e352115 start + 1
Qt for sure shouldn’t be in the path — it’s superfluous. You can have multiple Qt versions coexisting and they are selected by invoking their respective qmake’s. Whether LLVM should be — not sure. qmake’s -r option is for the project mode and unnecessary.
cd build_dir
/qt/bin/qmake /path/to/sources
make
The whole point of using qbs would be that you replace qmake+make with just qbs. First tell qbs about the Qt version you want to use (do this just once):
qbs setup-qt /qt/bin/qmake myqt
qbs config defaultProfile myqt
Of course myqt can be whatever you want it to be.
Then build creator:
cd build_dir
qbs -f /path/to/sources
I'm trying to build the Iron hello world example, but have a problem with OpenSSL.
My OS is Windows 1 and I have tried Rust stable (1.7) and nightly (1.9).
I've installed OpenSSL with mingw and set the environment variables OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR. Just in case, I've added the paths to the PATH variable. None of these changes fix the problem.
Cargo's output like in this question: compilation of openssl-sys fails with `openssl/hmac.h: No such file or directory`
failed to run custom build command for `openssl-sys-extras v0.7.6`
Process didn't exit successfully: `C:\Users\sharp_000\Dropbox\Код\Rust\MTFQ\target\release\build\openssl-sys-extras-52d5315fb71d3c6d\build-script-build` (exit code: 101)
--- stderr
thread '<main>' panicked at 'explicit panic', C:\Users\sharp_000\.cargo\registry\src\githubcom-88ac128001ac3a9a\gcc-0.3.25\src\lib.rs:818
I copied the include/openssl directory, libssl32.dll, and libeay32.dll to the Cargo directory and output changes to:
cc1.exe: fatal error: Files/mingw/include: No such file or directory compilation terminated.
thread '<main>' panicked at 'explicit panic', C:\Users\sharp_000\.cargo\registry\src\github.com-88ac128001ac3a9a\gcc-0.3.25\src\lib.rs:818
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Deleting the target directory before building doesn't help.
Which Rust edition are you using? I had the same problem with the Rust MSVC edition.
I installed GCC with MSYS2 and changed Rust to the GNU edition, added gcc to my PATH and everything was OK.