RJVB / lnxports

A "local port repository" for use with MacPorts on Linux, overriding ports from the main repository.
4 stars 1 forks source link

libassuan fails to build: `Version mismatch error. This is libtool 2.4.2 Debian-2.4.2-1, but the libtool: definition of this LT_INIT comes from libtool 2.4.7` #20

Open barracuda156 opened 2 months ago

barracuda156 commented 2 months ago

First attempt of the build (as-is) fails on:

--->  Configuring libassuan
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... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... build-aux/config.guess: unable to guess system type

This script (version 2016-05-15), has failed to recognize the
operating system you are using. If your script is old, overwrite
config.guess and config.sub with the latest versions from:

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub

If build-aux/config.guess has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
provide the necessary information to handle your system.

config.guess timestamp = 2016-05-15

uname -m = riscv64
uname -r = 5.15.131
uname -s = Linux
uname -v = #1 SMP Thu Sep 21 04:12:12 UTC 2023

/usr/bin/uname -p = 
/bin/uname -X     = 

hostinfo               = 
/bin/universe          = 
/usr/bin/arch -k       = 
/bin/arch              = 
/usr/bin/oslevel       = 
/usr/convex/getsysinfo = 

UNAME_MACHINE = riscv64
UNAME_RELEASE = 5.15.131
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP Thu Sep 21 04:12:12 UTC 2023
configure: error: cannot guess build type; you must specify one
Command failed:  cd "/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3" && ./configure --prefix=/opt/local 
Exit code: 1
Error: Failed to configure libassuan: consult /opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3/config.log
Error: Failed to configure libassuan: configure failure: command execution failed

Adding the following to portfile

configure.args-append \
                    ${build_arch}-unknown-linux-gnu

allows the build to proceed, but then it fails on:

