Open hansm4305 opened 1 year ago
I have the same exact problem on my MacOS 13.6 (22G120)
What version of autoreconf do you run ?
@Paintballworld or @hansm4305 , did you solve this issue?
@AndreasFuchsTPM similar issue on MacOS Sonoma 14.4.1 when using @hansm4305 install script, please see log below:
aminclude_static.am:63: warning: GITIGNOREFILES was already defined in condition TRUE, which includes condition AUTOCONF_CODE_COVERAGE_2019_01_06 and CODE_COVERAGE_ENABLED ...
Makefile.am:56: 'aminclude_static.am' included from here
Makefile.am:52: ... 'GITIGNOREFILES' previously defined here
Makefile.am: error: object 'src/tss2-esys/libtss2_esys_la-esys_crypto_mbed.lo' created by 'src/tss2-esys/esys_crypto_mbed.c' and 'src/tss2-esys//esys_crypto_mbed.c'
Makefile.am: error: object 'src/tss2-esys/libtss2_esys_la-esys_crypto_ossl.lo' created by 'src/tss2-esys/esys_crypto_ossl.c' and 'src/tss2-esys//esys_crypto_ossl.c'
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: error: automake failed with exit status: 1
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /opt/homebrew/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking build system type... aarch64-apple-darwin23.4.0
checking host system type... aarch64-apple-darwin23.4.0
checking whether to enable debugging... info
checking for gcc... /usr/local/bin/gcc-9
checking whether the C compiler works... no
configure: error: in '/tmp/third-party/tpm2-tss':
configure: error: C compiler cannot create executables
See 'config.log' for more details
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
dimitomov@Dimis-MacBook-Pro tpm2-tss-install % autoconf --version
autoconf (GNU Autoconf) 2.72
Here is the log when trying to use clang Mac's default compiler
checking for systemd-sysusers... no
checking for systemd-tmpfiles... no
checking for useradd... no
checking for groupadd... no
checking for adduser... no
checking for addgroup... no
configure: error: addgroup or groupadd are needed.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
dimitomov@Dimis-MacBook-Pro tpm2-tss-install %
You need to install:
brew install autoconf autoconf-archive automake json-c libtool m4 pkg-config
OPTIONAL
brew install libftdi
Then you hit the user issue, which I also opened in #2876
If you get past the user issue then you get
In file included from src/tss2-tcti/tcti-libtpms.c:23:
In file included from src/tss2-tcti/tcti-libtpms.h:10:
In file included from /opt/homebrew/include/libtpms/tpm_library.h:45:
/opt/homebrew/include/libtpms/tpm_types.h:55:24: error: redefinition of typedef 'BYTE' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef unsigned char BYTE; /* Basic byte used to transmit all character fields. */
^
./include/tss2/tss2_common.h:19:21: note: previous definition is here
typedef uint8_t BYTE;
^
src/tss2-tcti/tcti-libtpms.c:97:11: error: call to undeclared function 'posix_fallocate'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
ret = posix_fallocate(state_fd, 0, (off_t) tcti_libtpms->state_mmap_len);
^
src/tss2-tcti/tcti-libtpms.c:154:26: error: call to undeclared function 'mremap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
new_state_mmap = mremap(tcti_libtpms->state_mmap,
^
src/tss2-tcti/tcti-libtpms.c:157:33: error: use of undeclared identifier 'MREMAP_MAYMOVE'
MREMAP_MAYMOVE);
^
src/tss2-tcti/tcti-libtpms.c:180:19: error: call to undeclared function 'posix_fallocate'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
ret = posix_fallocate(state_fd, 0, (off_t) tcti_libtpms->state_mmap_len);
^
5 errors generated.
make[1]: *** [src/tss2-tcti/tcti-libtpms.lo] Error 1
make: *** [all] Error 2
Seems like a few barriers here :)
I am trying to install tpm2-tss on mac os using github actions The script used is
But I am getting the following error during the installation