servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
170 stars 81 forks source link

autoreconf fails on macOS Sierra #127

Closed gh0st42 closed 6 years ago

gh0st42 commented 6 years ago

Just tried to build serval-dna on a macOS Sierra machine.

$ autoreconf -f -i
src/libsodium/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/libsodium/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/libsodium/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/libsodium/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/libsodium/Makefile.am:1:   its definition is in aclocal's search path.
autoreconf: automake failed with exit status: 1

libsodium is already installed using brew but this should not make a difference at this stage since I don't even get to the "configure" step. Prior to autobuilding libsodium this was not a problem on macOS.

lakeman commented 6 years ago

You might need to install libtool?

On Mon, Oct 16, 2017 at 9:35 PM, gh0st42 notifications@github.com wrote:

Just tried to build serval-dna on a macOS Sierra machine.

$ autoreconf -f -i src/libsodium/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined src/libsodium/Makefile.am:1: The usual way to define 'LIBTOOL' is to add 'LT_INIT' src/libsodium/Makefile.am:1: to 'configure.ac' and run 'aclocal' and 'autoconf' again. src/libsodium/Makefile.am:1: If 'LT_INIT' is in 'configure.ac', make sure src/libsodium/Makefile.am:1: its definition is in aclocal's search path. autoreconf: automake failed with exit status: 1

libsodium is already installed using brew but this should not make a difference at this stage since I don't even get to the "configure" step. Prior to autobuilding libsodium this was not a problem on macOS.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/servalproject/serval-dna/issues/127, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkD3ozRCgBzb8PWkqwHc6Jcr_e_17z9ks5sszhegaJpZM4P6cvy .

quixotique commented 6 years ago

What version of autotools? Which commit of serval-dna? Please read INSTALL.md, it clearly says:

autoreconf -f -i -I m4
gh0st42 commented 6 years ago

libtool is installed:

$ which libtool
/usr/bin/libtool
$ libtool
error: /Library/Developer/CommandLineTools/usr/bin/libtool: no output file specified (specify with -o output)
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]

And regarding -I m4 it is optional, adding it also does not help with this problem.

This is the most recent commit in master branch.

gh0st42 commented 6 years ago

If i revert back to a commit prior to the required libsodium subtree it all builds fine on the machine. git checkout 0382e7990e4704991de767057b11c4f11c7b2ba8

The current version interestingly enough builds just fine on a real old mac with El Capitan installed.

quixotique commented 6 years ago

I don't have a Mac with Sierra handy to perform more testing.

The clue is in the error message. The libsodium Makefile.am definitely contains an LT_INIT line, so it must be that LT_INIT is not in aclocal's search path. A missing brew package, perhaps? In Debian, the M4 autoconf macros come in their own package called autoconf-archive.

gh0st42 commented 6 years ago

If you install the libtool version from brew it works, apple command line developer tools version alone doesn't seem to work.

quixotique commented 6 years ago

Could you please post the output of libtool -V? Also, which version of Xcode you have installed? Those pieces of information would help me improve the configure scripts to detect problems like this and at least issue helpful error messages. I might have to create an autogen.sh script.