vivier / qemu-m68k

Other
40 stars 6 forks source link

Missing libraries for static build of m68k-linux-user #39

Closed czurnieden closed 5 years ago

czurnieden commented 5 years ago

Following the how-to at https://wiki.debian.org/M68k/sbuildQEMU I was not able to buildqemu-68k, it misses functions from librdmacm and libibverbs.a. The libraries were installed but not the headers? Missing in build-dep? apt-rdepends --build-depends qemu | grep rdmacm says it is in build-dep.

But the problem persisted even after installing librdmacm-dev, a make distclean and a ./configure --target-list=m68k-linux-user --static --disable-glusterfs.

A quick solution for me was to add /PATH/TO/librdmacm.a /PATH/TO/libibverbs.a to the variable COMMON_LDADDS in m68k-linux-user/Makefile.

vivier commented 5 years ago

qemu-m68k doesn't need librdmacm and libibverbs.

What is the error message? Which version of QEMU do you build? You can try:

./configure --target-list=m68k-linux-user --static --disable-glusterfs --disable-rdma

czurnieden commented 5 years ago

What is the error message

I'll repeat what I've done:

$ pwd
/home/czurnieden/M68K/qemu-m68k
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux buster/sid
Release:    testing
Codename:   buster
$ make distclean
...
$ ./configure --target-list=m68k-linux-user --static --disable-gluster
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
firmware path     /usr/local/share/qemu-firmware
binary directory  /usr/local/bin
library directory /usr/local/lib
module directory  /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory  /usr/local/etc
local state directory   /usr/local/var
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /home/czurnieden/M68K/qemu-m68k
GIT binary        git
GIT submodules    ui/keycodemapdb
C compiler        cc
Host C compiler   cc
C++ compiler      c++
Objective-C compiler cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -I/usr/include/pixman-1  -Werror -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv  -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong    -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/capstone
LDFLAGS           -Wl,--warn-common -lxenstore -ldl -lxenctrl -lxenguest -lxenforeignmemory -lxengnttab -lxenevtchn -lxendevicemodel -lxencall -lxentoollog -lxentoolcore -m64 -static -g 
make              make
install           install
python            python -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no
target list       m68k-linux-user
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      yes
SDL support       no 
GTK support       yes (3.24.5)
GTK GL support    yes
VTE support       yes (0.54.2)
TLS priority      NORMAL
GNUTLS support    no
GNUTLS rnd        no
libgcrypt         yes
libgcrypt kdf     yes
nettle            no 
nettle kdf        no
libtasn1          yes
curses support    yes
virgl support     no
curl support      no
mingw32 support   no
Audio drivers     oss
Block whitelist (rw) 
Block whitelist (ro) 
VirtFS support    
Multipath support 
VNC support       yes
VNC SASL support  no
VNC JPEG support  yes
VNC PNG support   yes
xen support       yes
xen ctrl version  41100
pv dom build      no
brlapi support    no
bluez  support    yes
Documentation     yes
PIE               no
vde support       yes
netmap support    no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
HAX support       no
HVF support       no
WHPX support      no
TCG support       yes
TCG debug enabled no
TCG interpreter   no
malloc trim support yes
RDMA support      no
fdt support       yes
membarrier        no
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
posix_memalign    yes
libcap-ng support yes
vhost-net support yes
vhost-crypto support yes
vhost-scsi support yes
vhost-vsock support yes
vhost-user support yes
Trace backends    log
spice support     no 
rbd support       no
xfsctl support    yes
smartcard support yes
libusb            yes
usb net redir     yes
OpenGL support    yes
OpenGL dmabufs    yes
libiscsi support  yes
libnfs support    yes
build guest agent yes
QGA VSS support   no
QGA w32 disk info no
QGA MSI support   no
seccomp support   yes
coroutine backend ucontext
coroutine pool    yes
debug stack usage no
crypto afalg      no
GlusterFS support no
gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   yes
TPM passthrough   yes
TPM emulator      yes
QOM debugging     yes
Live block migration yes
lzo support       no
snappy support    no
bzip2 support     no
NUMA host support yes
libxml2           no
tcmalloc support  no
jemalloc support  no
avx2 optimization yes
replication support yes
VxHS block device no

