An error when install cutorch in Torch7 of centos7 - installation

I want to install the cutorch and get an error and I don't know how to solve it:
(tf0.12.1) [root#sd-bigdata-gpu-02 deepmask]# luarocks install cutorch
Installing https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec... switching to 'build' mode
Cloning into 'cutorch'...
remote: Counting objects: 227, done.
remote: Compressing objects: 100% (180/180), done.
remote: Total 227 (delta 64), reused 91 (delta 45), pack-reused 0
Receiving objects: 100% (227/227), 234.16 KiB | 0 bytes/s, done.
Resolving deltas: 100% (64/64), done.
Warning: unmatched variable LUALIB
jopts=$(getconf _NPROCESSORS_CONF)
……
[ 81%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/./THC_generated_THCTensorMaskedDouble.cu.o
Scanning dependencies of target THC
[ 82%] [ 84%] [ 85%] [ 86%] [ 87%] [ 88%] [ 89%] [ 90%] [ 92%] Building CXX object lib/THC/CMakeFiles/THC.dir/THCCachingAllocator.cpp.o
Building CXX object lib/THC/CMakeFiles/THC.dir/THCCachingHostAllocator.cpp.o
Building C object lib/THC/CMakeFiles/THC.dir/THCGeneral.c.o
Building C object lib/THC/CMakeFiles/THC.dir/THCStorageCopy.c.o
Building C object lib/THC/CMakeFiles/THC.dir/THCTensor.c.o
Building C object lib/THC/CMakeFiles/THC.dir/THCTensorCopy.c.o
Building CXX object lib/THC/CMakeFiles/THC.dir/THCStream.cpp.o
Building CXX object lib/THC/CMakeFiles/THC.dir/THCTensorRandom.cpp.o
Building C object lib/THC/CMakeFiles/THC.dir/THCThreadLocal.c.o
In file included from generic/THCTensor.c:1:0,
from /tmp/luarocks_cutorch-scm-1-4055/cutorch/lib/THC/THCGenerateAllTypes.h:17,
from /tmp/luarocks_cutorch-scm-1-4055/cutorch/lib/THC/THCTensor.c:7:
/tmp/luarocks_cutorch-scm-1-4055/cutorch/lib/THC/generic/THCTensor.c: In function ‘THCudaByteTensor_newExpand’:
/tmp/luarocks_cutorch-scm-1-4055/cutorch/lib/THC/generic/THCTensor.c:304:3: error: implicit declaration of function ‘THLongStorage_calculateExpandGeometry’ [-Werror=implicit-function-declaration]
THLongStorage_calculateExpandGeometry(tensor->size,
^
cc1: some warnings being treated as errors
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THCTensor.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
make: *** [all] Error 2
Error: Build error: Failed building.
(tf0.12.1) [root#sd-bigdata-gpu-02 deepmask]# lspci | grep -i 'vga\|3d\|2d'
02:00.0 3D controller: NVIDIA Corporation GM200GL [Tesla M40] (rev a1)
03:00.0 3D controller: NVIDIA Corporation GM200GL [Tesla M40] (rev a1)
06:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 30)
83:00.0 3D controller: NVIDIA Corporation GM200GL [Tesla M40] (rev a1)
84:00.0 3D controller: NVIDIA Corporation GM200GL [Tesla M40] (rev a1)
I have install the cude 8.0 and cudnn . And I could also install other packages like nnx, optim, inn sucessfully.

I also encountered this. The cause is due to a new method in the torch lib, see: https://github.com/torch/torch7/blob/master/lib/TH/THStorage.c#L69
Update Torch by running luarocks install torch before luarocks install cutorch and you should be good to go.

Related

MetaCall CLI Installation error on Windows

So I'm trying to install the Metacall CLI on my Windows machine using their installation guide.
However, while running the last step i.e. cmake --build . --target install, I'm getting the following error:
C:\Users\USER>cd core
C:\Users\USER\core>cd build
C:\Users\USER\core\build>cmake --build . --target install
[ 1%] Built target version
[ 1%] Built target preprocessor
[ 2%] Built target environment
[ 3%] Built target format
[ 4%] Built target backtrace
[ 5%] Built target threading
[ 13%] Built target log
[ 15%] Built target memory
[ 16%] Built target portability
[ 18%] Built target adt
[ 19%] Built target filesystem
[ 20%] Linking CXX shared library ..\..\libdynlinkd.dll
CMakeFiles\dynlink.dir/objects.a(dynlink_impl_win32.c.obj): In function `dynlink_impl_interface_lib_path_win32':
C:/Users/USER/core/source/dynlink/source/dynlink_impl_win32.c:124: undefined reference to `EnumProcessModules#16'
C:/Users/USER/core/source/dynlink/source/dynlink_impl_win32.c:132: undefined reference to `GetModuleFileNameExA#16'
collect2.exe: error: ld returned 1 exit status
source\dynlink\CMakeFiles\dynlink.dir\build.make:171: recipe for target 'libdynlinkd.dll' failed
mingw32-make.exe[2]: *** [libdynlinkd.dll] Error 1
CMakeFiles\Makefile2:3839: recipe for target 'source/dynlink/CMakeFiles/dynlink.dir/all' failed
mingw32-make.exe[1]: *** [source/dynlink/CMakeFiles/dynlink.dir/all] Error 2
Makefile:154: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2
C:\Users\USER\core\build>

MXE compilation, openjpeg.h not found error

I am compiling MXE for the cross-compilation of FFmpeg.
I am following the instructions here and after running the make command, the following error occurred:
[build] proj i686-w64-mingw32.static
[done] proj i686-w64-mingw32.static 27156 KiB 0m10.026s
[build] libgeotiff i686-w64-mingw32.static
[done] libgeotiff i686-w64-mingw32.static 41492 KiB 0m19.380s
[build] netcdf i686-w64-mingw32.static
[done] netcdf i686-w64-mingw32.static 114152 KiB 0m22.519s
[build] openjpeg i686-w64-mingw32.static
[done] openjpeg i686-w64-mingw32.static 38572 KiB 0m9.627s
[build] spatialite i686-w64-mingw32.static
[done] spatialite i686-w64-mingw32.static 380204 KiB 0m58.171s
[build] gdal i686-w64-mingw32.static
Failed to build package gdal for target i686-w64-mingw32.static!
------------------------------------------------------------
checking for nc_open in -lnetcdf... no
configure: JasPer (JPEG2000) support disabled.
configure: error: openjpeg.h not found in /home/hiqbal/mxe/usr/i686-w64-mingw32.static/include/openjpeg-2.0 or /home/hiqbal/mxe/usr/i686-w64-mingw32.static/include/openjpeg-2.1 or /home/hiqbal/mxe/usr/i686-w64-mingw32.static/include/openjpeg-2.2 or /home/hiqbal/mxe/usr/i686-w64-mingw32.static/include/openjpeg-2.3
Makefile:851: recipe for target 'build-only-gdal_i686-w64-mingw32.static' failed
make[1]: *** [build-only-gdal_i686-w64-mingw32.static] Error 1
make[1]: Leaving directory '/home/hiqbal/mxe'
real 0m17.644s
user 0m13.999s
sys 0m1.669s
------------------------------------------------------------
[log] /home/hiqbal/mxe/log/gdal_i686-w64-mingw32.static
Makefile:851: recipe for target '/home/hiqbal/mxe/usr/i686-w64-mingw32.static/installed/gdal' failed
make: *** [/home/hiqbal/mxe/usr/i686-w64-mingw32.static/installed/gdal] Error 1
It seems that it was unable to find openjpeg.h and searched in folder openjpeg-2.0 to openjpeg-2.3. However, when I checked /mxe/usr/i686-w64-mingw32.static/include/, it contains openjpeg-2.4.
The log for /mxe/log/gdal_i686-w64-mingw32.static is present here.
Please help fix this. Thanks.
gdal is installing 2.4 which is an issue. Run this make command make gdal_CONFIGURE_OPTS=--with-openjpeg=no ... to turn it off.
git hub issue: https://github.com/mxe/mxe/issues/2630

error when compile pgrouting in mac osx

I cannot compile the pgrouting. The error message shows like below :
[ 5%] Built target apsp_warshall
[ 11%] Built target astar
[ 17%] Built target kdijkstra
[ 20%] Building CXX object src/apsp_johnson/src/CMakeFiles/apsp_johnson.dir/apsp_johnson_boost_wrapper.cpp.o
clang: error: unknown argument: '-fno-delete-null-pointer-checks'
make[2]: *** [src/apsp_johnson/src/CMakeFiles/apsp_johnson.dir/apsp_johnson_boost_wrapper.cpp.o] Error 1
make[1]: *** [src/apsp_johnson/src/CMakeFiles/apsp_johnson.dir/all] Error 2
make: *** [all] Error 2
Can some guide me how to solve this. I'm using OSX Mavericks. Any info would be appreciated. Thank you.
I found that marking the flag below makes compile successful in file src/apsp_johnson/src/CMakeLists.txt :
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delete-null-pointer-checks")

Silabs USB TO UART Debian build error

I'm having a problem installing a driver for my Silabs USB to UART bridge.
I download my driver from here:
http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
I'm running Ubuntu 12.04 32bit Kernel Linux 3.5.0-27-generic
The instructions say that make (your cp2010x driver)
cp cp2010x.ko to /libmodules/<kernel>/kernel/driver/usb/serial
insmod /libmodules/<kernel>/kernel/driver/usb/serial/usbserial.ko
insmod xp2010x.ko
However, I get this error when I try to call make:
root#grace:/home/admin/Desktop/usb# make
make -C /lib/modules/3.5.0-27-generic/build M=/home/admin/Desktop/usb modules
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-27-generic'
CC [M] /home/admin/Desktop/usb/cp210x.o
/home/admin/Desktop/usb/cp210x.c:164:12: error: ‘usb_serial_probe’ undeclared here (not in a function)
/home/admin/Desktop/usb/cp210x.c:165:16: error: ‘usb_serial_disconnect’ undeclared here (not in a function)
/home/admin/Desktop/usb/cp210x.c: In function ‘cp210x_init’:
/home/admin/Desktop/usb/cp210x.c:989:2: error: implicit declaration of function ‘usb_serial_register’ [-Werror=implicit-function-declaration]
/home/admin/Desktop/usb/cp210x.c:996:3: error: implicit declaration of function ‘usb_serial_deregister’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/home/admin/Desktop/usb/cp210x.o] Error 1
make[1]: *** [_module_/home/admin/Desktop/usb] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-27-generic'
make: *** [all] Error 2
I am new to Linux. I've Googled the error a lot but I can't find any answers that works.
According to this forum post, those drivers have actually been a part of the kernel since March 2009. You can see the file at drivers/usb/serial/cp210x.c (here is a link to the file in the latest stable version of the kernel).

qemu: uncaught target signal 11 (Segmentation fault)

Inside scratch box i am performing git clone, getting following error:
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Error:
/pi$ sb2 -t rfs-raspbian -eR git clone git://github.com/danwinship/glib.git
Cloning into 'glib'...
remote: Counting objects: 72484, done.
remote: Compressing objects: 100% (11555/11555), done.
remote: Total 72484 (delta 61357), reused 71916 (delta 60808)
Receiving objects: 100% (72484/72484), 28.86 MiB | 59 KiB/s, done.
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
error: index-pack died of signal 11
fatal: index-pack failed
QEmu version installed :
qemu-arm -version
qemu-arm version 1.3.90, Copyright (c) 2003-2008 Fabrice Bellard
qemu-system-arm -version
QEMU emulator version 1.3.90, Copyright (c) 2003-2008 Fabrice Bellard
Any suggestion how to resolve it ?
I've obtained the same error while running git in qemu-static-aarch64 chroot. I've resolved this problem by compiling git without threads use.

Resources