Installing Julia on Ubuntu12.04

321 views
Skip to first unread message

Dirk Fortmeier

unread,
Jan 29, 2014, 4:36:45 AM1/29/14
to julia...@googlegroups.com
Hi,

A few days ago I installed julialang on my laptop (Ubuntu 12.04). Now, I want to install it on my desktop machine (Ubuntu 12.04 as well), but while running make this error appears:

$ make
...
...

/usr/bin/ld: cannot find -lgfortran
collect2: ld returned 1 exit status
make[4]: *** [../libopenblasp-r0.2.8.so] Error 1
make[3]: *** [shared] Error 2
*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0 if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***
make[2]: *** [openblas-v0.2.8/libopenblas.so] Error 1
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2



fortran is installed on this machine:

# apt-get install libgfortran3 gfortran
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gfortran is already the newest version.
libgfortran3 is already the newest version.
The following packages were automatically installed and are no longer required:
  patchutils dpatch
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

Any ideas?

Kind regards,

Dirk

Rajn

unread,
Jan 29, 2014, 10:37:48 AM1/29/14
to julia...@googlegroups.com
Hi,
On the Github (or perhaps on the download?) page of Julia there are instructions as to what you should do when 'make' fails. There is a procedure for BLAS failure mentioned there.
You have to make a new file if it already does not exist called Make.user and then type in those commands. Then do a 'make clean' or 'make cleanall' and then try 'make' again.
Maybe you already tried it?

Dirk Fortmeier

unread,
Jan 31, 2014, 5:26:09 AM1/31/14
to julia...@googlegroups.com
Hi, 
thanks for your suggestions, somehow I was fixed on fixing the missing gfortran. I did as you said, add added to Make.user:

USE_SYSTEM_BLAS=1
LIBBLAS=-lopenblas
LIBBLASNAME=libopenblas

make now produces:

precompile.jl
LoadError("sysimg.jl",234,LoadError("precompile.jl",11,ErrorException("error compiling _start: error compiling check_blas: error compiling blas_vendor: could not load module libopenblas: libopenblas: cannot open shared object file: No such file or directory")))
make[1]: *** [/data_yipyip2/fortmeier/julia/usr/lib/julia/sys0.bc] Error 1
make: *** [release] Error 2

Previously, I have installed these packages:
# apt-cache search openblas
libopenblas-base - Optimized BLAS (linear algebra) library based on GotoBLAS2
libopenblas-dev - Optimized BLAS (linear algebra) library based on GotoBLAS2

searching for the lib gave these results
$ find /usr/lib/ -name "libopenblas*"
/usr/lib/openblas-base/libopenblas.so
/usr/lib/openblas-base/libopenblas.so.0
/usr/lib/openblas-base/libopenblas.a

Maybe someone can help?

Rajan Gurjar

unread,
Jan 31, 2014, 10:00:27 AM1/31/14
to julia...@googlegroups.com
Your error message (the first post) suggests a solution. Did you try those?
It is surprising that same OS gives problems on desktop but runs on laptop.

I am not an expert and I too had lot of trouble installing Julia and it had to do with LLVM and certain processors. It seems certain processors can only install Julia if you have LLVM ver3.3 or higher. But not sure if your issue is similar.

I am sure some one will help you but I would first try what is being suggested in your error message: *** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0 if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***

Dirk Fortmeier

unread,
Jan 31, 2014, 12:04:01 PM1/31/14
to julia...@googlegroups.com
None of this worked for me, so I went back to my initial problem with gfortran.
I created a symlink 

# cd /usr/lib/x86_64-linux-gnu/
# ln -s libgfortran.so.3 libgfortran.so

and now it works. Will have a look at my laptop later ...

Thanks anyway :)
Reply all
Reply to author
Forward
0 new messages