$ make -j2
  GEN     m68k-linux-user/config-devices.mak.tmp
  GEN     m68k-linux-user/config-devices.mak
  GEN     config-host.h
  GEN     qemu-options.def
  GEN     qapi-gen
  GEN     trace/generated-tcg-tracers.h

...

  GEN     docs/interop/qemu-ga-ref.html
  GEN     docs/interop/qemu-ga-ref.txt
  GEN     docs/interop/qemu-ga-ref.7
  LINK    qemu-ga
  LINK    ivshmem-client
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
  LINK    ivshmem-server
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: libqemuutil.a(qemu-sockets.o): in function `inet_parse_connect_saddr':
/home/czurnieden/M68K/qemu-m68k/util/qemu-sockets.c:406: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
  LINK    qemu-nbd
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
  LINK    qemu-img
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o) and /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-init.o): warning: multiple common of `__packed'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-nfs_v4.o): in function `nfs_get_ugid.isra.41':
(.text+0x2fc1): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: io/dns-resolver.o: in function `qio_dns_resolver_lookup_sync_inet':
/home/czurnieden/M68K/qemu-m68k/io/dns-resolver.c:89: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-socket.o): in function `rpc_connect_sockaddr_async':
(.text+0x19a): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libc.a(rpc_common.o): warning: definition of `_null_auth' overriding common from /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-libnfs-zdr.o)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_connect':
(.text+0x238): undefined reference to `rdma_create_event_channel'
/usr/bin/ld: (.text+0x258): undefined reference to `rdma_create_id'
/usr/bin/ld: (.text+0x292): undefined reference to `rdma_resolve_addr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_queue_pdu':
(.text+0x88c): undefined reference to `ibv_reg_mr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_disconnect':
(.text+0xa4d): undefined reference to `rdma_disconnect'
/usr/bin/ld: (.text+0xa68): undefined reference to `rdma_destroy_qp'
/usr/bin/ld: (.text+0xaa8): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xab4): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xb52): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xb9a): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xbb0): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0xbc6): undefined reference to `ibv_destroy_comp_channel'
/usr/bin/ld: (.text+0xbdc): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0xbf1): undefined reference to `rdma_destroy_id'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `cq_event_handler':
(.text+0x1173): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x11c7): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_service':
(.text+0x1301): undefined reference to `ibv_get_cq_event'
/usr/bin/ld: (.text+0x131e): undefined reference to `ibv_ack_cq_events'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `cm_thread':
(.text+0x1407): undefined reference to `rdma_get_cm_event'
/usr/bin/ld: (.text+0x149b): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x152f): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x156f): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x160a): undefined reference to `rdma_resolve_route'
/usr/bin/ld: (.text+0x161b): undefined reference to `ibv_alloc_pd'
/usr/bin/ld: (.text+0x1631): undefined reference to `ibv_create_comp_channel'
/usr/bin/ld: (.text+0x1685): undefined reference to `ibv_create_cq'
/usr/bin/ld: (.text+0x16ea): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x1703): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x172b): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x17a5): undefined reference to `rdma_create_qp'
/usr/bin/ld: (.text+0x1807): undefined reference to `rdma_connect'
/usr/bin/ld: (.text+0x182e): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x18a9): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0x18b3): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0x18bd): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0x18c6): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x18e5): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x1904): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0x190d): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0x1916): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x196d): undefined reference to `rdma_ack_cm_event'
collect2: error: ld returned 1 exit status
make: *** [/home/czurnieden/M68K/qemu-m68k/rules.mak:121: qemu-nbd] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o) and /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-init.o): warning: multiple common of `__packed'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-nfs_v4.o): in function `nfs_get_ugid.isra.41':
(.text+0x2fc1): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: io/dns-resolver.o: in function `qio_dns_resolver_lookup_sync_inet':
/home/czurnieden/M68K/qemu-m68k/io/dns-resolver.c:89: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-socket.o): in function `rpc_connect_sockaddr_async':
(.text+0x19a): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libc.a(rpc_common.o): warning: definition of `_null_auth' overriding common from /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-libnfs-zdr.o)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_connect':
(.text+0x238): undefined reference to `rdma_create_event_channel'
/usr/bin/ld: (.text+0x258): undefined reference to `rdma_create_id'
/usr/bin/ld: (.text+0x292): undefined reference to `rdma_resolve_addr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_queue_pdu':
(.text+0x88c): undefined reference to `ibv_reg_mr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_disconnect':
(.text+0xa4d): undefined reference to `rdma_disconnect'
/usr/bin/ld: (.text+0xa68): undefined reference to `rdma_destroy_qp'
/usr/bin/ld: (.text+0xaa8): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xab4): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xb52): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xb9a): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xbb0): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0xbc6): undefined reference to `ibv_destroy_comp_channel'
/usr/bin/ld: (.text+0xbdc): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0xbf1): undefined reference to `rdma_destroy_id'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `cq_event_handler':
(.text+0x1173): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x11c7): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_service':
(.text+0x1301): undefined reference to `ibv_get_cq_event'
/usr/bin/ld: (.text+0x131e): undefined reference to `ibv_ack_cq_events'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `cm_thread':
(.text+0x1407): undefined reference to `rdma_get_cm_event'
/usr/bin/ld: (.text+0x149b): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x152f): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x156f): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x160a): undefined reference to `rdma_resolve_route'
/usr/bin/ld: (.text+0x161b): undefined reference to `ibv_alloc_pd'
/usr/bin/ld: (.text+0x1631): undefined reference to `ibv_create_comp_channel'
/usr/bin/ld: (.text+0x1685): undefined reference to `ibv_create_cq'
/usr/bin/ld: (.text+0x16ea): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x1703): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x172b): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x17a5): undefined reference to `rdma_create_qp'
/usr/bin/ld: (.text+0x1807): undefined reference to `rdma_connect'
/usr/bin/ld: (.text+0x182e): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x18a9): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0x18b3): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0x18bd): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0x18c6): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x18e5): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x1904): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0x190d): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0x1916): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x196d): undefined reference to `rdma_ack_cm_event'
collect2: error: ld returned 1 exit status

