compiling error "No rule to make target"

2,059 views
Skip to first unread message

Andrew Lambe

unread,
Sep 21, 2016, 11:08:20 AM9/21/16
to deal.II User Group
This is probably a really simple question to answer, but I haven't found the fix yet.

I recently upgraded my Ubuntu distribution to 16.04 and I'm trying to recompile deal.II (version 8.3) for the new OS. Note that I'm using version 3.4 of CMake which comes packaged with Ubuntu 16.04. Everything runs fine until I get this error from make:
...
[ 83%] Built target obj_meshworker.release
make[2]: *** No rule to make target '/usr/lib/liblapack.so', needed by 'lib/libdeal_II.so.8.3.0'.  Stop.
CMakeFiles/Makefile2:4643: recipe for target 'source/CMakeFiles/deal_II.dir/all' failed
make[1]: *** [source/CMakeFiles/deal_II.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

This seems odd since there is a file liblapack.so in the /usr/lib/ directory. Even specifying the directory with -DLAPACK_DIR=/usr/lib doesn't fix the problem. I'm not using any external linear algebra libraries, just available BLAS and LAPACK and routines packaged with deal.II.

Some searching on Google suggests it might be an issue with CMake finding the same library in multiple directories. If I type 'locate liblapack.so' in my terminal, I get this result:

/etc/alternatives/liblapack.so.3
/etc/alternatives/liblapack.so.3gf
/usr/lib/liblapack.so.3
/usr/lib/liblapack.so.3gf
/usr/lib/lapack/liblapack.so.3
/usr/lib/lapack/liblapack.so.3.6.0
/usr/lib/openblas-base/liblapack.so.3
/var/lib/dpkg/alternatives/liblapack.so.3

Another possibility is that it's a missing Ubuntu package that I need to download, but there's no hint as to which one.

Has anyone seen this error before and knows how to fix it?

Matthias Maier

unread,
Sep 21, 2016, 11:40:59 AM9/21/16
to Andrew Lambe, deal.II User Group

On Wed, Sep 21, 2016, at 10:08 CDT, Andrew Lambe <andrew....@gmail.com> wrote:

> This seems odd since there is a file liblapack.so in the /usr/lib/
> directory.

liblapack.so is typically a symlink to a versioned shared library
liblapack.so.X. It might simply be a stale symlink (pointing to a
nonexistent file).

Have you installed the packages libblas-dev and liblapack-dev?

Andrew Lambe

unread,
Sep 21, 2016, 12:55:31 PM9/21/16
to deal.II User Group, andrew....@gmail.com
That seems to have been the issue. I had to install libblas-dev, liblapack-dev, and libatlas-base-dev but the program installs normally now.

Thanks,
Andrew

Lisa Collins

unread,
Apr 3, 2017, 10:04:44 AM4/3/17
to deal.II User Group, andrew....@gmail.com
Hello,

After upgrading from Ubuntu 14.04 to 16.04, I faced similar problem:

make[2]: *** No rule to make target '/usr/lib/libmpi_f90.so', needed by 'test_step'.  Stop.
CMakeFiles/Makefile2:227: recipe for target 'CMakeFiles/test_step.dir/all' failed
make[1]: *** [CMakeFiles/test_step.dir/all] Error 2
Makefile:83: recipe for target 'all' failed

make: *** [all] Error 2


The code was working before this upgrade.
(note: I compiled deal_ii with MPI, P4EST and Trilinos packages enabled.)

Thanks.
Lisa

Timo Heister

unread,
Apr 3, 2017, 10:27:46 AM4/3/17
to dea...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages