Installing CUDA 5.0 RC samples - cuda

I tried to install the full CUDA 5.0 package but I got the following error:
Driver: Not Selected
Toolkit: Not Selected
Samples: Installation Failed. Missing required libraries.
So, in the /tmp/cuda_install_2340.log I've got:
Missing required library libglut.so
But I have installed it before, because I do:
facundo#gpgpu:~$ locate libglut
/usr/lib/x86_64-linux-gnu/libglut.a
/usr/lib/x86_64-linux-gnu/libglut.so
/usr/lib/x86_64-linux-gnu/libglut.so.3
/usr/lib/x86_64-linux-gnu/libglut.so.3.9.0
So, What is the problem? I am on Ubuntu 12.04

I'm on Ubuntu 12.04, I fixed it by the following:
sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so /usr/lib/libglut.so
So the problem was ubuntu are installing libglut library in a different path for x64 architectures, so it can be fixed making a symbolic link to /usr/lib/.

On CentOS 5.6 x64 , Kernel: 2.6.18-308.24.1.el5
1. yum install freeglut
2. ln -s /usr/lib/libglut.so.3 /usr/lib/libglut.so
then i also install CUDA 5.0 Sample successfully.
Thanks this post.

Ubuntu 12.04 x64 actually creates a /usr/lib/glut.so -- it just points to libglut.so.3 not /usr/lib/x86_64-linux-gnu/libglut.so
rm /usr/lib/libglut.so;
ln -s /usr/lib/x86_64-linux-gnu/libglut.so /usr/lib/libglut.so

Related

MyRocks Compilation Issue