--->  Configuring libassuan
configure: WARNING: you should use --build, --host, --target
checking for a BSD-compatible install... /usr/bin/install -c
checking whether sleep supports fractional seconds... yes
checking filesystem timestamp resolution... 0.01
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking xargs -n works... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... riscv64-unknown-linux-gnu
checking host system type... riscv64-unknown-linux-gnu
configure: autobuild project... libassuan
configure: autobuild revision... 2.4.3-unknown
configure: autobuild hostname... pinetabv
configure: autobuild timestamp... 20240906-145922
checking whether make supports the include directive... yes (GNU style)
checking for riscv64-unknown-linux-gnu-gcc... /usr/bin/clang
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 the compiler supports GNU C... yes
checking whether /usr/bin/clang accepts -g... yes
checking for /usr/bin/clang option to enable C11 features... none needed
checking whether /usr/bin/clang understands -c and -o together... yes
checking dependency style of /usr/bin/clang... gcc3
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking how to print strings... printf
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for grep that handles long lines and -e... /opt/local/bin/ggrep
checking for egrep... /opt/local/bin/ggrep -E
checking for fgrep... /opt/local/bin/ggrep -F
checking for ld used by /usr/bin/clang... /usr/bin/riscv64-pine64-linux-ld
checking if the linker (/usr/bin/riscv64-pine64-linux-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /opt/local/bin/nm -B
checking the name lister (/opt/local/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert riscv64-unknown-linux-gnu file names to riscv64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert riscv64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/riscv64-pine64-linux-ld option to reload object files... -r
checking for riscv64-unknown-linux-gnu-file... no
checking for file... file
checking for riscv64-unknown-linux-gnu-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for riscv64-unknown-linux-gnu-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for riscv64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for riscv64-unknown-linux-gnu-strip... no
checking for strip... strip
checking for riscv64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking command to parse /opt/local/bin/nm -B output from /usr/bin/clang object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for riscv64-unknown-linux-gnu-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /usr/bin/clang supports -fno-rtti -fno-exceptions... yes
checking for /usr/bin/clang option to produce PIC... -fPIC -DPIC
checking if /usr/bin/clang PIC flag -fPIC -DPIC works... yes
checking if /usr/bin/clang static flag -static works... no
checking if /usr/bin/clang supports -c -o file.o... yes
checking if /usr/bin/clang supports -c -o file.o... (cached) yes
checking whether the /usr/bin/clang linker (/usr/bin/riscv64-pine64-linux-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... no
checking for riscv64-unknown-linux-gnu-windres... no
checking for windres... no
checking for gawk... (cached) gawk
checking for riscv64-unknown-linux-gnu-gcc... (cached) /usr/bin/clang
checking whether the compiler supports GNU C... (cached) yes
checking whether /usr/bin/clang accepts -g... (cached) yes
checking for /usr/bin/clang option to enable C11 features... (cached) none needed
checking whether /usr/bin/clang understands -c and -o together... (cached) yes
checking dependency style of /usr/bin/clang... (cached) gcc3
checking how to run the C preprocessor... /usr/bin/clang -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for cc for build... /usr/bin/clang
checking if gcc supports -Wpointer-arith... yes
checking for setsockopt... yes
checking for egrep... (cached) /opt/local/bin/ggrep -E
checking for string.h... (cached) yes
checking for locale.h... yes
checking for sys/uio.h... yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/time.h... yes
checking for fcntl.h... yes
checking for sys/select.h... yes
checking for uintptr_t... yes
checking for uint16_t... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking return type of signal handlers... void
checking for /usr/bin/clang options needed to detect all undeclared functions... -fno-builtin
checking whether sys_siglist is declared... no
checking for sys/socket.h... yes
checking for socklen_t... yes
checking for struct cmsghdr.cmsg_len... yes
checking for riscv64-unknown-linux-gnu-gpg-error-config... no
checking for gpg-error-config... /opt/local/bin/gpg-error-config
checking for GPG Error - version >= 1.17... yes (1.50)
checking for flockfile... yes
checking for funlockfile... yes
checking for inet_pton... yes
checking for stat... yes
checking for getaddrinfo... yes
checking for getrlimit... yes
checking for library containing nanosleep... none required
checking for funopen... no
checking for fopencookie... yes
checking for isascii... yes
checking for putc_unlocked... yes
checking for memrchr... yes
checking for stpcpy... yes
checking for unistd.h... (cached) yes
checking for setenv... yes
checking for SO_PEERCRED... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating m4/Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating tests/Makefile
config.status: creating src/libassuan-config
config.status: creating src/versioninfo.rc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

        Libassuan v2.4.3-unknown has been configured as follows:

        Revision: 0000000  (0)
        Platform: riscv64-unknown-linux-gnu

--->  Building libassuan
make: Entering directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3'
/usr/bin/make  all-recursive
make[1]: Entering directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3'
Making all in m4
make[2]: Entering directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3/m4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3/m4'
Making all in src
make[2]: Entering directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3/src'
/usr/bin/clang -I. -I. -o mkheader ./mkheader.c
./mkheader linux-gnu ./assuan.h.in \
                   2.4.3-unknown 0x020403 >assuan.h
/usr/bin/make  all-am
make[3]: Entering directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3/src'
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I..  -I.. -I/opt/local/include -isystem/opt/local/include  -pipe -Os -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wpointer-arith -fPIC -DPIC -MT libassuan_la-assuan.lo -MD -MP -MF .deps/libassuan_la-assuan.Tpo -c -o libassuan_la-assuan.lo `test -f 'assuan.c' || echo './'`assuan.c
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I..  -I.. -I/opt/local/include -isystem/opt/local/include  -pipe -Os -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wpointer-arith -fPIC -DPIC -MT libassuan_la-context.lo -MD -MP -MF .deps/libassuan_la-context.Tpo -c -o libassuan_la-context.lo `test -f 'context.c' || echo './'`context.c
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I..  -I.. -I/opt/local/include -isystem/opt/local/include  -pipe -Os -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wpointer-arith -fPIC -DPIC -MT libassuan_la-system.lo -MD -MP -MF .deps/libassuan_la-system.Tpo -c -o libassuan_la-system.lo `test -f 'system.c' || echo './'`system.c
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I..  -I.. -I/opt/local/include -isystem/opt/local/include  -pipe -Os -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wpointer-arith -fPIC -DPIC -MT libassuan_la-debug.lo -MD -MP -MF .deps/libassuan_la-debug.Tpo -c -o libassuan_la-debug.lo `test -f 'debug.c' || echo './'`debug.c
libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1, but the
libtool: definition of this LT_INIT comes from libtool 2.4.7.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1
libtool: and run autoconf again.
make[3]: *** [Makefile:768: libassuan_la-system.lo] Error 63
make[3]: *** Waiting for unfinished jobs....
libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1, but the
libtool: definition of this LT_INIT comes from libtool 2.4.7.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1
libtool: and run autoconf again.
make[3]: *** [Makefile:761: libassuan_la-context.lo] Error 63
libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1, but the
libtool: definition of this LT_INIT comes from libtool 2.4.7.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1
libtool: and run autoconf again.
make[3]: *** [Makefile:775: libassuan_la-debug.lo] Error 63
libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1, but the
libtool: definition of this LT_INIT comes from libtool 2.4.7.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1
libtool: and run autoconf again.
make[3]: *** [Makefile:754: libassuan_la-assuan.lo] Error 63
make[3]: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3/src'
make[2]: *** [Makefile:527: all] Error 2
make[2]: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3/src'
make[1]: *** [Makefile:463: all-recursive] Error 1
make[1]: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_devel_libassuan/libassuan/work/libassuan-2.4.3'
make: *** [Makefile:395: all] Error 2

Here it is stuck. Using autoreconf does not help, it still ends up with the same error.

barracuda156 commented 2 months ago

A failure to detect the build triple/quadriple is not unique, here is the same error: https://trac.macports.org/ticket/70686 For it we just a need an upstreamed fix.

RJVB commented 2 months ago

On Friday September 06 2024 08:15:15 Sergey Fedorov wrote:

Here it is stuck. Using autoreconf does not help, it still ends up with the same error.

This is a new variant of a known problem, no?

Can you confirm that the libtool in $worksrcpath is indeed created from the host libtool? I think I've been stymied by this kind of problem before, and I cannot remember ever having figured out how to fix it other than by using autoreconf (or not using autoreconf). I still have my /usr/bin/libtool so my solution apparently was never to dunk or replace it.

RJVB commented 2 months ago

On Friday September 06 2024 10:17:43 Sergey Fedorov wrote:

A failure to detect the build triple/quadriple is not unique, here is the same error: https://trac.macports.org/ticket/70686

I'll be curious to see how that ticket is handled on trac! It's for Linux, shock, horror! ;)