Skip to main content

Installing Julia on Linux Mint

I have started using Julia as my language of choice for mathematical programming. It is very nice, faster than Python, open source unlike Matlab, and an intuitive syntax so that migrating is simple. There are precompiled packages that can be downloaded from the website, but for whatever reason I had problems with them. One particular example was when performing a Cholesky decomposition of a matrix. As the matrix size increased the result became less and less similar to the Matlab decomposition of the same matrix and then crashed above a certain size. After googling for quite a while I found it was similar to issues other people had with the linear algebra subroutines. I found that downloading the source from github and compiling on my computer fixed the problem. Hence this is what I would recommend.

This is how to install from a clean install of Linux Mint 17.1, but it should be effectively the same as for any Ubuntu based Linux distribution. Firstly install git

sudo apt-get install git

and clone the latest stable release of julia (at the moment version 0.4) into your folder of choice

git clone -b release-0.4 https://github.com/JuliaLang/julia.git

Then start compiling by typing

make


The chances are that there will be some errors along the way where necessary packages are not installed. The short story is that I needed to install build-essential, gfortran, m4 and cmake.

The long version is that I received the following

checking for gcc... gcc -m64
checking whether the C compiler works... no
configure: error: in `/home/[user]/Documents/git/julia/deps/libuv':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** [libuv/config.status] Error 77
make: *** [julia-deps] Error 2


Inside the mentioned log file (./deps/libuv/config.log) there were lines

/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: No such file or directory


Which apparently is caused by missing the libc6-dev package. To install this and other useful packages install the build-essential package

sudo apt-get install build-essential

The next error was

make[2]: gfortran: Command not found

This is clearly because gfortran isn't installed, so

sudo apt-get install gfortran

Then

checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).

This is fixed by installing m4

sudo apt-get install m4

The final error was

/bin/sh: 2: cmake: not found

which is fixed (unsurprisingly) by

sudo apt-get install cmake

After these the compilation finished without further problems. Julia is then ready to use. Hopefully this list of errors and solutions will be of use to someone.


Comments

Popular posts from this blog

Serious Sam on Windows 10

As an extension of my post on running Unreal Tournament 2004 on Windows 10, this post is about running Serious Sam: The First Encounter and Second Encounter on the new Windows. Installation from the CD is fine, as is the patch to the latest version ( First Encounter , Second Encounter ). The biggest difficulty getting the game in a widescreen resolution. When the game runs for the first time it adds all the settings to a file: C:\Program Files (x86)\Croteam\Serious Sam\Scripts\PersistentSymbols.ini In this file set persistent extern INDEX sam_iScreenSizeJ=(INDEX)1080; persistent extern INDEX sam_iScreenSizeI=(INDEX)1920; persistent extern user FLOAT plr_fFOV=(FLOAT)105; save and exit. For me this worked without any issues for the Second Encounter, but the First Encounter had this file completely blank. It turns out that Windows does not allow the game to edit this file when it's not running in Administrator mode. To set this so that it runs in Admin mode every time right...

Latex package clash

Annoyingly, when trying to use the IOP journal template with the amsmath package you receive an error saying ! LaTeX Error: Command \equation* already defined.                Or name \end... illegal, see p.192 of the manual. which is caused by both amsmath and iopart having a definition for \equation*. This error occurs whether or not you are using \equation*. Not using amsmath makes writing maths so horrific you may as well use Word, but there is a way round; place the following lines before importing the amsmath package: \expandafter\let\csname equation*\endcsname\relax \expandafter\let\csname endequation*\endcsname\relax This removes the \equation* definition from iopart so that there isn't a clash when amsmath is imported. Perfect! Now you can use \align, \eqref, \text , etc. which are not part of the iopart package. I found this solution on stack exchange , but it took quite a while to find. Happy Latexing!

Hard case for Ibanez GA5TCE

One of the biggest criticisms of the Ibanez GA5TCE that I have seen is that Ibanez don't make a hard case for it. This wouldn't be so bad if it wasn't such an unusual size and shape for a classical acoustic, meaning you can't just use a generic case. After trying pretty much all of the cases in my local guitar shop they noticed that the Ibanez has a similar shape to the Alahambra slimline guitars, such as the 3 C CT , and Alahambra do make a hard case for them. The case has the catchy name " Cut-away thin Guitar Case 9565 " and turns out to fit the Ibanez GA5TCE almost perfectly. The case itself is black with a leather textured finish and copper coloured clasps. Inside it is black and fluffy like most cases. The guitar body fits snugly with effectively no movement. The neck is slightly thinner on the Ibanez than the Alahambra so the neck can move a few mm at the support. However, when the case is closed it seems very secure because the strings sit in the ...