Summary: | After upgrade from 10.1.4 to 10.2-rc4 cross-compile fails | ||
---|---|---|---|
Product: | Mesa | Reporter: | warpme |
Component: | Other | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | idr, pochu27 |
Version: | git | Keywords: | regression |
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 79039 | ||
Attachments: | fixing libdrm includes when cross-compile |
Description
warpme
2014-05-25 21:05:19 UTC
Can you bisect? Created attachment 100147 [details]
fixing libdrm includes when cross-compile
(In reply to comment #2) > Created attachment 100147 [details] > fixing libdrm includes when cross-compile Strange, neither of these changes should be needed. When winsys/radeon/drm is build the RADEON_CFLAGS are used which should pick the correct include location from the libdrm-radeon package. Same logic applies to all other cases in the patch. Most likely your libdrm* packages are not installed correctly and/or pkgconfig is not finding the correct *.pc files. PKG_CONFIG_PATH can help in the latter case. If that does not help can you bisect this issue ? Providing your configure options (including any additional variables that you've set) will help. That was my suspect. But 2 things are worth to mention: -exactly the same environment builds OK with 10.1.4 -I verified pkgconfig.pc for libdrm_radeon: [piotro@myth-devel-vm pkgconfig]$ cat libdrm_radeon.pc prefix=/home/piotro/minimyth-dev/images/build/usr exec_prefix=/home/piotro/minimyth-dev/images/build/usr libdir=/home/piotro/minimyth-dev/images/build/usr/lib includedir=/home/piotro/minimyth-dev/images/build/usr/include Name: libdrm_radeon Description: Userspace interface to kernel DRM services for radeon Version: 2.4.54 Libs: -L${libdir} -ldrm_radeon Cflags: -I${includedir} -I${includedir}/libdrm My configure options look following: CONFIGURE_ARGS = $(DIRPATHS) --build=$(GARBUILD) --host=$(GARHOST) \ --x-includes="$(DESTDIR)$(includedir)" \ --x-libraries="$(DESTDIR)$(libdir)" \ --disable-silent-rules \ $(if $(filter i386 , $(GARCH_FAMILY)),--enable-32-bit) \ $(if $(filter x86_64, $(GARCH_FAMILY)),--enable-64-bit) \ --disable-static \ --enable-shared \ --disable-debug \ --disable-mangling \ --disable-texture-float \ --enable-asm \ --disable-selinux \ --enable-opengl \ --disable-gles1 \ --disable-gles2 \ --disable-openvg \ --enable-dri \ --enable-glx \ --disable-osmesa \ --disable-gallium-osmesa \ --disable-egl \ --enable-xa \ --disable-gbm \ --disable-xvmc \ --enable-vdpau \ --disable-opencl \ --disable-opencl-icd \ --disable-xlib-glx \ --disable-gallium-egl \ --disable-gallium-gbm \ --disable-r600-llvm-compiler \ --disable-gallium-tests \ --disable-shared-glapi \ --disable-dri3 \ --enable-driglx-direct \ --disable-glx-tls \ --enable-gallium-llvm \ --with-llvm-shared-libs \ --with-gallium-drivers="i915,r300,r600,radeonsi,svga,swrast" \ --with-dri-driverdir="$(libdir)/dri" \ --with-dri-drivers="i915,i965,r200,radeon,swrast" \ --with-vdpau-libdir="$(libdir)/vdpau" \ PKG_CONFIG_PATH="$(libdir)/pkgconfig" \ LIBVA_CFLAGS="$(DESTDIR)$(includedir)" \ LIBVA_LIBS="$(DESTDIR)$(libdir)" \ LIBUDEV_CFLAGS="$(DESTDIR)$(includedir)" \ LIBUDEV_LIBS="$(DESTDIR)$(libdir)" \ RADEON_CFLAGS="$(DESTDIR)$(includedir)/libdrm" \ RADEON_LIBS="$(DESTDIR)$(libdir)" When I remove RADEON_CFLAGS="$(DESTDIR)$(includedir)/libdrm" \ RADEON_LIBS="$(DESTDIR)$(libdir)" configure fails with: ------------------------ checking for INTEL... yes checking for RADEON... no configure: error: Package requirements (libdrm_radeon >= 2.4.54) were not met: Requested 'libdrm_radeon >= 2.4.54' but version of libdrm_radeon is 2.4.52 Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables RADEON_CFLAGS and RADEON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. ------------------------ libdrm_radeon 2.4.52 is version on host system. Target system has 2.4.54 - so it looks like there is indeed issue related to PKG_CONFIG & libdrm_radeon. I'm not sure - but isn't my libdrm_radeon.pc file looking OK? I suspect it is OK as this exactly environment works OK with 10.1.4 Includes issue is solvable - show stopper for me is libvdpau_r600 linking issue On 30/05/14 15:38, bugzilla-daemon@freedesktop.org wrote: > > *Comment # 3 <https://bugs.freedesktop.org/show_bug.cgi?id=79230#c3> > on bug 79230 <https://bugs.freedesktop.org/show_bug.cgi?id=79230> from > Emil Velikov <mailto:emil.l.velikov@gmail.com> * > (In reply tocomment #2 <show_bug.cgi?id=79230#c2>) > > Createdattachment 100147 <attachment.cgi?id=100147> [details] <attachment.cgi?id=100147&action=edit> > > fixing libdrm includes when cross-compile > > Strange, neither of these changes should be needed. When winsys/radeon/drm is > build the RADEON_CFLAGS are used which should pick the correct include location > from the libdrm-radeon package. Same logic applies to all other cases in the > patch. > > Most likely your libdrm* packages are not installed correctly and/or pkgconfig > is not finding the correct *.pc files. PKG_CONFIG_PATH can help in the latter > case. That was my suspect. But 2 things are worth to mention: -exactly the same environment builds OK with 10.1.4 -I verified pkgconfig.pc for libdrm_radeon: [piotro@myth-devel-vm pkgconfig]$ cat libdrm_radeon.pc prefix=/home/piotro/minimyth-dev/images/build/usr exec_prefix=/home/piotro/minimyth-dev/images/build/usr libdir=/home/piotro/minimyth-dev/images/build/usr/lib includedir=/home/piotro/minimyth-dev/images/build/usr/include Name: libdrm_radeon Description: Userspace interface to kernel DRM services for radeon Version: 2.4.54 Libs: -L${libdir} -ldrm_radeon Cflags: -I${includedir} -I${includedir}/libdrm My configure options look following: CONFIGURE_ARGS = $(DIRPATHS) --build=$(GARBUILD) --host=$(GARHOST) \ --x-includes="$(DESTDIR)$(includedir)" \ --x-libraries="$(DESTDIR)$(libdir)" \ --disable-silent-rules \ $(if $(filter i386 , $(GARCH_FAMILY)),--enable-32-bit) \ $(if $(filter x86_64, $(GARCH_FAMILY)),--enable-64-bit) \ --disable-static \ --enable-shared \ --disable-debug \ --disable-mangling \ --disable-texture-float \ --enable-asm \ --disable-selinux \ --enable-opengl \ --disable-gles1 \ --disable-gles2 \ --disable-openvg \ --enable-dri \ --enable-glx \ --disable-osmesa \ --disable-gallium-osmesa \ --disable-egl \ --enable-xa \ --disable-gbm \ --disable-xvmc \ --enable-vdpau \ --disable-opencl \ --disable-opencl-icd \ --disable-xlib-glx \ --disable-gallium-egl \ --disable-gallium-gbm \ --disable-r600-llvm-compiler \ --disable-gallium-tests \ --disable-shared-glapi \ --disable-dri3 \ --enable-driglx-direct \ --disable-glx-tls \ --enable-gallium-llvm \ --with-llvm-shared-libs \ --with-gallium-drivers="i915,r300,r600,radeonsi,svga,swrast" \ --with-dri-driverdir="$(libdir)/dri" \ --with-dri-drivers="i915,i965,r200,radeon,swrast" \ --with-vdpau-libdir="$(libdir)/vdpau" \ PKG_CONFIG_PATH="$(libdir)/pkgconfig" \ LIBVA_CFLAGS="$(DESTDIR)$(includedir)" \ LIBVA_LIBS="$(DESTDIR)$(libdir)" \ LIBUDEV_CFLAGS="$(DESTDIR)$(includedir)" \ LIBUDEV_LIBS="$(DESTDIR)$(libdir)" \ RADEON_CFLAGS="$(DESTDIR)$(includedir)/libdrm" \ RADEON_LIBS="$(DESTDIR)$(libdir)" When I remove RADEON_CFLAGS="$(DESTDIR)$(includedir)/libdrm" \ RADEON_LIBS="$(DESTDIR)$(libdir)" configure fails with: ------------------------ checking for INTEL... yes checking for RADEON... no configure: error: Package requirements (libdrm_radeon >= 2.4.54) were not met: Requested 'libdrm_radeon >= 2.4.54' but version of libdrm_radeon is 2.4.52 Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables RADEON_CFLAGS and RADEON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. ------------------------ libdrm_radeon 2.4.52 is version on host system. Target system has 2.4.54 - so it looks like there is indeed issue related to PKG_CONFIG & libdrm_radeon. I'm not sure - but isn't my libdrm_radeon.pc file looking OK? I suspect it is OK as this exactly environment works OK with 10.1.4 Includes issue is solvable - show stopper for me is libvdpau_r600 linking issue :-( > > If that does not help can you bisect this issue ? Providing your configure > options (including any additional variables that you've set) will help. > ------------------------------------------------------------------------ > You are receiving this mail because: > > * You reported the bug. > A couple of distinct issues here (rather unrelated): 1: Missing gl* declarations as posted originally. Most likely a duplicate of bug 79294. Should be addressed with http://patchwork.freedesktop.org/patch/26907/ 2: Complete bogus build setup :\ (In reply to comment #5) > That was my suspect. But 2 things are worth to mention: > -exactly the same environment builds OK with 10.1.4 > -I verified pkgconfig.pc for libdrm_radeon: > Indeed mesa's build has been rather buggy and/or allowed many bad things to be done, although I've been trying to address this recently. > My configure options look following: > > CONFIGURE_ARGS = $(DIRPATHS) --build=$(GARBUILD) --host=$(GARHOST) \ > --x-includes="$(DESTDIR)$(includedir)" \ > --x-libraries="$(DESTDIR)$(libdir)" \ Those two have been used for a while. Drop them. > --disable-silent-rules \ > $(if $(filter i386 , $(GARCH_FAMILY)),--enable-32-bit) \ > $(if $(filter x86_64, $(GARCH_FAMILY)),--enable-64-bit) \ > --disable-static \ > --enable-shared \ > --disable-debug \ > --disable-mangling \ > --disable-texture-float \ > --enable-asm \ > --disable-selinux \ > --enable-opengl \ > --disable-gles1 \ > --disable-gles2 \ > --disable-openvg \ > --enable-dri \ > --enable-glx \ > --disable-osmesa \ > --disable-gallium-osmesa \ > --disable-egl \ > --enable-xa \ > --disable-gbm \ > --disable-xvmc \ > --enable-vdpau \ > --disable-opencl \ > --disable-opencl-icd \ > --disable-xlib-glx \ > --disable-gallium-egl \ > --disable-gallium-gbm \ > --disable-r600-llvm-compiler \ > --disable-gallium-tests \ > --disable-shared-glapi \ > --disable-dri3 \ > --enable-driglx-direct \ > --disable-glx-tls \ > --enable-gallium-llvm \ > --with-llvm-shared-libs \ > --with-gallium-drivers="i915,r300,r600,radeonsi,svga,swrast" \ > --with-dri-driverdir="$(libdir)/dri" \ > --with-dri-drivers="i915,i965,r200,radeon,swrast" \ > --with-vdpau-libdir="$(libdir)/vdpau" \ > PKG_CONFIG_PATH="$(libdir)/pkgconfig" \ Wrong. You should set the path to the location where the cross-build pc are available. I.e. the location where the above libdrm_radeon.pc is stored. > LIBVA_CFLAGS="$(DESTDIR)$(includedir)" \ > LIBVA_LIBS="$(DESTDIR)$(libdir)" \ > LIBUDEV_CFLAGS="$(DESTDIR)$(includedir)" \ > LIBUDEV_LIBS="$(DESTDIR)$(libdir)" \ > RADEON_CFLAGS="$(DESTDIR)$(includedir)/libdrm" \ > RADEON_LIBS="$(DESTDIR)$(libdir)" > Fix PKG_CONFIG_PATH and drop the above. > Includes issue is solvable - show stopper for me is libvdpau_r600 > linking issue :-( > Should be resolved once PKG_CONFIG_PATH is fixed. Emil,
>> PKG_CONFIG_PATH="$(libdir)/pkgconfig" \
>Wrong. You should set the path to the location where the cross-build pc are >available. I.e. the location where the above libdrm_radeon.pc is stored.
Argh. Silly me. This is typo. Corrected and now I'm able to compile. Patch for libdrm includes is still needed however - but this is minor thing.
Thx for Your help!
(In reply to comment #7) > Emil, > > >> PKG_CONFIG_PATH="$(libdir)/pkgconfig" \ > >Wrong. You should set the path to the location where the cross-build pc are >available. I.e. the location where the above libdrm_radeon.pc is stored. > > Argh. Silly me. This is typo. Corrected and now I'm able to compile. Patch > for libdrm includes is still needed however - but this is minor thing. > > Thx for Your help! As mentioned above the patch should not be needed if PKG_CONFIG_PATH is correctly set and you are installing the files in their recommended location/there are no hacks like these in your libdrm build. Feel free to open if the original issue "error: no previous prototype for 'gl*'" persist. For everything else please file a different bugreport. Thanks This ticket can be closed. 10.2.1 cross-compiles now OK without any patches. Thx! |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.