Windows - MINGW Build GSL for Ruby-GSL - ruby

Hi I am on windows 7 and wanted to install GSL http://www.gnu.org/software/gsl/ so that I can use it with Ruby GSL http://rb-gsl.rubyforge.org/.
I have MINGW and MSYS installed. I found a binary installer for GSL for version 1.13 here http://ascend4.org/Binary_installer_for_GSL-1.13_on_MinGW but since the latest version is 1.15 released the 6th May 2011 I thought it would be good to build it to install it but I don't how.
Can anyone tell me how to build it so it will install windows?

I modified the steps for installing the GNU Linear Programming Kit (GLPK) which has also has ruby wrapper, "rglpk".
http://en.wikibooks.org/wiki/GLPK/Ruby
Open
Run
cd /C/temp/gsl-1.14
./configure --enable-shared
make
make check
make install
cp include/gsl-config /C/Ruby193/include/ruby-1.9.1
cp src/.libs/libgsl.a /C/Ruby193/lib
gem install gsl
If that does not work, it might make more sense to install Ubuntu on Virtual Box and build your packages there.
https://www.virtualbox.org/
http://www.ubuntu.com/

Related

Run or use GCC without install

Can I use GCC for e.g GCC4.0.3 without installation
In my macOS I have installed Clang xcode , and GCC from Homebrew
In my Linux they are installed as well
But I want to use GCC (Specially older version) besides most updated version
Like NVM that manage Node version and it lets you install many nodejs with different version on your system
I want to use GCC4 specially for science and compiling Old FORTRAN to make my Source codes run and see the results
In new OS both macOS and Linux when you install gcc it will install most updated and that is not useful for old fortran or old codes.
So In my solution i think its better to use gcc without install or even install gcc to custom directory folder and copy the codes in that directory and compile them but not to install as wide system and make incompatibility with default GCC and CLANG on system
Thanks in advance

MSYS2 specify version of mingw32 or mingw64 gcc

Is there a way to specify the GCC version i would like to install?
I only get the latest version if i install it that way:
pacman -S mingw-w64-x86_64-gcc
You can find a few older versions of GCC here:
http://repo.msys2.org/mingw/x86_64/
You can download them with wget and install them with pacman -U filename if I recall correctly. Note that using old packages in this way is a process prone to error because the packages might depend on older versions of their dependencies, which you would also have to install. Also, when you run pacman -Syu it would try to upgrade your GCC to the latest version.
You might be better off building the older versions of GCC yourself and installing them with a different name so they don't conflict with the MSYS2 packages.

Exe's compilation on Solaris 11 env using gcc

I am on Solaris 11 environment and gcc-3.4.6 is installed on it. The problem is that I am not able to compile exe's there, The error is
-sh: gcc: gcc: cannot execute [Invalid argument]
even if I write gcc only it gives the same error. Kindly help.
Unlike in Solaris 10, on Solaris 11 the GCC is not installed by default.
Fear not.
By far the easiest is to use IPS to install it using the commands below (while being root or other superuser):
pkg install pkg://solaris/developer/build/gnu-make
pkg install pkg://solaris/developer/build/make
pkg install pkg://solaris/developer/gcc-45
pkg install pkg://solaris/system/header
pkg install pkg://solaris/developer/build/autoconf
pkg install pkg://solaris/developer/build/automake-110
This will give you all the tools you typically need to build various open source software packages.
Note that some of the packages have a version number in the package name itself, e.g. gcc-45. You may be able to find even later versions in the package repository, for example for Solaris 11.2 Beta you'll find you have a choice of GCC 4.5, 4.7 or 4.8. The same applies to automake which is now also available in v1.11.
(recipe from my posting here)

How can I prevent homebrew from upgrading VTK dependency for PCL?

