R library link problems

756 views
Skip to first unread message

igor gregovitch

unread,
Oct 7, 2011, 2:15:34 PM10/7/11
to rattle...@googlegroups.com
Hi,

There is a problem with R Rattle packages gfortran compilation, under Debian Linux. The compilation message error is :

/usr/bin/ld: cannot find -lgfortran

/usr/bin/ld: cannot find -lquadmath

So some crucial Rattle packages like SVM cannot be build.

In fact, the problem is that links to those library are not set for this version. You can see there with the command : 

$ sudo ldconfig -p | grep libgfortran

libgfortran.so.3 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgfortran.so.3

So just create some symbolic links to them under /usr/lib repertory, then a sudo ldconfig to reload, and that's ok.

$ sudo ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/lib/libgfortran.so

$ sudo ln -s /usr/lib/x86_64-linux-gnu/libquadmath.so.0 /usr/lib/libquadmath.so

$ sudo ldconfig


Well, also, I use neural network a lots, and it will be great if we could have more options with it (I must use R commands to set them if not).


Thanks,

Graham Williams

unread,
Oct 8, 2011, 5:10:39 PM10/8/11
to rattle...@googlegroups.com
Hi Igor,

Thanks for the report of the issue.

On 8 October 2011 05:15, igor gregovitch <d.ba...@gmail.com> wrote:
> Hi,
>
> There is a problem with R Rattle packages gfortran compilation, under Debian
> Linux. The compilation message error is :
>
> /usr/bin/ld: cannot find -lgfortran
>
> /usr/bin/ld: cannot find -lquadmath

That is odd.

A similar issue is often because some "-dev" packages are not
installed but I don't think that is the case here.

Specifically, which package was Rattle (or you) attempting to install?

> So some crucial Rattle packages like SVM cannot be build.

I've tested reinstalling the kernlab package and that compiles on my
Ubuntu servers. (I use kernlab to provide the SVM functionality in
Rattle.)

> In fact, the problem is that links to those library are not set for this
> version. You can see there with the command :
>
> $ sudo ldconfig -p | grep libgfortran
>
> libgfortran.so.3 (libc6,x86-64) =>
> /usr/lib/x86_64-linux-gnu/libgfortran.so.3

I get this also on my Ubuntu boxes.

> So just create some symbolic links to them under /usr/lib repertory, then a
> sudo ldconfig to reload, and that's ok.
>
> $ sudo ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.3
> /usr/lib/libgfortran.so

On my system:

$ ls /usr/lib/libgfortran*
ls: cannot access /usr/lib/libgfortran*: No such file or directory

So I don't seem to need these links.

> $ sudo ln -s /usr/lib/x86_64-linux-gnu/libquadmath.so.0
> /usr/lib/libquadmath.so
>
> $ sudo ldconfig

And did the install then work? Seems odd that you need to do that,
given that ldconfig is already finding them?

> Well, also, I use neural network a lots, and it will be great if we could
> have more options with it (I must use R commands to set them if not).

What options would you like?

The options that get into the interface are driven by what people find
they commonly need - so let me know what you would commonly need.

Regards,
Graham

igor gregovitch

unread,
Oct 9, 2011, 10:25:09 AM10/9/11
to rattle-users
Hi Graham,

Thanks for the reply.

Well, the issue is for debian systems, and specialy sid debian (R
version 2.13.1), which may have different package version than ubuntu.
I will redo this with removing the links.
So I remove links :
sudo rm /usr/lib/libgfortran.so
sudo rm /usr/lib/libquadmath.so
sudo ldconfig
Then I remove kernlab package
remove.package("kernlab")

Then I run Rattle and try to install kernlab for SVM. Then an error
occurs (Error in eval(expr, envir, enclos) : no "ksvm" function
found), and under R console :
* installing *source* package ‘kernlab’ ...
** libs
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c brweight.cpp -
o brweight.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c ctable.cpp -o
ctable.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c cweight.cpp -o
cweight.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dbreakpt.c -o dbreakpt.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dcauchy.c -o dcauchy.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dgpnrm.c -o dgpnrm.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dgpstep.c -o dgpstep.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dprecond.c -o dprecond.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dprsrch.c -o dprsrch.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dspcg.c -o dspcg.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dtron.c -o dtron.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dtrpcg.c -o dtrpcg.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
dtrqsol.c -o dtrqsol.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c esa.cpp -o
esa.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c
expdecayweight.cpp -o expdecayweight.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c
inductionsort.cpp -o inductionsort.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c
kspectrumweight.cpp -o kspectrumweight.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c lcp.cpp -o
lcp.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
misc.c -o misc.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c msufsort.cpp -
o msufsort.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
solvebqp.c -o solvebqp.o
gcc -I/usr/share/R/include -fpic -std=gnu99 -O3 -pipe -g -c
stringk.c -o stringk.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c
stringkernel.cpp -o stringkernel.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c svm.cpp -o
svm.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c wkasailcp.cpp -
o wkasailcp.o
g++ -I/usr/share/R/include -fpic -O3 -pipe -g -c wmsufsort.cpp -
o wmsufsort.o
g++ -shared -o kernlab.so brweight.o ctable.o cweight.o dbreakpt.o
dcauchy.o dgpnrm.o dgpstep.o dprecond.o dprsrch.o dspcg.o dtron.o
dtrpcg.o dtrqsol.o esa.o expdecayweight.o inductionsort.o
kspectrumweight.o lcp.o misc.o msufsort.o solvebqp.o stringk.o
stringkernel.o svm.o wkasailcp.o wmsufsort.o -llapack -lblas -
lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lquadmath
collect2: ld returned 1 exit status
make: *** [kernlab.so] Erreur 1
ERROR: compilation failed for package ‘kernlab’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/2.13/kernlab’

Same problem occurs with some others packages. So I redo links and
that's ok (the library links problem is frequent under linux).

It is just a wish, but for nnet package, the softmax, decay, rang,
maxit, abstol and reltol option seems to be determinant. In an article
http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Guenther+Fritsch.pdf
it is said there is some other neural network package too, like
neuralnet witch do nice graph and maybe witch use better algorithms.

Regards,


On 8 oct, 23:10, Graham Williams <Graham.Willi...@togaware.com> wrote:
> Hi Igor,
>
> Thanks for the report of the issue.
>

Graham Williams

unread,
Oct 9, 2011, 5:28:41 PM10/9/11
to rattle...@googlegroups.com
Thanks for the details Igor. It looks like your "sid" (unstable)
installation is broken.

The issue looks to be with R (or sid) rather than Rattle. Try

$ R
[...]
> install.packages(kernlab)

to hopefully replicate the error, to eliminate rattle.

If other packages have the same issue you may have a broken
installation of Debian.

You could check https://stat.ethz.ch/mailman/listinfo/r-sig-debian but
a quick look does not indicate any others having issues with sid.

If the problem persists then it may be useful to post to that mailing list.

Thanks for the neuralnet pointer. I'll have a look as time permits to
adding this functionality.

Regards,
Graham

> --
> You received this message because you are subscribed to the Google Groups "rattle-users" group.
> To post to this group, send email to rattle...@googlegroups.com.
> To unsubscribe from this group, send email to rattle-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rattle-users?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages