Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlooked dependency: which #785

Open
MikeSpreitzer opened this issue Jul 16, 2021 · 4 comments
Open

Overlooked dependency: which #785

MikeSpreitzer opened this issue Jul 16, 2021 · 4 comments

Comments

@MikeSpreitzer
Copy link

I am building on Fedora 34, and the configure step failed because the command which is not defined.

Following is a Dockerfile that demonstrates the problem.

FROM fedora:34
RUN dnf -y update
RUN dnf -y install automake libtool autoconf autoconf-archive libstdc++-devel gcc pkg-config uriparser-devel libgcrypt-devel dbus-devel glib2-devel libcurl-devel
RUN dnf -y install openssl-devel python3-pyyaml pandoc
RUN dnf -y install git
RUN dnf -y install 'dnf-command(builddep)'

RUN cd; \
    git clone https://github.com/tpm2-software/tpm2-tss; \
    cd tpm2-tss; \
    dnf -y builddep tpm2-tss; \
    ./bootstrap; \
    ./configure --prefix=/usr/local; \
    make -j$(nproc); \
    make install

RUN cd; \
    git clone https://github.com/tpm2-software/tpm2-abrmd; \
    cd tpm2-abrmd; \
    ./bootstrap; \
    PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$(pkg-config --variable pc_path pkg-config) ./configure --with-dbuspolicydir=/etc/dbus-1/system.d --with-udevrulesdir=/usr/lib/udev/rules.d --with-systemdsystemunitdir=/usr/lib/systemd/system --libdir=/usr/lib64 --prefix=/usr/local; \
    make -j$(nproc); \
    make install

Following is a typescript of building that.

(base) mspreitz@mjs12 ttt % docker build .
[+] Building 13.4s (11/12)                                                                                                                                                                      
 => [internal] load build definition from Dockerfile                                                                                                                                       0.0s
 => => transferring dockerfile: 1.29kB                                                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                          0.0s
 => => transferring context: 2B                                                                                                                                                            0.0s
 => [internal] load metadata for docker.io/library/fedora:34                                                                                                                               0.0s
 => [1/9] FROM docker.io/library/fedora:34                                                                                                                                                 0.0s
 => CACHED [2/9] RUN dnf -y update                                                                                                                                                         0.0s
 => CACHED [3/9] RUN dnf -y install automake libtool autoconf autoconf-archive libstdc++-devel gcc pkg-config uriparser-devel libgcrypt-devel dbus-devel glib2-devel libcurl-devel         0.0s
 => CACHED [4/9] RUN dnf -y install openssl-devel python3-pyyaml pandoc                                                                                                                    0.0s
 => CACHED [5/9] RUN dnf -y install git                                                                                                                                                    0.0s
 => CACHED [6/9] RUN dnf -y install 'dnf-command(builddep)'                                                                                                                                0.0s
 => CACHED [7/9] RUN cd;     git clone https://github.com/tpm2-software/tpm2-tss;     cd tpm2-tss;     dnf -y builddep tpm2-tss;     ./bootstrap;     ./configure --prefix=/usr/local;     0.0s
 => ERROR [8/9] RUN cd;     git clone https://github.com/tpm2-software/tpm2-abrmd;     cd tpm2-abrmd;     ./bootstrap;     PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$(pkg-config --varia  13.3s
------                                                                                                                                                                                          
 > [8/9] RUN cd;     git clone https://github.com/tpm2-software/tpm2-abrmd;     cd tpm2-abrmd;     ./bootstrap;     PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$(pkg-config --variable pc_path pkg-config) ./configure --with-dbuspolicydir=/etc/dbus-1/system.d --with-udevrulesdir=/usr/lib/udev/rules.d --with-systemdsystemunitdir=/usr/lib/systemd/system --libdir=/usr/lib64 --prefix=/usr/local;     make -j$(nproc);     make install:                                                                                                                                                    
#11 0.231 Cloning into 'tpm2-abrmd'...                                                                                                                                                          
#11 4.948 aclocal: installing 'm4/ax_ac_append_to_file.m4' from '/usr/share/aclocal/ax_ac_append_to_file.m4'                                                                                    
#11 4.951 aclocal: installing 'm4/ax_ac_print_to_file.m4' from '/usr/share/aclocal/ax_ac_print_to_file.m4'
#11 4.953 aclocal: installing 'm4/ax_add_am_macro_static.m4' from '/usr/share/aclocal/ax_add_am_macro_static.m4'
#11 4.955 aclocal: installing 'm4/ax_add_fortify_source.m4' from '/usr/share/aclocal/ax_add_fortify_source.m4'
#11 4.957 aclocal: installing 'm4/ax_am_macros_static.m4' from '/usr/share/aclocal/ax_am_macros_static.m4'
#11 4.959 aclocal: installing 'm4/ax_check_compile_flag.m4' from '/usr/share/aclocal/ax_check_compile_flag.m4'
#11 4.961 aclocal: installing 'm4/ax_check_enable_debug.m4' from '/usr/share/aclocal/ax_check_enable_debug.m4'
#11 4.963 aclocal: installing 'm4/ax_check_gnu_make.m4' from '/usr/share/aclocal/ax_check_gnu_make.m4'
#11 4.966 aclocal: installing 'm4/ax_check_link_flag.m4' from '/usr/share/aclocal/ax_check_link_flag.m4'
#11 4.967 aclocal: installing 'm4/ax_code_coverage.m4' from '/usr/share/aclocal/ax_code_coverage.m4'
#11 4.969 aclocal: installing 'm4/ax_file_escapes.m4' from '/usr/share/aclocal/ax_file_escapes.m4'
#11 4.971 aclocal: installing 'm4/ax_is_release.m4' from '/usr/share/aclocal/ax_is_release.m4'
#11 4.973 aclocal: installing 'm4/ax_normalize_path.m4' from '/usr/share/aclocal/ax_normalize_path.m4'
#11 4.975 aclocal: installing 'm4/ax_pthread.m4' from '/usr/share/aclocal/ax_pthread.m4'
#11 4.977 aclocal: installing 'm4/ax_recursive_eval.m4' from '/usr/share/aclocal/ax_recursive_eval.m4'
#11 4.979 aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4'
#11 4.981 aclocal: installing 'm4/ltoptions.m4' from '/usr/share/aclocal/ltoptions.m4'
#11 4.983 aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4'
#11 4.985 aclocal: installing 'm4/ltversion.m4' from '/usr/share/aclocal/ltversion.m4'
#11 4.986 aclocal: installing 'm4/lt~obsolete.m4' from '/usr/share/aclocal/lt~obsolete.m4'
#11 4.988 aclocal: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
#11 7.094 libtoolize: putting auxiliary files in '.'.
#11 7.094 libtoolize: linking file './ltmain.sh'
#11 11.05 configure.ac:10: installing './compile'
#11 11.05 configure.ac:13: installing './config.guess'
#11 11.05 configure.ac:13: installing './config.sub'
#11 11.05 configure.ac:15: installing './install-sh'
#11 11.05 configure.ac:15: installing './missing'
#11 11.07 aminclude_static.am:126: warning: .PHONY was already defined in condition TRUE, which includes condition AUTOCONF_CODE_COVERAGE_2019_01_06 ...
#11 11.07 Makefile.am:175:   'aminclude_static.am' included from here
#11 11.07 Makefile.am:6: ... '.PHONY' previously defined here
#11 11.07 Makefile.am:182: warning: AM_DISTCHECK_CONFIGURE_FLAGS multiply defined in condition AUTOCONF_CODE_COVERAGE_2019_01_06 and CODE_COVERAGE_ENABLED ...
#11 11.07 aminclude_static.am:100: ... 'AM_DISTCHECK_CONFIGURE_FLAGS' previously defined here
#11 11.07 Makefile.am:175:   'aminclude_static.am' included from here
#11 11.13 Makefile.am: installing './depcomp'
#11 11.21 parallel-tests: installing './test-driver'
#11 11.32 configure: WARNING: unrecognized options: --with-udevrulesdir
#11 11.36 checking whether to enable debugging... info
#11 11.36 checking for gcc... gcc
#11 11.38 checking whether the C compiler works... yes
#11 11.42 checking for C compiler default output file name... a.out
#11 11.42 checking for suffix of executables... 
#11 11.45 checking whether we are cross compiling... no
#11 11.49 checking for suffix of object files... o
#11 11.51 checking whether we are using the GNU C compiler... yes
#11 11.53 checking whether gcc accepts -g... yes
#11 11.55 checking for gcc option to accept ISO C89... none needed
#11 11.58 checking whether gcc understands -c and -o together... yes
#11 11.62 checking whether ln -s works... yes
#11 11.62 checking how to run the C preprocessor... gcc -E
#11 11.67 checking for grep that handles long lines and -e... /usr/bin/grep
#11 11.67 checking for egrep... /usr/bin/grep -E
#11 11.67 checking for ANSI C header files... yes
#11 11.77 checking for sys/types.h... yes
#11 11.80 checking for sys/stat.h... yes
#11 11.83 checking for stdlib.h... yes
#11 11.86 checking for string.h... yes
#11 11.89 checking for memory.h... yes
#11 11.92 checking for strings.h... yes
#11 11.95 checking for inttypes.h... yes
#11 11.98 checking for stdint.h... yes
#11 12.02 checking for unistd.h... yes
#11 12.05 checking minix/config.h usability... no
#11 12.07 checking minix/config.h presence... no
#11 12.09 checking for minix/config.h... no
#11 12.09 checking whether it is safe to define __EXTENSIONS__... yes
#11 12.12 checking build system type... x86_64-pc-linux-gnu
#11 12.17 checking host system type... x86_64-pc-linux-gnu
#11 12.17 checking how to print strings... printf
#11 12.17 checking for a sed that does not truncate output... /usr/bin/sed
#11 12.17 checking for fgrep... /usr/bin/grep -F
#11 12.18 checking for ld used by gcc... /usr/bin/ld
#11 12.18 checking if the linker (/usr/bin/ld) is GNU ld... yes
#11 12.18 checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
#11 12.19 checking the name lister (/usr/bin/nm -B) interface... BSD nm
#11 12.24 checking the maximum length of command line arguments... 1572864
#11 12.25 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
#11 12.25 checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
#11 12.25 checking for /usr/bin/ld option to reload object files... -r
#11 12.25 checking for objdump... objdump
#11 12.25 checking how to recognize dependent libraries... pass_all
#11 12.25 checking for dlltool... no
#11 12.25 checking how to associate runtime and link libraries... printf %s\n
#11 12.25 checking for ar... ar
#11 12.25 checking for archiver @FILE support... @
#11 12.29 checking for strip... strip
#11 12.29 checking for ranlib... ranlib
#11 12.29 checking for gawk... gawk
#11 12.29 checking command to parse /usr/bin/nm -B output from gcc object... ok
#11 12.38 checking for sysroot... no
#11 12.38 checking for a working dd... /usr/bin/dd
#11 12.38 checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
#11 12.40 ./configure: line 6328: /usr/bin/file: No such file or directory
#11 12.40 checking for mt... no
#11 12.40 checking if : is a manifest tool... no
#11 12.41 checking for dlfcn.h... yes
#11 12.43 checking for objdir... .libs
#11 12.49 checking if gcc supports -fno-rtti -fno-exceptions... no
#11 12.52 checking for gcc option to produce PIC... -fPIC -DPIC
#11 12.52 checking if gcc PIC flag -fPIC -DPIC works... yes
#11 12.54 checking if gcc static flag -static works... no
#11 12.57 checking if gcc supports -c -o file.o... yes
#11 12.60 checking if gcc supports -c -o file.o... (cached) yes
#11 12.60 checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
#11 12.62 checking whether -lc should be explicitly linked in... no
#11 12.65 checking dynamic linker characteristics... GNU/Linux ld.so
#11 12.71 checking how to hardcode library paths into programs... immediate
#11 12.71 checking whether stripping libraries is possible... yes
#11 12.71 checking if libtool supports shared libraries... yes
#11 12.71 checking whether to build shared libraries... yes
#11 12.71 checking whether to build static libraries... yes
#11 12.71 checking for a BSD-compatible install... /usr/bin/install -c
#11 12.72 checking whether build environment is sane... yes
#11 12.73 checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
#11 12.74 checking whether make sets $(MAKE)... yes
#11 12.75 checking whether make supports the include directive... yes (GNU style)
#11 12.76 checking whether make supports nested variables... yes
#11 12.77 checking dependency style of gcc... gcc3
#11 12.81 checking whether make supports nested variables... (cached) yes
#11 12.81 checking whether gcc is Clang... no
#11 12.82 checking whether pthreads work with -pthread... yes
#11 12.86 checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
#11 12.90 checking whether more special flags are required for pthreads... no
#11 12.90 checking for PTHREAD_PRIO_INHERIT... yes
#11 12.94 checking for pkg-config... /usr/bin/pkg-config
#11 12.94 checking pkg-config is at least version 0.9.0... yes
#11 12.95 checking for library containing dlopen... -ldl
#11 13.02 checking for GIO... yes
#11 13.06 checking for GLIB... yes
#11 13.09 checking for GOBJECT... yes
#11 13.12 checking for TSS2_SYS... yes
#11 13.16 checking for TSS2_MU... yes
#11 13.19 checking for TSS2_TCTILDR... yes
#11 13.22 checking for TSS2_RC... yes
#11 13.25 checking for gdbus-codegen... gdbus-codegen
#11 13.26 ./configure: line 13973: which: command not found

(later error messages omitted)

@williamcroberts
Copy link
Member

What are you looking for here? Us to add the which command or how to install it (dnf install which)? A configure check for which command? Changing it to type -p over which?

williamcroberts pushed a commit to williamcroberts/tpm2-abrmd that referenced this issue Jul 16, 2021
type is a bash builtin, use it over which is not always installed and
missing from the dependency list anyways.

Fixes: tpm2-software#785

Signed-off-by: William Roberts <william.c.roberts@intel.com>
@MikeSpreitzer
Copy link
Author

I was looking for updated doc of dependencies.

@williamcroberts
Copy link
Member

I was looking for updated doc of dependencies.

If you add which is anything else missing for tpm2-abrmd?

@MikeSpreitzer
Copy link
Author

no

williamcroberts pushed a commit to williamcroberts/tpm2-abrmd that referenced this issue Jul 16, 2021
Don't use type becuase its not supported in Free BSD AFAICT.

Fixes: tpm2-software#785

Signed-off-by: William Roberts <william.c.roberts@intel.com>
williamcroberts pushed a commit to williamcroberts/tpm2-abrmd that referenced this issue Jul 16, 2021
Don't use type becuase its not supported in Free BSD AFAICT.

Fixes: tpm2-software#785

Signed-off-by: William Roberts <william.c.roberts@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants