I'm attempting to build tpm2-tss-3.0.1-rc0 on the latest version of
OmniOS (
https://omniosce.org/).
$ cat /etc/os-release
NAME="OmniOS"
PRETTY_NAME="OmniOS Community Edition v11 r151034r"
CPE_NAME="cpe:/o:omniosce:omnios:11:151034:18"
ID=omnios
VERSION=r151034r
VERSION_ID=r151034r
BUILD_ID=151034.18.2020.08.29
HOME_URL="https://omniosce.org/"
SUPPORT_URL="https://omniosce.org/"
BUG_REPORT_URL="https://github.com/omniosorg/omnios-build/issues/new...
$
I think I have the prerequisites installed either from the release or
from pkgsrc (
https://pkgsrc.joyent.com/). I have also set the following
environment variables:
export PATH=/opt/local/sbin:/opt/local/bin:$PATH
export MANPATH=/opt/local/man:/usr/share/man
export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig
export MAKE=gmake
I have made the following modification to recognise the OS:
$ diff -u configure.ac.orig configure.ac
--- configure.ac.orig Wed Sep 9 08:01:43 2020
+++ configure.ac Thu Sep 10 10:53:18 2020
@@ -44,6 +44,11 @@
HOSTOS='BSD'
LIBSOCKET_LDFLAGS=""
;;
+ *solaris*)
+ HOSTOS='SOLARIS'
+ ADD_COMPILER_FLAG([-D__EXTENSIONS__])
+ LIBSOCKET_LDFLAGS="-lsocket -lnsl"
+ ;;
*)
#Assume linux
HOSTOS='Linux'
$
This is what I see when I run bootstrap:
$ ./bootstrap
Generating file lists: src_vars.mk
aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4'
aclocal: installing 'm4/ltdl.m4' from '/usr/share/aclocal/ltdl.m4'
aclocal: installing 'm4/ltoptions.m4' from
'/usr/share/aclocal/ltoptions.m4'
aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4'
aclocal: installing 'm4/ltversion.m4' from
'/usr/share/aclocal/ltversion.m4'
aclocal: installing 'm4/lt~obsolete.m4' from
'/usr/share/aclocal/lt~obsolete.m4'
aclocal: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
configure.ac:21: error: possibly undefined macro: AC_SUBST
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:68: error: possibly undefined macro: AS_IF
configure.ac:101: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:130: error: possibly undefined macro: AC_MSG_WARN
autoreconf: /usr/bin/autoconf failed with exit status: 1
$
I don't have much experience with autotools. Can anyone spot if I have
made an obvious mistake. The first error reported is for this line:
AC_SUBST([DISTCHECK_CONFIGURE_FLAGS],[$ac_configure_args])
I am aware of other issues with OmniOS: make => gmake; tar => gtar;
doesn't have _DIRENT_HAVE_D_TYPE defined; requires explicit use of
"#include <stdarg.h>" on more files. However, there seems a good chance
it could be made to work with the simulators (OmniOS doesn't yet have a
TPM2 device driver).
Has anyone else tried building on other flavours of Illumos/Solaris?
--
John