Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2016 21:17:38 +0100
From:      "O. Hartmann" <o.hartmann@walstatt.org>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        "O. Hartmann" <ohartmann@walstatt.org>, FreeBSD CURRENT <freebsd-current@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org>, Ed Maste <emaste@freebsd.org>
Subject:   Re: emulators/qemu: qemu ports failing due to compiler error on 12-CURRENT
Message-ID:  <20161229211738.54f9beae@thor.walstatt.dynvpn.de>
In-Reply-To: <F84C2E65-8402-49E4-A0EF-173C045CD753@FreeBSD.org>
References:  <20161207104203.7c9524a3@thor.walstatt.dynvpn.de> <782FAC01-9A7C-438F-912C-831628A08E63@FreeBSD.org> <20161229172949.48792b29@thor.walstatt.dynvpn.de> <F84C2E65-8402-49E4-A0EF-173C045CD753@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/P5rV+nodnUW2heZu4jJ_jl3
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Am Thu, 29 Dec 2016 20:26:32 +0100
Dimitry Andric <dim@FreeBSD.org> schrieb:

> On 29 Dec 2016, at 17:29, O. Hartmann <ohartmann@walstatt.org> wrote:
> >=20
> > Am Wed, 7 Dec 2016 23:31:01 +0100
> > Dimitry Andric <dim@FreeBSD.org> schrieb:
> >  =20
> >> On 07 Dec 2016, at 10:42, O. Hartmann <ohartmann@walstatt.org> wrote: =
=20
> >>>=20
> >>> I try my first steps in cross compiling ports with poudriere and ther=
efore I try to
> >>> setup an appropriate jail and QEMU environment.
> >>>=20
> >>> Well, I'm failing at the jail setup due to the non-exitence of any su=
itable QEMU
> >>> environment and for that I tried to figure out to find some proper HO=
WTO.
> >>> Searching via google ave some hints, but in questions which QEMU from=
 ports should
> >>> be used, all leave me alone, so I tried
> >>>=20
> >>> emulators/qemu
> >>> emulators/qemu-devel
> >>> emulators/qemu-static
> >>>=20
> >>> emulators/qemu is known for me to fail since months and the days of 1=
1-CURRENT,
> >>> there is a compiler error spit out with clang 3.8 and now 3.9. The ve=
ry same for
> >>> qemu-devel (both ports used with standard options, no extras). See al=
so Bug 214873
> >>> (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214873) and Bug =
215100
> >>> (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215100). =20
> >>=20
> >> I couldn't reproduce the compilation errors, it builds fine for me unt=
il
> >> the link phase. =20
> >=20
> > Well, I face this in poudriere on the most recent 12-CURRENT, too as we=
ll as
> > 12-CURRENT buildworld today.
> >=20
> > On the host I'd like to run qemu for testing aarch64 binaries for a Odr=
oid-C2
> > project, I use a customized /etc/src.conf - but on poudriere, there is =
no such
> > customisation but the failing is identical. =20
>=20
> 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.
>=20
> On my systems, it runs a test to check for rdma support, but this fails.
> Quoting from config.log:
>=20
>     cc -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -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/i=
nclude
> -DPREFIX=3D\""/usr/local\"" -Wno-string-plus-int -Wno-initializer-overrid=
es
> -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wfor=
mat-security
> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wty=
pe-limits
> -fstack-protector-strong -I/usr/local/include -I/usr/local/include/p11-ki=
t-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> ^
>=20
> The minimal test program it tries to compile here is just this:
>=20
>     #include <rdma/rdma_cma.h>
>     int main(void) { return 0; }
>=20
> 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.
>=20
> 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.

No Linux, but I found these files on all of the boxes in question:

locate rdma

[...]
/usr/include/rdma
/usr/include/rdma/rdma_cma.h
/usr/include/rdma/rdma_cma_abi.h
/usr/lib/librdmacm.a
/usr/lib/librdmacm.so
/usr/lib/librdmacm.so.1

ll usr/include/rdma discovers:

