make install fails

23 views
Skip to first unread message

Clebo Sevic

unread,
Mar 29, 2019, 9:19:58 AM3/29/19
to libtensor
This is the sequence i used to install your lib:
```
git clone https://github.com/juanjosegarciaripoll/tensor.git

cd tensor/

./autogen.sh

./configure --prefix=/home/me/Documents/dir1/dir2/lib/tensor/ LIBS="-llapack -lcblas -latlas" CXXFLAGS="" (this is the folder, where i git cloned it to, this step needs much more explanation)

make

make check

make doxygen-doc

make install:
make install
Making install in src
make[1]: Entering directory '/home/me/Documents/dir1/dir2/lib/tensor/src'
make[2]: Entering directory '/home/me/Documents/dir1/dir2/lib/tensor/src'
 /bin/mkdir -p '/home/me/Documents/dir1/dir2/lib/tensor/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libtensor.la '/home/me/Documents/dir1/dir2/lib/tensor/lib'
libtool: install: /usr/bin/install -c .libs/libtensor.so.0.0.0 /home/me/Documents/dir1/dir2/lib/tensor/lib/libtensor.so.0.0.0
libtool: install: (cd /home/me/Documents/dir1/dir2/lib/tensor/lib && { ln -s -f libtensor.so.0.0.0 libtensor.so.0 || { rm -f libtensor.so.0 && ln -s libtensor.so.0.0.0 libtensor.so.0; }; })
libtool: install: (cd /home/me/Documents/dir1/dir2/lib/tensor/lib && { ln -s -f libtensor.so.0.0.0 libtensor.so || { rm -f libtensor.so && ln -s libtensor.so.0.0.0 libtensor.so; }; })
libtool: install: /usr/bin/install -c .libs/libtensor.lai /home/me/Documents/dir1/dir2/lib/tensor/lib/libtensor.la
libtool: install: /usr/bin/install -c .libs/libtensor.a /home/me/Documents/dir1/dir2/lib/tensor/lib/libtensor.a
libtool: install: chmod 644 /home/me/Documents/dir1/dir2/lib/tensor/lib/libtensor.a
libtool: install: ranlib /home/me/Documents/dir1/dir2/lib/tensor/lib/libtensor.a
libtool: finish: PATH="/home/me/anaconda3/condabin:/home/me/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/environment-modules-3.2.10-2hbrcbm6rhirdz32t3o7b273v2ddpfo7/Modules/bin:/home/me/spack/bin:/home/me/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /home/me/Documents/dir1/dir2/lib/tensor/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /home/me/Documents/dir1/dir2/lib/tensor/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/me/Documents/dir1/dir2/lib/tensor/src'
make[1]: Leaving directory '/home/me/Documents/dir1/dir2/lib/tensor/src'
Making install in include
make[1]: Entering directory '/home/me/Documents/dir1/dir2/lib/tensor/include'
make[2]: Entering directory '/home/me/Documents/dir1/dir2/lib/tensor/include'
make[2]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/home/me/Documents/dir1/dir2/lib/tensor/include'
 /bin/mkdir -p '/home/me/Documents/dir1/dir2/lib/tensor/include/../include/tensor'
 /usr/bin/install -c -m 644  ../include/tensor/config.h '/home/me/Documents/dir1/dir2/lib/tensor/include/../include/tensor'
/usr/bin/install: '../include/tensor/config.h' and '/home/me/Documents/dir1/dir2/lib/tensor/include/../include/tensor/config.h' are the same file
Makefile:402: recipe for target 'install-nobase_includeHEADERS' failed
make[2]: *** [install-nobase_includeHEADERS] Error 1
make[2]: Leaving directory '/home/me/Documents/dir1/dir2/lib/tensor/include'
Makefile:521: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/me/Documents/dir1/dir2/lib/tensor/include'
Makefile:506: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
```

what went wrong, what do i have to change in the ./configure command?

Ulf Lorenz

unread,
Mar 29, 2019, 5:49:22 PM3/29/19
to Clebo Sevic, libtensor
If I read the output correctly, you cloned the tensor repository to
some directory "/home/me/Documents/dir1/dir2/lib/tensor/", and you
tried to use about the same directory as the prefix in the ./configure
command. This leads to trouble.

I read from that that you seem to be very new to autotools. As a
short description:

You have three directories:

A - The one where you clone the repository to.
B - The one where you build the program; this can be deleted after
installation; may be the same as A, though (clutters A with binary
files).
C - the one where you install the libraries etc. to. This should _not_
be the same as A/B. Defaults to /usr/local, but can be specified
with the --prefix

Now the steps would be:

* clone repository to A and run autogen there.
* go to directory B and run configure from there; run make and make
install there. "make install" must be run as root for installation
to /usr/local
* Access the stuff from C.

If C is not /usr/local, you may need some additional work for
compiling your own program (setting LD_LIBRARY_PATH, PATH, includes).
There is an installed script "tensor-config" under $PREFIX/bin that
provides the settings.

As an alternative, I can promote my own work and direct you to
https://sourceforge.net/p/wavepacket/cpp/wiki/VirtualMachine/
Just skip the part where it says "compile wavepacket", and you get an
installed tensor library in a virtual machine. Not a terribly elegant
way, but if you want a quick prototype system, that should do well
enough.


Ulf
Reply all
Reply to author
Forward
0 new messages