:: [Libbitcoin] libbitcoin compilation…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: mlmikael
Ημερομηνία:  
Προς: libbitcoin, amir
Αντικείμενο: [Libbitcoin] libbitcoin compilation, OS support


Hi Amir!

Trying to compile on OpenBSD and Debian Linux I get various errors.

>From the quite OS-indepentent nature of the code, I don't see any reason

for problems beyond the build scripts on either of these OS:es.

Please let me emphasise the value of OBSD support here due to code
review, release process quality and more - considering that it should
only be like at most some superficial tweak to the build script needed
to get it going there, it would be awesome if we could get it going
around now.

First, is there a set of OS:es/environments where libbitcoin work
particularly well, just to get it going and work from there?

Second, here follows the errors I got - perhaps these messages ring some
bells with you and I could get it compiled faster with your suggestions.


So, on OpenBSD:

First, "aclocal" doesn't exist. Quick fix:

ln -s /usr/local/bin/aclocal /usr/local/bin/aclocal-1.12

autoconf & automake complain tha AUTOCONF_VERSION and AUTOMAKE_VERSION
need to be set. Fix:

export AUTOCONF_VERSION=2.69
export AUTOMAKE_VERSION=1.12

(also tried 2.59 and 1.9 respectively)

So now autoreconf -i : it blocks permanently - no excessive CPU use but
also does not finish. However, when aborting it, it has produced a
./configure file that produces the following output on both OBSD and
Debian (the Debian is old though, may be because it's a too old version
of the build tools that it fails):

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
configure: error: cannot find install-sh, install.sh, or shtool in
build-aux "."/build-aux

Just for a wild guess re what within autoreconf it is that fails, when
trying to run aclocal it produces the same result i.e. a permanent
block, perhaps autoreconf invokes aclocal and that is what causing this.


Following some general instructions on how to work around this found on
the Internet (e.g.
http://askubuntu.com/questions/27677/cannot-find-install-sh-install-sh-or-shtool-in-ac-aux
[1]) lead to the interaction on the Debian box pasted below, basically
it makes the ./configure script fail later.

Trying the same on OBSD causes an even harder crash, pasted at the
bottom.

Please advise, how can we get it going on OBSD?

I will be real happy to try anything per your suggestion.

(Also, just in case you don't have it already, installing OBSD in a
VirtualBox etc. is extremely fast so it could be that you wanted to see
it yourself (just follow this guide
https://www.youtube.com/watch?v=014wVkGEi5c [2] then login as root, do
export PKG_PATH=[the packages directory on your OBSD mirror] n then run
pkg_add with the .tar.gz package URL for each of the packages (autotools
boost etc.) you want to install, and then just follow your own build
instructions).)

Thanks!

Debian behavior:

$ libtoolize --force
Putting files in AC_CONFIG_AUX_DIR, `build-aux'.
$ aclocal
configure.ac:7: warning: macro `AM_PROG_AR' not found in library
configure.ac:11: warning: AC_COMPILE_IFELSE was called before
AC_GNU_SOURCE
../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from...
configure.ac:11: the top level
configure.ac:11: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE
$ autoheader
configure.ac:11: warning: AC_COMPILE_IFELSE was called before
AC_GNU_SOURCE
../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from...
configure.ac:11: the top level
configure.ac:11: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE
autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
$ automake --force-missing --add-missing
configure.ac:11: warning: AC_COMPILE_IFELSE was called before
AC_GNU_SOURCE
../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from...
configure.ac:11: the top level
configure.ac:11: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE
configure.ac:6: installing `build-aux/missing'
configure.ac:6: installing `build-aux/install-sh'
src/Makefile.am: installing `build-aux/depcomp'
$ autoconf
configure.ac:11: warning: AC_COMPILE_IFELSE was called before
AC_GNU_SOURCE
../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from...
configure.ac:11: the top level
configure.ac:11: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE
configure.ac:7: error: possibly undefined macro: AM_PROG_AR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
$ ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for AIX... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
./configure: line 4437: AM_PROG_AR: command not found
./configure: line 4438: LT_INIT: command not found
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... no
configure: WARNING: dlfcn.h: accepted by the compiler, rejected by the
preprocessor!
configure: WARNING: dlfcn.h: proceeding with the compiler's result
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
./configure: line 19419: syntax error near unexpected token
`noext,mandatory'
./configure: line 19419: `AX_CXX_COMPILE_STDCXX_11(noext,mandatory)'

OBSD behavior:

$ automake --force-missing --add-missing
configure.ac:4: error: required directory ./build-aux does not exist
configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.ac: You should verify that configure.ac invokes
AM_INIT_AUTOMAKE,
configure.ac: that aclocal.m4 is present in the top-level directory,
configure.ac: and that aclocal.m4 was recently regenerated (using
aclocal)
Makefile.am:34: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is
undefined
include/bitcoin/Makefile.am:34: error: DO_LEVELDB does not appear in
AM_CONDITIONAL
src/Makefile.am:39: error: DO_LEVELDB does not appear in AM_CONDITIONAL
src/Makefile.am:3: error: Libtool library used but 'LIBTOOL' is
undefined
src/Makefile.am:3: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/Makefile.am:3: to 'configure.ac' and run 'aclocal' and 'autoconf'
again.
src/Makefile.am:3: If 'LT_INIT' is in 'configure.ac', make sure
src/Makefile.am:3: its definition is in aclocal's search path.
src/Makefile.am: error: installing 'build-aux/depcomp'; error while
making link: No such file or directory
/usr/local/share/automake-1.12/am/depend2.am: error: am__fastdepCXX does
not appear in AM_CONDITIONAL
/usr/local/share/automake-1.12/am/depend2.am: The usual way to define
'am__fastdepCXX' is to add 'AC_PROG_CXX'
/usr/local/share/automake-1.12/am/depend2.am: to 'configure.ac' and run
'aclocal' and 'autoconf' again
/usr/local/share/automake-1.12/am/depend2.am: error: AMDEP does not
appear in AM_CONDITIONAL
/usr/local/share/automake-1.12/am/depend2.am: The usual way to define
'AMDEP' is to add one of the compiler tests
/usr/local/share/automake-1.12/am/depend2.am: AC_PROG_CC, AC_PROG_CXX,
AC_PROG_CXX, AC_PROG_OBJC,
/usr/local/share/automake-1.12/am/depend2.am: AM_PROG_AS, AM_PROG_GCJ,
AM_PROG_UPC
/usr/local/share/automake-1.12/am/depend2.am: to 'configure.ac' and run
'aclocal' and 'autoconf' again
src/Makefile.am: error: C++ source seen but 'CXX' is undefined
src/Makefile.am: The usual way to define 'CXX' is to add 'AC_PROG_CXX'
src/Makefile.am: to 'configure.ac' and run 'autoconf' again.
$ autoconf
configure.ac:2: error: possibly undefined macro:
AC_USE_SYSTEM_EXTENSIONS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:6: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.ac:7: error: possibly undefined macro: AM_PROG_AR
configure.ac:10: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.ac:20: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:45: error: possibly undefined macro: AM_CXXFLAGS
$ ./configure
./configure[1271]: AC_USE_SYSTEM_EXTENSIONS: not found
configure: error: cannot find install-sh or install.sh in build-aux
./build-aux


Links:
------
[1]
http://askubuntu.com/questions/27677/cannot-find-install-sh-install-sh-or-shtool-in-ac-aux
[2] https://www.youtube.com/watch?v=014wVkGEi5c