total 44
322075 drwxr-xr-x   2 root  wheel  -  512B Oct  7 13:52 ./
240768 drwxr-xr-x  55 root  wheel  -  6.5K Dec 29 19:14 ../
324275 -r--r--r--   1 root  wheel  -   21K Oct  7 13:52 rdma_cma.h
324276 -r--r--r--   1 root  wheel  -  4.7K Oct  7 13:52 rdma_cma_abi.h

and

ll /usr/lib/librdma*
804463 -r--r--r--  1 root  wheel  -   28K Dec 18 16:34 /usr/lib/librdmacm.a
804127 lrwxr-xr-x  1 root  wheel  -   14B Dec 29 19:15 /usr/lib/librdmacm.s=
o@ ->
librdmacm.so.1 804128 -r--r--r--  1 root  wheel  -   24K Dec 29
19:15 /usr/lib/librdmacm.so.1


As you can see, the libraries are of the date of the last full install of t=
he system,
while the headers seem to be remains from October?

In my jail for poudriere, I was surprised, based on your analysis, that I f=
ound this:

ll /pool/poudriere/jails/head-amd64/usr/include/rdma
total 43
77923 drwxr-xr-x   2 root  wheel  uarch    4B Jul 13 07:09 ./
77028 drwxr-xr-x  55 root  wheel  uarch  336B Dec 28 11:29 ../
96127 -r--r--r--   1 root  wheel  -       21K Jul 13 07:09 rdma_cma.h
96128 -r--r--r--   1 root  wheel  -      4.7K Jul 13 07:09 rdma_cma_abi.h

I do buildworlds on almost a daily basis, so could this be a fallout of any=
 kind?

It seems the installworld didn't got right

Thanks for your analysis - I delete, frankly, the header files as they resi=
de in the base
systems domain without a valid timestamp - they are considered hostile ;-)

the big scary question is now how i can prevent such a situation (possibly =
not if not
staying with STABLE or RELEASE) or how can I clean the system without dange=
r. I think
some of my problems reported in the nearest past (half a year back) could b=
e triggered by
some nasty fallout of CURRENT - you might remember that I also had a strang=
e lib path in
the tree considered not valid and caused lots of problems.

Thank you anyway, it seems that emulators/qemu is now over the point of fai=
lure and I
hope I'll get a working package now to start working on the AARCH64 ports.

Thanks.

Kind regards,
Oliver


> If you don't want or care about rdma, you can try the following patch
> (should similarly apply to the other qemu ports):
>=20
> Index: emulators/qemu/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- emulators/qemu/Makefile     (revision 429888)
> +++ emulators/qemu/Makefile     (working copy)
> @@ -78,6 +78,7 @@
>                 --disable-libssh2 --enable-debug \
>                 --prefix=3D${PREFIX} --cc=3D${CC} --enable-docs --disable=
-kvm \
>                 --disable-linux-user --disable-linux-aio --disable-xen \
> +               --disable-rdma \
>                 --smbd=3D${LOCALBASE}/sbin/smbd --enable-debug-info
> --python=3D${PYTHON_CMD} \ --extra-cflags=3D-I${WRKSRC}\ -I${LOCALBASE}/i=
nclude\
> -DPREFIX=3D\\\"\"${PREFIX}\\\"\"
>=20
> -Dimitry
>=20



--=20
O. Hartmann

Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr
Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.=
 4 BDSG).

--Sig_/P5rV+nodnUW2heZu4jJ_jl3
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWGVvYgAKCRDS528fyFhY
lPhmAf9Jb6GM+UpeGNHaW2nVDSecRGA9xldzvTReHzOc+dj5iIalGxePNud4VEM3
8mxOT9vTj1w/ZUF6fmAMYJ8UxYwKAf94sQRG9pd/x7zIcrfkFMDZBCqbUcSeyLVD
HCsRRFSIzfXERxohlHl2p4Iry6TQYQzlgN0P8MkB7WtXEDmokYY0
=L7fh
-----END PGP SIGNATURE-----

--Sig_/P5rV+nodnUW2heZu4jJ_jl3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161229211738.54f9beae>