got error again when I install rpy2 (compiled by llvm in brew) - llvm-clang

When I ran 'pip install rpy2', it reported error:
clang: error: unsupported option '-fopenmp'
I installed llvm with brew since it supports the option. But I have to link brew's llvm (clang-5.0) to clang command. Then I ran 'pip install rpy2', now I got new error. How do I fix it?
ld: library not found for -lomp
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/local/bin/clang' failed with exit status 1

There an open issue on the rpy2 tracker with a similar error message, and an active discussion where some are reporting success compiling rpy2 after the combination of dev tools provided by Apple and requirements to compile the latest R release became incompatible:
https://bitbucket.org/rpy2/rpy2/issues/403/cannot-pip-install-rpy2-with-latest-r-340

Related

Error compiling caffe on Mac OS

I compiled caffe successfully at first and tried the MNIST example. But there is something wrong when I tried to install pycaffe. So I reinstalled caffe. However I received compiling error this time.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1
After I input the command 'clang -v'
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I figured out it was the problem between two version of python. The system default version and the anaconda one. You have to make sure the compiling and executing using the same one.

gcc failed with install Python MySQL libraries on Cygwin

I want to install either oursql or MySQLdb on a Cygwin box. (Pywikibot can work with either.)
Unfortunately both easy_install as well as pip fail at installing both.
easy_install-2.7 oursql
Searching for oursql
Reading https://pypi.python.org/simple/oursql/
Reading http://launchpad.net/oursql
Best match: oursql 0.9.3.1
Downloading https://pypi.python.org/packages/source/o/oursql/oursql-0.9.3.1.zip#md5=ad599ea2d95fc695df7195e9801b45c2
Processing oursql-0.9.3.1.zip
Writing /tmp/easy_install-kA8kUA/oursql-0.9.3.1/setup.cfg
Running oursql-0.9.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-kA8kUA/oursql-0.9.3.1/egg-dist-tmp-Jh5tJ1
cython not found, using previously-cython'd .c file.
mysql_config --cflags
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
easy_install-2.7 mysql-python
Searching for mysql-python
Reading https://pypi.python.org/simple/mysql-python/
Best match: MySQL-python 1.2.5
Downloading https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip#md5=654f75b302db6ed8dc5a898c625e030c
Processing MySQL-python-1.2.5.zip
Writing /tmp/easy_install-JwMXUV/MySQL-python-1.2.5/setup.cfg
Running MySQL-python-1.2.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-JwMXUV/MySQL-python-1.2.5/egg-dist-tmp-jjPy0m
error: Setup script exited with error: command 'gcc' terminated by signal 11
I haven't done much gcc fixing in the past decade so I'm not sure how to handle this.
Try this, this may help you: Windows GCC (MinGW) binaries for Python developers

CUDA 7.0 Error while compiling samples