I would like to install the pcl formula through homebrew, which is documented here:
http://www.pointclouds.org/documentation/tutorials/installing_homebrew.php
Unfortunately, homebrew decides it needs to upgrade my VTK installation to the latest release (6.0) even though I have a perfectly working version (5.10.1) installed already. I would like to compile against and link with this existing version. (The minimum VTK version for pcl is listed as 5.6.1, so everything should work fine. I actually manually build pcl and tried to link it against VTK 6.0, which doesn't even work, yet.)
Therefore, my question is, why does homebrew try to upgrade VTK (to an incompatible version) and how can I prevent it from doing this?
All I am calling is: brew install pcl, which triggers this:
==> Installing pcl dependency: vtk
==> Downloading http://www.vtk.org/files/release/6.0/vtk-6.0.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/vtk-6.0.0.tar.gz
This eventually leads to an error, as vtk 6.0 does not compile under Mac OS X 10.9 through homebrew (https://github.com/Homebrew/homebrew-science/issues/401).
To be clear, even if VTK 6.0 would compile fine, I do not want to upgrade, so does anyone know how to prevent homebrew from upgrading a dependent formula?
You can trick Homebrew to think it has Vtk 6.0 installed. For that you have to run this command in a terminal
ln -s /usr/local/Cellar/vtk/5.10.1 /usr/local/Cellar/vtk/6.0.0
When the time comes for you to really want to update vtk, just eliminate that symlink with
rm /usr/local/Cellar/vtk/6.0.0
and let Homebrew do its job.
Homebrew actually has a formula for vtk5 separately now, so this should now be the correct way to install it (currently it's 5.10.1).
brew install vtk5 --with-qt
You also need eigen, flann, qhull and boost. Also useful, but optional is getting sphinx via pip install sphinx if you want docs. If you want to build simulations (see below option) then you need to get glew too (although it wouldn't find the header).
I can verify that this works on 10.8 and will check 10.9 tonight. I've had problems installing 1.7.1 from the archive, but cloning the github repository worked for me.
$ git clone https://github.com/PointCloudLibrary/pcl pcl-trunk
$ cd pcl_trunk
$ mkdir build; cd build
$ cmake .. -DBUILD_global_tests=ON -DBUILD_examples=ON -DBUILD_simulations=ON
$ ./configure; make; make install
Without VTK you can get to a few % before the PCL install fails. Installing VTK with X11 seems to be a recipe for a disaster here, I had to manually install libX11, libXt and others because VTK was trying to include the incorrect headers. The problems continued with OpenGL and I couldn't compile past around 42%. I reinstalled vtk5 without --with-x11 and it compiled fully.
There is a PCL formula for Homebrew knocking around, but it's rarely updated and I didn't have much luck editing it (not familiar enough with Brew's syntax). I tried to update it and submit a pull request, but when it came to testing the actual 'stable' build fails at the moment so there's no point.
EDIT: To be clear, installing the 1.7.1 tarball fails due to some problem with Eigen (around 12% in when compiling pcl_search).
Proposed pull request, it's a HEAD only fix at the moment.
https://github.com/ros/homebrew-hydro/pull/7
Just downgrade to previous version.
1) cd /usr/local/Library/Taps/homebrew-science/
2) brew versions vtk
3) git checkout 27a4327 vtk.rb
4) brew uninstall vtk && brew install vtk

Building Ruby 32-bit on CentOS 5

I've been having trouble trying to ./configure && make && make install ruby 1.9.2 in CentOS 64-bit as a 32-bit package. No matter how I configure and build it, it always seems to come out as a 64-bit package.
I've tried running the ./configure command with the CFLAGS="-m32" LDFLAGS="-m32" CXXFLAGS="-m32" and the —target=i686-unknown-linux-gnu option. That last option changed the architecture that showed up in the resulting ruby command, but it was still 64-bit.
I've also tried installing rvm and then installing ruby 1.9.2 with the flags they recommended in their troubleshooting docs.
I'm also trying ./configure && make in a 32-bit installation of CentOS I have and then copying that over to my 64-bit install and then running make install. I have no idea if this will work.
I've been looking around the internet for help for well over a day and can't seem to find much on google. It seems that I'm not finding the magical combination of options to set when running ./configure && make && make install.
Let me know if you need any more information and I'd be happy to provide it. Thanks for your help.
Edit: Looked over my sources on the internet and reread this, specifically someone's instructions on how to compile Ruby as 32-bit, using the search command. I used yum to install setarch and then followed those directions - still no luck. Ruby's still compiling as 64-bit.
Have you installed these libraries - http://www.linuxweblog.com/blogs/sandip/20080718/support-32-bit-development-libraries-64-bit-centos

Resources