The error is
my_compress.c:542: undefined reference to `LZ4F_resetDecompressionContext'
My os is centos 7.7.1908 and I have installed lz4 by yum install -y lz4-devel. The install directory is as follows:
work#ost:~/workspace/mysql-5.6/bld $ ls /usr/lib64/liblz*
/usr/lib64/liblz4.so /usr/lib64/liblz4.so.1 /usr/lib64/liblz4.so.1.7.5 /usr/lib64/liblzma.so.5 /usr/lib64/liblzma.so.5.2.2
work#ost:~/workspace/mysql-5.6/bld $ ls /usr/include/lz4*
/usr/include/lz4frame.h /usr/include/lz4.h /usr/include/lz4hc.h
I find the answer. The version of lz4 is too old. Please see it here(https://github.com/facebook/mysql-5.6/issues/1114)

CUDA 7.5 installation: Unsupported compiler error

I just tried installing CUDA 7.5 on my laptop. I disabled lightdm and did sudo sh cuda7.5.run. The driver installation passed but then I got an error Unsupported compiler ... and the installation fails. How can I resolve this issue?
I had a similar issue installing CUDA 7.5 in Ubuntu 16.04.
I've solved it using gcc/g++ 4.8 instead of 5.2.
You can install it and switch the default version using the command update-alternatives --install
For gcc 4.8 do:
sudo apt-get install gcc-4.8
sudo update-alternatives --remove-all gcc
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
For g++ 4.8 do:
sudo apt-get install g++-4.8
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10
The problem was with Ubuntu 15.10. I installed 14.04 and could install CUDA. However, for my laptop there was a subtle point to mention. I had to install the NVIDIA driver via System Settings --> Software & Updates --> Additional Drivers and selecting the tested driver. Then I installed CUDA and answered No to driver installation bundled with CUDA installation file.
You do not need to downgrade your gcc version.
For the people who want to keep their gcc version, I recommend you use the following way.
http://kislayabhi.github.io/Installing_CUDA_with_Ubuntu/
sudo apt-get update unity should also help

Error while installing json gem 'mkmf.rb can't find header files for ruby'

For context, it on a remote server which has a firewall. I'm setting up my environment through a proxy. I have ruby 1.8.7. When I try to gem install..
sudo gem install --http-proxy <host address>:<port> json
I get the following error:
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/json-1.8.1 for inspection.
Results logged to /usr/lib64/ruby/gems/1.8/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
Since I was unsure what the problem is, I googled and found these
gem install: Failed to build gem native extension (can't find header files) - the instructions here seem to be specific to the gem being installed.
How to install json gem - Failed to build gem native extension This seems to be slightly different error.
Any hints? Thanks!
Modern era update, as stated by mimoralea:
In case that you are using ruby 2.0 or 2.2 (thanks #patrick-davey).
sudo apt-get install ruby2.0-dev
sudo apt-get install ruby2.2-dev
sudo apt-get install ruby2.3-dev
or, generic way:
sudo apt-get install ruby-dev
or
sudo apt-get install ruby`ruby -e 'puts RUBY_VERSION[/\d+\.\d+/]'`-dev
The first link you’ve posted is exactly your case: there is no ruby development environment installed. Development env is needed to compile ruby extensions, which are mostly written in C. Proxy has nothing to do with the problem: everything is downloaded fine, just compilation fails.
I would suggest you to install ruby-dev (ruby-devel for rpm-based distros) package onto you target machine.
gcc package might be needed as well.
Try:
$ sudo apt-get install ruby-dev
Or, for Redhat distro:
$ sudo yum install ruby-devel
Or, for [open]SuSE:
$ sudo zypper install ruby-devel
For Xcode 11 on macOS 10.14, this can happen even after installing Xcode and installing command-line tools and accepting the license with
sudo xcode-select --install
sudo xcodebuild -license accept
The issue is that Xcode 11 ships the macOS 10.15 SDK which includes headers for ruby2.6, but not for macOS 10.14's ruby2.3. You can verify that this is your problem by running
ruby -rrbconfig -e 'puts RbConfig::CONFIG["rubyhdrdir"]'
which on macOS 10.14 with Xcode 11 prints the non-existent path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0
However, Xcode 11 installs a macOS 10.14 SDK within /Library/Developer/CommandLineTools/SDKs/MacOS10.14.sdk. It isn't necessary to pollute the system directories by installing the old header files as suggested in other answers. Instead, by selecting that SDK, the appropriate ruby2.3 headers will be found:
sudo xcode-select --switch /Library/Developer/CommandLineTools
ruby -rrbconfig -e 'puts RbConfig::CONFIG["rubyhdrdir"]'
This should now correctly print
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0
Likewise, gem install should work while that SDK is selected.
To switch back to the current Xcode SDK, use
sudo xcode-select --switch /Applications/Xcode.app
In case that you are using ruby 2.0 or 2.2 (thanks #patrick-davey) or 2.3 (thanks #juanitofatas).
sudo apt-get install ruby-dev
sudo apt-get install ruby2.0-dev
sudo apt-get install ruby2.2-dev
sudo apt-get install ruby2.3-dev
And you get the pattern here...
I also encountered this problem because I install Ruby on Ubuntu via brightbox, and I thought ruby-dev is the trunk of ruby. So I did not install. Install ruby2.3-dev fixes it:
sudo apt-get install ruby2.3-dev
For those who are getting this on Mac OS X you may need to run the following command to install the XCode command-line tools, even if you already have XCode installed:
sudo xcode-select --install
Also you must agree the terms and conditions of XCode by running the following command:
sudo xcodebuild -license
I had a similar problem using cygwin to run the following command:
$ gem install rerun
I solved it by installing the following cygwin packages:
ruby-devel
libffi-devel
gcc-core
gcc-g++
make
automake1.15
Most voted solution didn't work on my machine (linux mint 18.04).
After a careful look, i found that g++ was missing.
Solved with
sudo apt-get install g++
in case you use SUSE
sudo yast2 -i ruby-devel
Xcode 11 / macOS Catalina
On Xcode 11 / macOS Catalina, the header files are no longer in the old location and the old /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg file is no longer available.
Instead, the headers are now installed to the /usr/include directory of the current SDK path:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
Most of this directory can be found by using the output of xcrun --show-sdk-path. And if you add this path to the CPATH environment variable, then build scripts (including those called via bundle) will generally be able to find it.
I resolved this by setting my CPATH in my .zshrc file:
export CPATH="$(xcrun --show-sdk-path)/usr/include"
After opening a new shell (or running source .zshrc), I no longer receive the error message mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h and the rubygems install properly.
Note on Building to Non-macOS Platforms
If you are building to non-macOS platforms, such as iOS/tvOS/watchOS, this change will attempt to include the macOS SDK in those platforms, causing build errors. To resolve, either don't set CPATH environment variable on login, or temporarily set it to blank when running xcodebuild like so:
CPATH="" xcodebuild --some-args
In Fedora 21 and up, you simply open a terminal and install the Ruby Development files as root.
dnf install ruby-devel
On Mac 10.14, the header files don't seem to be installed in the correct place. Rather than changing paths like the other fixes, I was able to just run this:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Follow the instructions and it resolved this problem for me.
You may need to install gcc after install ruby-devel
Xcode -> Preferences -> Locations
change Command Line Tools to Xcode 11.2.1
You need to install the entire ruby and not just the minimum package. The correct command to use is:
sudo apt install ruby-full
The following command will also not install a complete ruby:
sudo apt-get install ruby2.3-dev
For Ubuntu 18, after checking log file mentioned while install
Results logged to /var/canvas/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/nio4r-2.5.2/gem_make.out
with
less /var/canvas/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/nio4r-2.5.2/gem_make.out
I noticed that make is not found. So installed make by
sudo apt-get install make
everything worked.
I faced a similar issue on Xcode 12 with macOS 10.15 and cocoapods. Just make sure that the xcode-select command points to the SDK you want to build against. It should build without issues afterwards.
BEFORE you follow the tip from Joki's answer (below) and IF :
you have MacOS 10.14.6
at /Library/Developer/CommandLineTools/SDKs/ you have folders
MacOSX.sdk(symbolic), MacOSX10.14.sdk, MacOSX10.15.sdk
Move MacOSX10.15.sdk to anywhere (admin privileges needs)
Delete symbolic link (admin privileges needs)
At /Library/Developer/CommandLineTools/SDKs/ create another symbolic link now to MacOSX10.14.sdk folder using (admin privileges needs)
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk MacOSX.sdk
Now you can follow Joki's answer
WARNING!
If you move MacOSX10.15.sdk folder to /Library/Developer/CommandLineTools/SDKs/ again, the command
ruby -rrbconfig -e 'puts RbConfig::CONFIG["rubyhdrdir"]'
will show MacOSX10.15.sdk folder like default again, nowadays I dunno how to fix it! My suggestion, compress the folder and put the original folder until fix will be available.
macOS RubyMine Gem installation failure
My problem with this error message was when trying to install a Gem via RubyMine. It didn't like that I had changed the global Ruby version with rbenv, so I fixed it by changing back to the system default Ruby version with:
rbenv global system
and restarted RubyMine.
sudo apt-get --reinstall install ruby
try it for ubuntu 16.04

cuda toolkit 5.0 installer does not create nvcc bin [duplicate]

I successfully installed the nvidia driver and toolkit for cuda 5 (but not the samples) on a 64 bit Ubuntu 12.04 box. The samples failed to install even though I previously ran
$ sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
I can't seem to find nvcc. I ran
$ export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64:$LD_LIBRARY_PATH
nvcc -v reports that the compiler is not found:
nvcc -V No command 'nvcc' found, did you mean: Command 'nvlc' from
package 'vlc-nox' (universe) nvcc: command not found
The getting started guide hasn't been of much help here:
http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html
What's going on here? Do I need to install the gpu computing sdk samples to get nvcc? :/
Consider installing CUDA 5.5 in Ubuntu 12.04. The 5.5 release has special leverages to install it as a debian package. See the following links,
https://developer.nvidia.com/content/cudacasts-episode-5-install-cuda-55-linux-package-manager
https://developer.nvidia.com/cuda-downloads
It is truly much easier than all that you have tried till now ! personal experience ! :-)
Failing to install samples is a common problem as outlines in https://sn0v.wordpress.com/2012/12/07/installing-cuda-5-on-ubuntu-12-04/#comment-869
The solution is to find "libglut.so" and create a soft-link to it under /usr/lib. Then re-run the cuda*.run and choose to install only the samples.
sudo find /usr -name libglut\*
sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so
sudo ./cuda*.run #when prompted only install samples. ie do not install drivers and toolkit.
works for me on ubuntu 12.04 hope it works for you too
I met the problem during the installation, but I found the sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so is useless. My solution is to install freeglut3 first:
`sudo apt-get install freeglut3`
then use:
sudo ln -s /usr/lib/libglut.so.3 /usr/lib/libglut.so
After this, CUDA sample is successfully installed.

Problems with install mysql 5.5.20 with homebrew

I installed homebrew and Xcode 4.3.2 with command line tools on Mac Osx Lion and when I now try to install mysql with :
brew install mysql -v
I get the error :
Error: #<BuildError: Failed executing: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.20 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.20/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mysql/5.5.20/share/doc/mysql -DINSTALL_INFODIR=/usr/local/Cellar/mysql/5.5.20/share/info -DINSTALL_MYSQLSHAREDIR=share/mysql -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DSYSCONFDIR=/usr/local/etc -DWITH_UNIT_TESTS=OFF -DWITH_READLINE=yes>
Here you find the full log :
https://gist.github.com/2421381
I checked the logs but there is nothing that can help me for the moment. Brew doctor is also clean and give no errors.
Found the solution with thanks to a reply of visoft on my gist post. This solution worked for me. The problem is coming from Cmake, I need version 2.8.7 instead of 2.8.8, run this code to get it work :
cd /usr/local
brew uninstall cmake
git checkout 948c2769 Library/Formula/cmake.rb
brew install mysql
After this, mysql was installed successfully.