[rkward-tracker] [ rkward-Bugs-1482468 ] build error on 0.3.6 cannot find -lRlapack

SourceForge.net noreply at sourceforge.net
Sun May 7 11:06:42 UTC 2006

Bugs item #1482468, was opened at 2006-05-05 15:11
Message generated for change (Comment added) made by tfry
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Closed
Resolution: None
Priority: 5
Submitted By: Brian Peterson (braverock)
Assigned to: Nobody/Anonymous (nobody)
Summary: build error on 0.3.6 cannot find -lRlapack

Initial Comment:
I've successfu0lly built and used rkward-0.3.5.  I was
trying to create a Gentoo ebuild package file for
rkward 0.3.6 so that upgrades would be easier, and
distribution of rkward would be greater.  From both the
ebuild and from trying to build from a shell, the build
fails with the following:

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..
-I/usr/kde/3.5/include -I/usr/qt/3/include -I.  
-Wno-long-long -Wundef -Wall -W -Wpointer-arith
-Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-Wcast-align -Wconversion -Wchar-subscripts -O2 -O2
-march=pentium3 -fomit-frame-pointer -Wformat-security
-Wmissing-format-attribute -fno-exceptions
-fno-check-new -fno-common  -c -o rkward_skel.o `test
-f 'rkward_skel.cpp' || echo './'`rkward_skel.cpp
/bin/sh ../libtool --silent --mode=link --tag=CXX
i686-pc-linux-gnu-g++  -Wnon-virtual-dtor
-Wno-long-long -Wundef -Wall -W -Wpointer-arith
-Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-Wcast-align -Wconversion -Wchar-subscripts -O2 -O2
-march=pentium3 -fomit-frame-pointer -Wformat-security
-Wmissing-format-attribute -fno-exceptions
-fno-check-new -fno-common    -o rkward.bin -L/usr/lib
-L/usr/qt/3/lib -L/usr/kde/3.5/lib  -R /usr/kde/3.5/lib
-R /usr/qt/3/lib -R /usr/lib rkwatch.o rkward.o main.o
rkglobals.o robjectbrowser.o rkeditormanager.o
robjectviewer.o khelpdlg.o rkconsole.o rkward_skel.o
../rkward/misc/libmisc.a -lkhtml -lkmdi -lkio -lkdeui
-lkdecore -lqt-mt  -lz -lpng -lz -lm -lXext -lX11  -lSM
-lICE -lpthread  -L/usr/lib/R/lib -lR -lRlapack
cannot find -lRlapack
collect2: ld returned 1 exit status
make[3]: *** [rkward.bin] Error 1

I think that lib Rlapack is missing.  I'm wondering if
this is something configured wrong in the build

I'm using R-2.2.1 with blas and lapack support compiled in.

I'm using lapack-3.0, and blas-19980702-r2.

When I look for lapack libraries that could be linked
with rkward, I see:


So, I suspect that rkward probably needs 
/usr/lib/R/modules/lapack.so (what else could Rlapack
be?).  I tried a symbolic link from 
sudo ln -s /usr/lib/R/modules/lapack.so
but that didn't do it.

I'll try to look deeper into the code at issue, but any
assistance would be appreciated.


   - Brian Peterson


>Comment By: Thomas Friedrichsmeier (tfry)
Date: 2006-05-07 13:06

Logged In: YES 

Hi Brian,

we receive automatic messages on tracker activity in a
dedicated mailing list (but yes, it took a long time until I
finally found at about this extremely useful feature).
Again, we don't really use the "Assigned To"-field ATM,
since we're still a small project, and rarely need much
formal coordination. So nothing to worry about.

I suppose the symbolic link thing does not really do
anything meaningful, but satisfies the linker. I'll add a
check to ./configure to only link against -lRlapack, if that

Maybe you could drop us a mail with details about the
sandbox violations on rkward-devel? I think I have an idea,
where at least some of this comes from, but details would be

Note that RKWard continues to support R releases starting
with R 2.1.0. The -lRlapack problem should be unrelated to R
releases (only to R build options). The only thing to note
is that between R 2.2.x and R 2.3.0 a rebuild of rkward is
needed (i.e. RKWard compiled with R < 2.3.0 will not work
with R >= 2.3.0 and vice versa), and unfortunately, there is
nothing we can do about this.



Comment By: Brian Peterson (braverock)
Date: 2006-05-06 17:09

Logged In: YES 

Sorry about the Assigned To field.  I just know that
Sourceforge, by default, won't notify developers of new
Tracker items like it does for Forum posts. Also, many
projects make extensive use of the Assigned To field for
triage and coordination.  (I run or contribute to a couple
of SF's top 100 projects).

Creating the symbolic link resolved the problem.  I suggest
that you may want to check and see if R was built with
lapack support before making a requirement like this.

I also got a couple of build sandbox errors which I was able
to work around in the ebuild script.  I'm going to test on a
few more machines, and then I'll submit the ebuild both to
Gentoo for inclusion and to the RKWard project via the
Patches tracker.

I'll mark this as closed, but I think you still want to
consider how to make the rkward build process more
resilient, and continue to support R 2.2.x, since R 2.3.0
was only released on 2006-04-24, and is not yet widely
deployed (or packaged with any distro that I'm aware of yet).


  - Brian


Comment By: Thomas Friedrichsmeier (tfry)
Date: 2006-05-05 15:46

Logged In: YES 

Thanks for your bug-report, and of course thanks for your
packaging efforts!

In RKWard 0.3.6 I added the -lRlapack switch, as otherwise,
with R 2.3.0, sometimes some base packages could not be
loaded due to unresolved symbols. RKWard itself does not use
the library, but this way it loads it for R packages to use.
I have not fully investigated, why exactly this happens.
In fact, ATM, I do not seem to be able to reproduce this.
Maybe it was a temporary bug in one of the pre-release
versions of R 2.3.0 I tested, and has since been fixed. I do
not know, and would appreciate any insight.

Ok, how to work around this? Probably the most
straightforward way would be to edit rkward/Makefile.am and
remove the -lRlapack switch there (I do not know, whether
this is possible in gentoo packaging, but I hope so). If
everything works fine, then (remember to test with R 2.3.0,
too), that should be the best way, and I'll probably remove
the switch in the next release of RKWard (after some more

You might also try some other things first:
1) ln -s /usr/lib/R/modules/lapack.so
/usr/lib/R/lib/libRlapack.so (that is the location ldd will
be searching for -lRlapack)
2) Upgrade to R 2.3.0. Maybe some configuration options
changed there.

Please keep me up-to-date on whether or not this works.


P.S.: Please don't set the "Assigned to" field, when
submitting bug reports. We don't really use this field ATM,
but it's rather intended to be an internal way of signalling
"I'm taking care of this" among the developers, not a
setting intended to be made by the submitter.


You can respond by visiting: 

More information about the rkward-tracker mailing list