I'm trying to install CUDA 7.0 on Ubuntu 14.04. I've followed the installation instructions as outlined here. Specifically, I've followed steps in section 3.6 and Chapter 6. While compiling the examples (Section 6.2.2.2) using make, I'm getting the following error:
make[1]: Entering directory `/usr/local/cuda-7.0/samples/3_Imaging/cudaDecodeGL'
/usr/local/cuda-7.0/bin/nvcc -ccbin g++ -m64 -gencode arch=compute_20,
code=compute_20 -o cudaDecodeGL FrameQueue.o ImageGL.o VideoDecoder.o
VideoParser.o VideoSource.o cudaModuleMgr.o cudaProcessFrame.o
videoDecodeGL.o -L../../common/lib/linux/x86_64 -L/usr/lib/"nvidia-346"
-lGL -lGLU -lX11 -lXi -lXmu -lglut -lGLEW -lcuda -lcudart -lnvcuvid
/usr/bin/ld: cannot find -lnvcuvid
collect2: error: ld returned 1 exit status
make[1]: *** [cudaDecodeGL] Error 1
make[1]: Leaving directory `/usr/local/cuda-7.0/samples/3_Imaging/cudaDecodeGL'
make: *** [3_Imaging/cudaDecodeGL/Makefile.ph_build] Error 2
If you notice, there is -L/usr/lib/"nvidia-346". In my case, I have installed nvidia-349. What worked for me is to edit NVIDIA_CUDA-7.0_Samples/3_Imaging/cudaDecodeGL/findgllib.mk and change UBUNTU_PKG_NAME = "nvidia-346" to nvidia-349.
In order to properly install CUDA 7.0 on Ubuntu 14.04, you need a nvidia driver version 346 or higher.
If you're using the .deb installation method, the nvidia graphics driver is installed automatically.
If you used the .run file installation method and chose not to install the nvidia driver, you can manually install the driver afterwards through the package manager:
sudo apt-add-repository ppa:xorg-edgers/ppa && sudo apt-get update
sudo apt-get install nvidia-346 nvidia-346-dev nvidia-346-uvm libcuda1-346 nvidia-libopencl1-346 nvidia-icd-346
In my case, I installed nvidia-352 afterwards due to a bug in nvidia-346 and I stumbled upon the same error.
andoum's approach of manually changing the hard-coded UBUNTU_PKG_NAME = "nvidia-346" to UBUNTU_PKG_NAME = "nvidia-352" in NVIDIA_CUDA-7.0_Samples/3_Imaging/cudaDecodeGL/findgllib.mk worked fine for me.
I met the same issue and solution is that put path of nvidia into system path:
sudo gedit /etc/environment
add these path into environment
LIBRARY_PATH=/usr/lib/your_nvidia_edition:$LIBRARY_PATH
In fact I have encountered this problem when I made a make. I installed Cuda 8.0 under my Ubuntu 16.04. This problem had been confusing me for several weeks and I was almost tending to reinstall ubuntu for that after reviewing many suggestions via google, but finally I addressed it myself recently.
First of all, you should replace all the UBUNTU_PKG_NAME= ##nvidia-3xx## to the one of your actually installed nvidia driver version as recommended above. Then you will probably get compiling error after you do a new make. In my case, I have the link errors like
/usr/bin/ld: warning: libGLX.so.0, needed by /usr/lib/nvidia-
375/libGL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libGLdispatch.so.0, needed by /usr/lib/nvidia-
375/libGL.so, not found (try using -rpath or -rpath-link)
....
or whatever contains missing link errors. Do locate the files you miss like
$ locate libGLX.so.
/usr/lib/nvidia-375/libGLX.so.0
/usr/lib32/nvidia-375/libGLX.so.0
$ locate libGLdispatch.so.0
/usr/lib/nvidia-375/libGLdispatch.so.0
/usr/lib32/nvidia-375/libGLdispatch.so.0
The error above is probably caused the compiling files cannot find in the default cuda libraries as you set, so you just need to copy the missing files to /usr/lib/nvidia-3xx/ (the actual path in your case) and this should work(it works in my case), if it doesn't maybe you could try to link the new add files to the one that need using a
$ sudo ln -s (requested file) (requesting file).
Hope this will help.

clang++ Error when compiling the Minko engine SDK for HTML 5

I have followed all steps mentioned in Compiling the SDK for HTML5 to compile the Minko framework to HTML5.
When I run the batch file build_html5.bat, i have this error
000000000000000), RtlUserThreadStart() + 0x21 bytes(s)
clang++.exe: error: clang frontend command failed with exit code 255 (use -v to see invocation)
ERROR root: compiler frontend failed to generate LLVM bitcode, halting
mingw32-make1: *** [obj/html5/release/Picking.o] Error 1
mingw32-make: *** [minko-framework] Error 2
Here is my Emscripten conf :
LLVM_ROOT='C:/Program Files/Emscripten/clang/e1.30.0_64bit'
EMSCRIPTEN_NATIVE_OPTIMIZER='C:/Program
Files/Emscripten/clang/e1.30.0_64bit/optimizer.exe'
NODE_JS='C:/Program Files/Emscripten/node/0.12.2_64bit/node.exe'
PYTHON='C:/Program Files/Emscripten/python/2.7.5.3_64bit/python.exe'
EMSCRIPTEN_ROOT='C:/Program Files/Emscripten/emscripten/1.30.0'
MINGW_ROOT='C:/Program Files/Emscripten/mingw/4.6.2_32bit'
JAVA='C:/Program Files/Emscripten/java/7.45_64bit/bin/java.exe'
Im on windows 7 64 bit.
Anyone know what causes this error and how can I resolve it?
This is a known problem with Emscripten 1.30, it should be resolved in future versions. For the moment, stick to Emscripten 1.29.

Error when building for IOS

I am having the following error when building for ios
ld: file too small (length=0) file '/Users/………./.robovm/cache/ios/x86/default/Users/ ……/.m2/repository/org/robovm/robovm-dist/0.0.13/unpacked/robovm-0.0.13/lib/robovm- rt.jar/java/nio/PipeImpl$PipeSinkChannel.class.o' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
:ios:launchIPhoneSimulator FAILED
FAILURE: Build failed with an exception.
Any ideas? The desktop configuration is working. The JDK is 1.7+
I have installed the latest gradle setup for libgdx
Thanks
See for solution here: https://github.com/robovm/robovm/issues/238
You need to remove zero-length class from cache and run build again.