blitzpp / blitz

Blitz++ Multi-Dimensional Array Library for C++
https://github.com/blitzpp/blitz/wiki
Other
404 stars 83 forks source link

How to use/install Blitz++ #95

Closed ClmnsRck closed 5 years ago

ClmnsRck commented 5 years ago

Hey, I am currently trying to install/use blitz++ on my Ubuntu machine. After cloning the repository to my desired location, what do i have to do? The INSTALL file is not really any help, because all the mentioned things, i should do are not working. Below the Things i mean:

./configure
configure: error: cannot find install-sh, install.sh, or shtool in config "."/config
make blitz-library
make: *** No rule to make target 'blitz-library'.  Stop.
autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.ac:84: warning: macro 'AM_DISABLE_SHARED' not found in library
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:84: error: possibly undefined macro: AM_DISABLE_SHARED
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:85: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1

The installation process really could use an overhaul ... if i only want to use the library locally in a project, do i even have to install blitz++? Why cant i just use it? If i am doing something wrong, please tell me how to fix my issue. Thx in advance

citibeth commented 5 years ago

Slayoo said:

There is no build guide I know of that would match the current version. We can try to help here as much as we can, some hints are also perhaps to be found in the .travis.yml file which is used to automate the build on Linux for continuous integration: https://github.com/blitzpp/blitz/blob/master/.travis.yml


Citibeth said:

Steps to build Blitz++ (or anything, for that matter):

  1. Download Spack auto-installer and get acquainted with it: https://spack.io/

  2. Type spack install blitz

  3. If anything goes wrong, post to the Spack email list or Issues section on GitHub.

  4. If you really REALLY prefer doing things the hard way and like installing things manually, then look inside the Spack recipe for Blitz, and it will show you any weird thing it does, beyond "./configure;make;make install". But seriously... learning Spack will be easier, and will give you a TON of dividends in the long run.

Good luck!


The installation process really could use an overhaul ... if i only want to use the library locally in a project, do i even have to install blitz++? Why cant i just use it? If i am doing something wrong, please tell me how to fix my issue.

These are very basic questions regarding how software build and install works, especially with Autotools. If you don't want to become an expert on this stuff, I HIGHLY recommend using Spack. It's easier, it's automated, and it works the same for all packages. But to answer your questions:

  1. Autotools packages checked out from a git repo require the use of Autoreconf. WHen downloaded as a .tar.gz they usually don't need autoreconf. Don't ask me how to run Autoreconf correctly, that is something that Spack knows how to do, so I forgot.

  2. The INSTALL file is the same on every Autotools-based package. Package authors didn't / don't write it.

if i only want to use the library locally in a project, do i even have to install blitz++? Why cant i just use it?

  1. Yes you have to, for reasons that have to do with how shared libraries work on Linux. You can designate any install loation you want; for examle, an install location related to your local project. Spack, for example, creates a separate install directory for every package.

The installation process really could use an overhaul ...

  1. A CMake-based build for Blitz++ would be highly appreciated, please post a PR...

Again... there is a lot to know about how install works in general. I recommend you invest your time on that learning curve learning Spack. Dividends will pay off really well over time, and you'll be able to install just about anything --- even complicated packages with a lot of dependencies --- pretty easily.

ClmnsRck commented 5 years ago

First of all, thanks for the extremely fast answer. Second, i will look into it further, thx. The installation worked, overlooking some hiccups along the way. The question regarding only basically using some header files as the library came from installing/using Fastor, which only requiers you to download all header-files, and thats it. But thx anyways