Build problem - Ubuntu 16.04 - libblas.so

235 views
Skip to first unread message

Ben George

unread,
Mar 13, 2017, 12:14:05 PM3/13/17
to Plastimatch
I'm attempting to build plastimatch on Ubuntu 16.04.

I believe have successfully completed the first few steps on the Getting Started page in terms of installing ITK, DCMTK etc. however, I'm having issues building plastimatch itself.

I am able to run ccmake without any errors other than a warning about FindCUDA (which I believe is just a warning for the future). When I run make it fails at 73% with the following error:

make[2]: *** No rule to make target '/usr/lib/libblas.so', needed by 'plastimatch'. Stop.
CMakeFiles/Makefile2:1683: recipe for target 'src/plastimatch/cli/CMakeFiles/plastimatch.dir/all' failed
make
[1]: *** [src/plastimatch/cli/CMakeFiles/plastimatch.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make
: *** [all] Error 2

I've looked into this a little bit and believe I have all the required libraries installed. For example, running
apt-get install --dry-run libdlib-dev
says no packages are to be installed or upgraded.

I tested a couple of naive solutions to this:
1) My /usr/lib directory has libblas.so.3 so I tested ccmake with setting dlib_LIBARIES set to libdlib.so.3.
However, this just moved the problem to being unable to make the target 'libdlib.so.3'. In my /usr/lib folder, this file is just libdlib.so.

2) Creating a symbolink from libblas.so.3 -> libblas.so and libdlib.so -> libdlib.so.3.
This moved the problem to other files from the same library and wasn't resolving the situation.


I'm at the limit of my linux knowledge now and not sure what the solution is going to be.

Best wishes

Ben

Ben George

unread,
Mar 14, 2017, 9:24:21 AM3/14/17
to Plastimatch
An update on this issue.

I managed to fix the problem but continuing down my naive route of creating sybmolinks from the versioned library files (e.g., libblas.so.3) to a general copy (e.g. libblas.so) and vise-versa whenever the compiler gave errors. I needed to do this for 3 or 4 files. Once I had done this the source compiled correctly.

I'm not sure where the problem lies exactly, whether it is an issue of how some of the libraries are installed on Ubuntu (without the *.so sybmolink), or something else.

Best wishes

Ben

Gregory Sharp

unread,
Mar 14, 2017, 11:02:47 AM3/14/17
to Ben George, Plastimatch

Hi Ben,

Just a quick note that I could reproduce the problem, and will
update when there is a fix. Thank you for reporting this.

Greg



On Tue, 14 Mar 2017 06:24:20 -0700
Ben George <bge...@gmail.com> wrote:

> An update on this issue.
>
> I managed to fix the problem but continuing down my naive route of creating
> sybmolinks from the versioned library files (e.g., libblas.so.3) to a
> general copy (e.g. libblas.so) and vise-versa whenever the compiler gave
> errors. I needed to do this for 3 or 4 files. Once I had done this the
> source compiled correctly.
>
> I'm not sure where the problem lies exactly, whether it is an issue of how
> some of the libraries are installed on Ubuntu (without the *.so sybmolink),
> or something else.
>
> Best wishes
>
> Ben
>
> On Monday, 13 March 2017 16:14:05 UTC, Ben George wrote:
> >
> > I'm attempting to build plastimatch on Ubuntu 16.04.
> >
> > I believe have successfully completed the first few steps on the Getting
> > Started page in terms of installing ITK, DCMTK etc. however, I'm having
> > issues building plastimatch itself.
> >
> > I am able to run *ccmake *without any errors other than a warning about
> > FindCUDA (which I believe is just a warning for the future). When I run
> > *make* it fails at 73% with the following error:
> >
> > make[2]: *** No rule to make target '/usr/lib/libblas.so', needed by
> > 'plastimatch'. Stop.
> > CMakeFiles/Makefile2:1683: recipe for target
> > 'src/plastimatch/cli/CMakeFiles/plastimatch.dir/all' failed
> > make[1]: *** [src/plastimatch/cli/CMakeFiles/plastimatch.dir/all] Error 2
> > Makefile:160: recipe for target 'all' failed
> > make: *** [all] Error 2
> >
> > I've looked into this a little bit and believe I have all the required
> > libraries installed. For example, running
> > apt-get install --dry-run libdlib-dev
> > says no packages are to be installed or upgraded.
> >
> > I tested a couple of naive solutions to this:
> > 1) My */usr/lib* directory has *libblas.so.3 *so I tested *ccmake *with
> > setting *dlib_LIBARIES *set to *libdlib.so.3*.
> > However, this just moved the problem to being unable to make the target
> > 'libdlib.so.3'. In my /usr/lib folder, this file is just *libdlib.so*.
> >
> > 2) Creating a symbolink from libblas.so.3 -> libblas.so and libdlib.so ->
> > libdlib.so.3.
> > This moved the problem to other files from the same library and wasn't
> > resolving the situation.
> >
> >
> > I'm at the limit of my linux knowledge now and not sure what the solution
> > is going to be.
> >
> > Best wishes
> >
> > Ben
> >
>


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Sharp, Gregory C.

unread,
Mar 14, 2017, 12:27:17 PM3/14/17
to Plastimatch, Ben George
Hi again,

I succeeded using a fresh install of Ubuntu 16.04. There is a bug in documentation.
The web pages omit that the following packages are needed:

sudo apt-get install libblas-dev liblapack-dev libsqlite-dev

Installing libblas-dev should create the links correctly for stock blas.
Let me know if re-installing works. Or if you are using a different blas,
I didn't try that, so please let me know.

Greg
--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ben George

unread,
Mar 14, 2017, 12:41:36 PM3/14/17
to Plastimatch, bge...@gmail.com, GCS...@partners.org
Hi Greg

Thank you for your reply.

As I mentioned above, I have managed to get the source compiled by manually creating the links required. However, I'm pretty sure I installed all the required packages. I just checked with
sudo apt-get install --dry-run libblas-dev liblapack-dev libsqlite-dev
and the only components that were not already installed were from the libsqlite-dev package.

Sharp, Gregory C.

unread,
Mar 14, 2017, 2:18:37 PM3/14/17
to Plastimatch

Hi Ben,

 

I think this problem might be specific to your install.  What I have is this:

 

/usr/lib/libblas.so  ->  /etc/alternatives/libblas.so ->  /usr/lib/libblas/libblas.so  ->  /usr/lib/libblas.so.3.6.0

 

The “alternatives” thing is how debian systems handle the default choice when you have multiple libblas or multiple gcc versions.  You can query yours like this:

 

update-alternatives --display libblas.so

 

I think (but not sure) the way to set your preferred libblas is like this:

 

update-alternatives --set libblas.so /usr/lib/libblas/libblas.so

 

This should have been done by the install script.  Not sure why it didn’t work for you. 

 

Greg

Ben George

unread,
Mar 15, 2017, 1:50:16 PM3/15/17
to Plastimatch, GCS...@partners.org
Hi Greg

It is strange that the links weren't set automatically. Although the cause might be a little uncertain, I've definitely learnt a lot more about cmake and libraries in the process!

Ben
Reply all
Reply to author
Forward
0 new messages