Dependencies
Closed this issue · 4 comments
Hi again,
as you mentioned in the last comment of #60, I create a separate issue for the problem of dependencies. The problem persists (actually, I see no update of the configure.ac
since that). Now I tested it also in a new Ubuntu 20.04 virtual machine, i.e. no mess from other previously installed programs (Ubuntu 16 is quite old, it is even out of standard support).
Unfortunately, I am not experienced with autoconf, so I am not able to suggest a fix of configure.ac
. Maybe the easiest way to trade with it would be to add a section to chapter Compatibility and dependencies in README or create a new chapter containing pairs of error - solution.
user@machine:path/freesasa$ make
...
g++ -std=gnu++14 -g -O2 -o freesasa main.o cif.o -lc++ libfreesasa.a -lxml2 -lpthread -ldl -lm
/usr/bin/ld: cannot find -lc++
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:513: freesasa] Error 1
make[2]: Leaving directory '/home/j/freesasa/src'
make[1]: *** [Makefile:382: all-recursive] Error 1
make[1]: Leaving directory '/home/j/freesasa'
make: *** [Makefile:321: all] Error 2
Solution: install libc++-11-dev
, i.e. call apt-get install libc++-11-dev
; if the package is not available, call apt-get update
update first.
user@machine:path/freesasa$ make
...
g++ -std=gnu++14 -g -O2 -o freesasa main.o cif.o -lc++ libfreesasa.a -lxml2 -lpthread -ldl -lm
/usr/bin/ld: cannot find -lc++abi
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:513: freesasa] Error 1
make[2]: Leaving directory '/home/j/freesasa/src'
make[1]: *** [Makefile:382: all-recursive] Error 1
make[1]: Leaving directory '/home/j/freesasa'
make: *** [Makefile:321: all] Error 2
Solution: install libc++abi-11-dev
, i.e. call apt-get install libc++abi-11-dev
; if the package is not available, call apt-get update
update first.
user@machine:path/freesasa$ ./configure
...
config.status: executing depfiles commands
config.status: error: in `/home/j/freesasa':
config.status: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
Solution: the recommended --disable-dependency-tracking
does not solve it (resp. it would pass ./configure
step, but then it would fail during make
step), the problem is missing make
, i.e. call apt-get install make
(or you can install build-essential
instead, it contains also a compiler - see a later problem).
user@machine:path/freesasa$ ./configure
...
checking for libxml2... no
configure: error: Library libxml2 not found, install library or build without (using --disable-xml).
Solution: the problem is not missing libxml2
package, but missing libxml2-dev
package, i.e. call apt-get install libxml2-dev
.
The rest of prerequisites is quite obvious:
user@machine:path/freesasa$ ./configure
...
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/j/freesasa':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Solution: missing C compiler, e.g. call apt-get install build-essential
(see an upper problem).
user@machine:path/freesasa$ autoreconf -i
Command 'autoreconf' not found, but can be installed with:
sudo apt install autoconf
Solution: do what it recommends (or apt-get install autoconf
, if you prefer apt-get
).
Hi,
I think documenting what's needed is not a bad idea! Especially until we figure out how to handle this in with autoconf. I simplified things a little in #69, what do you think?
It seems I get by by using libc++-dev
and libc++abi-dev
btw. (without "11")
Hi,
ok... actually, maybe also git
should be added (I forgot that it is not only for optional git clone
, but also for git submodule init
and git submodule update
).
Yes, I guess that would be necessary for completeness, I updated the PR. I guess something similar for Mac OS X and Yum-based linux distros would be appropriate too. But that can be a separate issue.
I have merged the changes to master. Thanks for your suggestions!