The same with --disable-rdma`

$ ./configure --target-list=m68k-linux-user --static --disable-glusterfs --disable-rdma
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
firmware path     /usr/local/share/qemu-firmware
binary directory  /usr/local/bin
library directory /usr/local/lib
module directory  /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory  /usr/local/etc
local state directory   /usr/local/var
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /home/czurnieden/M68K/qemu-m68k
GIT binary        git
GIT submodules    ui/keycodemapdb
C compiler        cc
Host C compiler   cc
C++ compiler      c++
Objective-C compiler cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -I/usr/include/pixman-1  -Werror -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv  -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong    -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/capstone
LDFLAGS           -Wl,--warn-common -lxenstore -ldl -lxenctrl -lxenguest -lxenforeignmemory -lxengnttab -lxenevtchn -lxendevicemodel -lxencall -lxentoollog -lxentoolcore -m64 -static -g 
make              make
install           install
python            python -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no
target list       m68k-linux-user
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      yes
SDL support       no 
GTK support       yes (3.24.5)
GTK GL support    yes
VTE support       yes (0.54.2)
TLS priority      NORMAL
GNUTLS support    no
GNUTLS rnd        no
libgcrypt         yes
libgcrypt kdf     yes
nettle            no 
nettle kdf        no
libtasn1          yes
curses support    yes
virgl support     no
curl support      no
mingw32 support   no
Audio drivers     oss
Block whitelist (rw) 
Block whitelist (ro) 
VirtFS support    
Multipath support 
VNC support       yes
VNC SASL support  no
VNC JPEG support  yes
VNC PNG support   yes
xen support       yes
xen ctrl version  41100
pv dom build      no
brlapi support    no
bluez  support    yes
Documentation     yes
PIE               no
vde support       yes
netmap support    no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
HAX support       no
HVF support       no
WHPX support      no
TCG support       yes
TCG debug enabled no
TCG interpreter   no
malloc trim support yes
RDMA support      no
fdt support       yes
membarrier        no
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
posix_memalign    yes
libcap-ng support yes
vhost-net support yes
vhost-crypto support yes
vhost-scsi support yes
vhost-vsock support yes
vhost-user support yes
Trace backends    log
spice support     no 
rbd support       no
xfsctl support    yes
smartcard support yes
libusb            yes
usb net redir     yes
OpenGL support    yes
OpenGL dmabufs    yes
libiscsi support  yes
libnfs support    yes
build guest agent yes
QGA VSS support   no
QGA w32 disk info no
QGA MSI support   no
seccomp support   yes
coroutine backend ucontext
coroutine pool    yes
debug stack usage no
crypto afalg      no
GlusterFS support no
gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   yes
TPM passthrough   yes
TPM emulator      yes
QOM debugging     yes
Live block migration yes
lzo support       no
snappy support    no
bzip2 support     no
NUMA host support yes
libxml2           no
tcmalloc support  no
jemalloc support  no
avx2 optimization yes
replication support yes
VxHS block device no
capstone          system
$ make -j2
  GEN     m68k-linux-user/config-devices.mak.tmp
  GEN     config-host.h
  GEN     m68k-linux-user/config-devices.mak
  GEN     qemu-options.def
  GEN     qapi-gen
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h

...

  LINK    qemu-ga
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: libqemuutil.a(qemu-sockets.o): in function `inet_parse_connect_saddr':
/home/czurnieden/M68K/qemu-m68k/util/qemu-sockets.c:406: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
  LINK    ivshmem-client
  LINK    ivshmem-server
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
  LINK    qemu-nbd
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
  LINK    qemu-img
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o) and /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-init.o): warning: multiple common of `__packed'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-nfs_v4.o): in function `nfs_get_ugid.isra.41':
(.text+0x2fc1): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: io/dns-resolver.o: in function `qio_dns_resolver_lookup_sync_inet':
/home/czurnieden/M68K/qemu-m68k/io/dns-resolver.c:89: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-socket.o): in function `rpc_connect_sockaddr_async':
(.text+0x19a): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libc.a(rpc_common.o): warning: definition of `_null_auth' overriding common from /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-libnfs-zdr.o)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_connect':
(.text+0x238): undefined reference to `rdma_create_event_channel'
/usr/bin/ld: (.text+0x258): undefined reference to `rdma_create_id'
/usr/bin/ld: (.text+0x292): undefined reference to `rdma_resolve_addr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_queue_pdu':
(.text+0x88c): undefined reference to `ibv_reg_mr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_disconnect':
(.text+0xa4d): undefined reference to `rdma_disconnect'
/usr/bin/ld: (.text+0xa68): undefined reference to `rdma_destroy_qp'
/usr/bin/ld: (.text+0xaa8): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xab4): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xb52): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xb9a): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xbb0): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0xbc6): undefined reference to `ibv_destroy_comp_channel'
/usr/bin/ld: (.text+0xbdc): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0xbf1): undefined reference to `rdma_destroy_id'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `cq_event_handler':
(.text+0x1173): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x11c7): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_service':
(.text+0x1301): undefined reference to `ibv_get_cq_event'
/usr/bin/ld: (.text+0x131e): undefined reference to `ibv_ack_cq_events'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `cm_thread':
(.text+0x1407): undefined reference to `rdma_get_cm_event'
/usr/bin/ld: (.text+0x149b): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x152f): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x156f): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x160a): undefined reference to `rdma_resolve_route'
/usr/bin/ld: (.text+0x161b): undefined reference to `ibv_alloc_pd'
/usr/bin/ld: (.text+0x1631): undefined reference to `ibv_create_comp_channel'
/usr/bin/ld: (.text+0x1685): undefined reference to `ibv_create_cq'
/usr/bin/ld: (.text+0x16ea): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x1703): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x172b): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x17a5): undefined reference to `rdma_create_qp'
/usr/bin/ld: (.text+0x1807): undefined reference to `rdma_connect'
/usr/bin/ld: (.text+0x182e): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x18a9): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0x18b3): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0x18bd): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0x18c6): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x18e5): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x1904): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0x190d): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0x1916): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x196d): undefined reference to `rdma_ack_cm_event'
collect2: error: ld returned 1 exit status
make: *** [/home/czurnieden/M68K/qemu-m68k/rules.mak:121: qemu-nbd] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o) and /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-init.o): warning: multiple common of `__packed'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-nfs_v4.o): in function `nfs_get_ugid.isra.41':
(.text+0x2fc1): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
(.text+0x277): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: io/dns-resolver.o: in function `qio_dns_resolver_lookup_sync_inet':
/home/czurnieden/M68K/qemu-m68k/io/dns-resolver.c:89: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-socket.o): in function `rpc_connect_sockaddr_async':
(.text+0x19a): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libc.a(rpc_common.o): warning: definition of `_null_auth' overriding common from /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libnfs.a(libnfs_la-libnfs-zdr.o)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_connect':
(.text+0x238): undefined reference to `rdma_create_event_channel'
/usr/bin/ld: (.text+0x258): undefined reference to `rdma_create_id'
/usr/bin/ld: (.text+0x292): undefined reference to `rdma_resolve_addr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_queue_pdu':
(.text+0x88c): undefined reference to `ibv_reg_mr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_disconnect':
(.text+0xa4d): undefined reference to `rdma_disconnect'
/usr/bin/ld: (.text+0xa68): undefined reference to `rdma_destroy_qp'
/usr/bin/ld: (.text+0xaa8): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xab4): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xb52): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xb9a): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0xbb0): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0xbc6): undefined reference to `ibv_destroy_comp_channel'
/usr/bin/ld: (.text+0xbdc): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0xbf1): undefined reference to `rdma_destroy_id'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `cq_event_handler':
(.text+0x1173): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x11c7): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `iscsi_iser_service':
(.text+0x1301): undefined reference to `ibv_get_cq_event'
/usr/bin/ld: (.text+0x131e): undefined reference to `ibv_ack_cq_events'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libiscsi.a(libiscsi_la-iser.o): in function `cm_thread':
(.text+0x1407): undefined reference to `rdma_get_cm_event'
/usr/bin/ld: (.text+0x149b): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x152f): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x156f): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x160a): undefined reference to `rdma_resolve_route'
/usr/bin/ld: (.text+0x161b): undefined reference to `ibv_alloc_pd'
/usr/bin/ld: (.text+0x1631): undefined reference to `ibv_create_comp_channel'
/usr/bin/ld: (.text+0x1685): undefined reference to `ibv_create_cq'
/usr/bin/ld: (.text+0x16ea): undefined reference to `ibv_reg_mr'
/usr/bin/ld: (.text+0x1703): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x172b): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x17a5): undefined reference to `rdma_create_qp'
/usr/bin/ld: (.text+0x1807): undefined reference to `rdma_connect'
/usr/bin/ld: (.text+0x182e): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x18a9): undefined reference to `ibv_dereg_mr'
/usr/bin/ld: (.text+0x18b3): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0x18bd): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0x18c6): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x18e5): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x1904): undefined reference to `ibv_destroy_cq'
/usr/bin/ld: (.text+0x190d): undefined reference to `ibv_dealloc_pd'
/usr/bin/ld: (.text+0x1916): undefined reference to `rdma_ack_cm_event'
/usr/bin/ld: (.text+0x196d): undefined reference to `rdma_ack_cm_event'
collect2: error: ld returned 1 exit status
make: *** [/home/czurnieden/M68K/qemu-m68k/rules.mak:121: qemu-img] Error 

Which version of QEMU do you build?

Cloned from this reporitory a couple of days ago, uh, at the 8th.

You can try: ./configure --target-list=m68k-linux-user --static --disable-glusterfs --disable-rdma

Already did it then, but tried again, see above. And: yes, I find that behaviour very curious, too!

vivier commented 5 years ago

In fact you need: --disable-tools

czurnieden commented 5 years ago

Ah, that was it! Thanks!