Re: emulators/qemu: qemu ports failing due to compiler error on 12-CURRENT

From: O. Hartmann <ohartmann_at_walstatt.org>
Date: Thu, 29 Dec 2016 21:32:53 +0100
Am Thu, 29 Dec 2016 20:26:32 +0100
Dimitry Andric <dim_at_FreeBSD.org> schrieb:

> On 29 Dec 2016, at 17:29, O. Hartmann <ohartmann_at_walstatt.org> wrote:
> > 
> > Am Wed, 7 Dec 2016 23:31:01 +0100
> > Dimitry Andric <dim_at_FreeBSD.org> schrieb:
> >   
> >> On 07 Dec 2016, at 10:42, O. Hartmann <ohartmann_at_walstatt.org> wrote:  
> >>> 
> >>> I try my first steps in cross compiling ports with poudriere and therefore I try to
> >>> setup an appropriate jail and QEMU environment.
> >>> 
> >>> Well, I'm failing at the jail setup due to the non-exitence of any suitable QEMU
> >>> environment and for that I tried to figure out to find some proper HOWTO.
> >>> Searching via google ave some hints, but in questions which QEMU from ports should
> >>> be used, all leave me alone, so I tried
> >>> 
> >>> emulators/qemu
> >>> emulators/qemu-devel
> >>> emulators/qemu-static
> >>> 
> >>> emulators/qemu is known for me to fail since months and the days of 11-CURRENT,
> >>> there is a compiler error spit out with clang 3.8 and now 3.9. The very same for
> >>> qemu-devel (both ports used with standard options, no extras). See also Bug 214873
> >>> (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214873) and Bug 215100
> >>> (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215100).  
> >> 
> >> I couldn't reproduce the compilation errors, it builds fine for me until
> >> the link phase.  
> > 
> > Well, I face this in poudriere on the most recent 12-CURRENT, too as well as
> > 12-CURRENT buildworld today.
> > 
> > On the host I'd like to run qemu for testing aarch64 binaries for a Odroid-C2
> > project, I use a customized /etc/src.conf - but on poudriere, there is no such
> > customisation but the failing is identical.  
> 
> Looking at your errors, it seems that the port has decided to enable
> rdma support.  This is normally enabled using --enable-rdma with the
> configure script, but I don't see that at all in the port Makefile.
> 
> On my systems, it runs a test to check for rdma support, but this fails.
> Quoting from config.log:
> 
>     cc -m64 -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
> -I/usr/work/share/dim/ports/emulators/qemu/work/qemu-2.6.1 -I/usr/local/include
> -DPREFIX=\""/usr/local\"" -Wno-string-plus-int -Wno-initializer-overrides
> -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security
> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits
> -fstack-protector-strong -I/usr/local/include -I/usr/local/include/p11-kit-1
> -I/usr/local/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64 -g
> -fstack-protector -L"/usr/local/lib" -lrdmacm -libverbs config-temp/qemu-conf.c:1:10:
> fatal error: 'rdma/rdma_cma.h' file not found #include <rdma/rdma_cma.h> ^
> 
> The minimal test program it tries to compile here is just this:
> 
>     #include <rdma/rdma_cma.h>
>     int main(void) { return 0; }
> 
> and it attempts to link it with -lrdmacm -libverbs.  If this somehow
> succeeds on your system, then it will think rdma support is available,
> while apparently the support is not complete, if it misses the
> rdma_getaddrinfo() function.
> 
> Do you have some Linux rdma or infiniband headers or libraries installed
> into /usr or /usr/local?  This might be the cause of the problems.
> 
> If you don't want or care about rdma, you can try the following patch
> (should similarly apply to the other qemu ports):
> 
> Index: emulators/qemu/Makefile
> ===================================================================
> --- emulators/qemu/Makefile     (revision 429888)
> +++ emulators/qemu/Makefile     (working copy)
> _at__at_ -78,6 +78,7 _at__at_
>                 --disable-libssh2 --enable-debug \
>                 --prefix=${PREFIX} --cc=${CC} --enable-docs --disable-kvm \
>                 --disable-linux-user --disable-linux-aio --disable-xen \
> +               --disable-rdma \
>                 --smbd=${LOCALBASE}/sbin/smbd --enable-debug-info
> --python=${PYTHON_CMD} \ --extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\
> -DPREFIX=\\\"\"${PREFIX}\\\"\"
> 
> -Dimitry
> 

emulators/qemu bugged out at:

[...]
/usr/bin/ld:../config-host.ld:14: syntax error
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:195: qemu-sparc64] Error 1

I think so far this is a real bug?

I'll adjust the PR in bugzilla.

I also opened another PR regarding the real bug reported earlier, you'll find the PR here:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215659


Kind regards,
oh

-- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).

Received on Thu Dec 29 2016 - 19:33:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:09 UTC