Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
Package: mesa Severity: normal Hi, Mesa FTBFS on hurd-i386 because this architecture doesn't have dri/drm. The libdrm-dev dependency should hence be dropped for that architecture, and libgl1-mesa-dri shouldn't get compiled. Regards, Samuel -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (900, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.14 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) -- Samuel Thibault <[EMAIL PROTECTED]> csp.tar.gz: ascii text -+- #ens-mim - vive les browsers qui prennent des initiatives à la con -+- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
tags 358065 +patch thanks Hi, the attached patch fixes this problem in the most elegant way I could come up with given the make-me-harder attitude of mesa's debian/rules. If somebody has a better suggestion, I'd be happy to know :) As the current version has reached testing some time ago, and a missing mesa seems to be breaking a lot, I plan to NMU this in a couple of days if there are no objections. cheers, Michael diff -u mesa-6.4.1/debian/control mesa-6.4.1/debian/control --- mesa-6.4.1/debian/control +++ mesa-6.4.1/debian/control @@ -4,7 +4,7 @@ Maintainer: Mesa package maintainers <[EMAIL PROTECTED]> Uploaders: Marcelo E. Magallon <[EMAIL PROTECTED]> Standards-Version: 3.6.1 -Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 1.0.5), libdirectfb-dev, xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, +Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 1.0.5) [!hurd-i386], libdirectfb-dev, xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, Package: libgl1-mesa-swx11 Section: libs diff -u mesa-6.4.1/debian/rules mesa-6.4.1/debian/rules --- mesa-6.4.1/debian/rules +++ mesa-6.4.1/debian/rules @@ -17,7 +17,11 @@ STAMPDIR := debian/stamp +ifeq (hurd-i386,$(DEB_HOST_ARCH)) +select_target_any = $(shell dh_listpackages -s | grep -v '^$$' | while read p ; do cut -d ' ' -f 1,3 debian/libdir.map | grep -w $$p ; done | grep -v _ | grep -v dri | cut -d ' ' -f 1 | sort -u | grep ^$(1)- | cut -d - -f 2-) +else select_target_any = $(shell dh_listpackages -s | grep -v '^$$' | while read p ; do cut -d ' ' -f 1,3 debian/libdir.map | grep -w $$p ; done | grep -v _ | cut -d ' ' -f 1 | sort -u | grep ^$(1)- | cut -d - -f 2-) +endif select_target_arch = $(filter $(foreach t,$(BUILD_$(1)_TARGETS_any),$(t)_%), $(patsubst configs/%, %, $(wildcard configs/*_$(DEB_HOST_ARCH select_target = $(sort $(BUILD_$(1)_TARGETS_any) $(BUILD_$(1)_TARGETS_arch))
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
On Thu, May 04, 2006 at 06:14:13PM +0200, Michael Banck wrote: > the attached patch fixes this problem in the most elegant way I could > come up with given the make-me-harder attitude of mesa's > debian/rules. If somebody has a better suggestion, I'd be happy to > know :) Whatever. If don't understand why debian/rules is the way it is, keep your comments to yourself. If you can come up with a better solution to the problem of packaging Mesa, by all means post a patch. > As the current version has reached testing some time ago, and a > missing mesa seems to be breaking a lot, I plan to NMU this in a > couple of days if there are no objections. The proposed patch is not acceptable on grounds of not scaling well. This in particular: > +ifeq (hurd-i386,$(DEB_HOST_ARCH)) > +select_target_any = $(shell dh_listpackages -s | grep -v '^$$' | while read > p ; do cut -d ' ' -f 1,3 debian/libdir.map | grep -w $$p ; done | grep -v _ > | grep -v dri | cut -d ' ' -f 1 | sort -u | grep ^$(1)- | cut -d - -f 2-) > +else > select_target_any = $(shell dh_listpackages -s | grep -v '^$$' | while read > p ; do cut -d ' ' -f 1,3 debian/libdir.map | grep -w $$p ; done | grep -v _ > | cut -d ' ' -f 1 | sort -u | grep ^$(1)- | cut -d - -f 2-) > +endif If you inspect debian/rules you'll see there not a single explicit mention of architectures in there. I'd like it to stay that way. In the past debian/rules was a mess of architecture special casing and I don't want to go back to that. If you can provide a comprehensive list of architectures where libgl1-mesa-dri SHOULD be built, I'll accept that. If you are so inclined, moan about the lack of exclusion lists for the Architecture field with the dpkg developers. Is DRM linux specific or does it exist on FreeBSD, too? Marcelo -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
On Sun, 2006-05-14 at 20:59 -0600, Marcelo E. Magallon wrote: > > Is DRM linux specific or does it exist on FreeBSD, too? FreeBSD, too. The other BSDs have had varying degrees of support as well I think. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
Hi, I tried to figure out how to disable things for the Hurd for a while now, but wasn't able to :( Let me repeat the requirements, maybe somebody else knows better: libgl1-mesa-dri should not be built at all libgl1-mesa-glx should probably also not be built, does not include /usr/lib/libGL.so.1.2 if libgl1-mesa-dri is hacked away at least. Michael -- Michael Banck Debian Developer [EMAIL PROTECTED] http://www.advogato.org/person/mbanck/diary.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
On Fri, 2006-07-21 at 21:39 +0200, Michael Banck wrote: > > libgl1-mesa-glx should probably also not be built, does not include > /usr/lib/libGL.so.1.2 if libgl1-mesa-dri is hacked away at least. That's probably just a bug. libgl1-mesa-glx could definitely be useful without DRI support, but there may also be upstream issues preventing that ATM. Nothing that can't be fixed though. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
Hi again, here is a small but important update of the patch. The additional part is located in ``additional-GL-mklib.diff'' while the updated patch is the ``hurd-dri-drm-updated.diff'' file. There was an extra mklib for the GL library, which made the package useless. With that updated patch, it was possible to build these packages: - freeglut - mesa-utils - glitz BTW, glxgears is running. That seems to be confirming that the package is usable like that. If you'd like to have a look at the list of the files for i386 and hurd-i386 packages, I'm including them. The best way to compare them is IMHO ``sdiff''. Cheers, -- Cyril Brulebois --- src/mesa/Makefile.old 2006-08-16 10:04:41.0 + +++ src/mesa/Makefile 2006-08-16 10:04:11.0 + @@ -150,10 +150,12 @@ # Make the GL library $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) +ifndef NO_DRI_NO_DRM @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \ -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ -install $(LIB_DIR) \ $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS) +endif # Make the OSMesa library $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS) diff -urN mesa-6.4.2.old/configs/debian-directfb mesa-6.4.2/configs/debian-directfb --- mesa-6.4.2.old/configs/debian-directfb 2006-08-12 16:59:25.0 + +++ mesa-6.4.2/configs/debian-directfb 2006-08-12 17:00:02.0 + @@ -5,3 +5,10 @@ GL_LIB_DEPS = -lm -lpthread DRIVER_DIRS = directfb + +ifeq ($(DEB_HOST_ARCH),hurd-i386) +gnudefault: + @echo "No directfb on hurd, disabling the build by default target diversion" + @echo "Creating an empty and invalid shared object so that the build runs OK" + touch mesa/drivers/directfb/libidirectfbgl_mesa.so +endif diff -urN mesa-6.4.2.old/configs/debian-dri mesa-6.4.2/configs/debian-dri --- mesa-6.4.2.old/configs/debian-dri 2006-08-12 16:59:25.0 + +++ mesa-6.4.2/configs/debian-dri 2006-08-12 17:00:02.0 + @@ -2,7 +2,12 @@ CONFIG_NAME = debian-dri -DEBIAN_COMMON_CPPFLAGS += -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR=\"$(DEBIAN_DRIVERS_DIR)\" +DEBIAN_COMMON_CPPFLAGS += -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR=\"$(DEBIAN_DRIVERS_DIR)\" + +ifneq ($(DEB_HOST_ARCH),hurd-i386) +DEBIAN_COMMON_CPPFLAGS += -DGLX_DIRECT_RENDERING +endif + LIBDRM_LIB = `pkg-config --libs libdrm` DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) @@ -31,3 +36,10 @@ ifeq ($(DEB_HOST_ARCH),amd64) DRI_DIRS += i915 endif + +ifeq ($(DEB_HOST_ARCH),hurd-i386) +DEBIAN_DRIVER_DIRS = +DRIVER_DIRS = +DRI_DIRS = +NO_DRI_NO_DRM = Yes_Please +endif diff -urN mesa-6.4.2.old/debian/control mesa-6.4.2/debian/control --- mesa-6.4.2.old/debian/control 2006-08-12 16:59:25.0 + +++ mesa-6.4.2/debian/control 2006-08-12 17:00:02.0 + @@ -4,7 +4,7 @@ Maintainer: Mesa package maintainers <[EMAIL PROTECTED]> Uploaders: Marcelo E. Magallon <[EMAIL PROTECTED]> Standards-Version: 3.7.2 -Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 2) [!hurd-i386], libdirectfb-dev, xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, x11proto-gl-dev +Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 2) [!hurd-i386], libdirectfb-dev [!hurd-i386], xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, x11proto-gl-dev Package: libgl1-mesa-swx11 Section: libs diff -urN mesa-6.4.2.old/src/glx/x11/Makefile mesa-6.4.2/src/glx/x11/Makefile --- mesa-6.4.2.old/src/glx/x11/Makefile 2006-08-12 16:59:25.0 + +++ mesa-6.4.2/src/glx/x11/Makefile 2006-08-12 17:00:02.0 + @@ -33,7 +33,11 @@ glx_query.c \ glx_texture_compression.c \ dri_glx.c \ - XF86dri.c \ + +ifndef NO_DRI_NO_DRM +C_SOURCES += \ + XF86dri.c +endif X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S X86-64_SOURCES = $(TOP)/src/mesa/x86-64/glapi_x86-64.S diff -urN mesa-6.4.2.old/src/Mesa/Makefile mesa-6.4.2/src/Mesa/Makefile --- mesa-6.4.2.old/src/mesa/Makefile2006-08-16 10:04:41.0 + +++ mesa-6.4.2/src/mesa/Makefile2006-08-16 10:04:11.0 + @@ -150,10 +150,12 @@ # Make the GL library $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) +ifndef NO_DRI_NO_DRM @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \ -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ -install $(LIB_DIR) \ $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS) +endif # Make the OSMesa library $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS) libgl1-mesa-dev ./ ./usr/ ./usr/lib/ ./usr/include/ ./usr/include/GL
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
Hi, On Sun, Aug 20, 2006 at 01:42:23AM +0200, Cyril Brulebois wrote: > here is a small but important update of the patch. The additional part > is located in ``additional-GL-mklib.diff'' while the updated patch is > the ``hurd-dri-drm-updated.diff'' file. > > There was an extra mklib for the GL library, which made the package > useless. With that updated patch, it was possible to build these > packages: > - freeglut > - mesa-utils > - glitz > > BTW, glxgears is running. That seems to be confirming that the package > is usable like that. Thank you for all the hard work, Cyril. > If you'd like to have a look at the list of the files for i386 and > hurd-i386 packages, I'm including them. The best way to compare them is > IMHO ``sdiff''. It seems the remaining file differences are: * /usr/lib/libGL.so.6.4.2 and symlinks missing in libgl1-mesa-directfb{,-dev}. * /usr/lib/dri/*.so missing in libgl1-mesa-dri. * /usr/lib/libOSMesa.so.6.4.060402 and symlinks additionally in libgl1-mesa-glx/libgl1-mesa-dev. The first one is a logical consequence of the lack of directfb support in the Hurd, though it would be nicer if the libgl1-mesa-directfb* packages just would not get built at all. The second one is the main reason for the bug report. I think it is alright to have a mostly empty libgl1-mesa-dri package as this package does not seem to have any serious reverse depends outside of x.org. Again, just not building it would probably also be a solution. The cause for the additional libOSMesa in libgl1-mesa-glx and -dev is not really clear to me. This libOSMesa is not exactly identical to the one in libgl1-mesa-swx11, the symbols are the same, but objdump output is different for non-weak symbols: - DF *UND* 002b _mesa_calloc - DF *UND* 0038 _mesa_destroy_framebuffer + D *UND* _mesa_calloc + D *UND* _mesa_destroy_framebuffer Any help on how to get rid of that library in libgl1-mesa-glx is welcome. > --- src/mesa/Makefile.old 2006-08-16 10:04:41.0 + > +++ src/mesa/Makefile 2006-08-16 10:04:11.0 + > @@ -150,10 +150,12 @@ > > # Make the GL library > $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) > +ifndef NO_DRI_NO_DRM > @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \ > -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ > -install $(LIB_DIR) \ > $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS) > +endif > > # Make the OSMesa library > $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS) > --- mesa-6.4.2.old/src/glx/x11/Makefile 2006-08-12 16:59:25.0 > + > +++ mesa-6.4.2/src/glx/x11/Makefile 2006-08-12 17:00:02.0 + > @@ -33,7 +33,11 @@ > glx_query.c \ > glx_texture_compression.c \ > dri_glx.c \ > - XF86dri.c \ > + > +ifndef NO_DRI_NO_DRM > +C_SOURCES += \ > + XF86dri.c > +endif > > X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S > X86-64_SOURCES = $(TOP)/src/mesa/x86-64/glapi_x86-64.S > diff -urN mesa-6.4.2.old/src/Mesa/Makefile mesa-6.4.2/src/Mesa/Makefile > --- mesa-6.4.2.old/src/mesa/Makefile 2006-08-16 10:04:41.0 + > +++ mesa-6.4.2/src/mesa/Makefile 2006-08-16 10:04:11.0 + > @@ -150,10 +150,12 @@ > > # Make the GL library > $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) > +ifndef NO_DRI_NO_DRM > @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \ > -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ > -install $(LIB_DIR) \ > $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS) > +endif > > # Make the OSMesa library > $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS) This is the upstream part of the patch, which looks good to me. Michel, do you think this is reasonable to submit upstream? The Debian part of the patch is now quite unintrusive in my opinion, and hopefully fine for Marcelo. In summary, I believe the extra libOSMesa library in libgl1-mesa-glx is the only minor outstanding issue; and given the importance of mesa as a Build-Dep (tiff, gtk and Qt need it, and thus a very large chunk of the archive) I think it is OK to apply this patch for now, unless serious objections arise. thanks, Michael -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
On Fri, 2006-08-25 at 15:03 +0200, Michael Banck wrote: > > The second one is the main reason for the bug report. I think it is > alright to have a mostly empty libgl1-mesa-dri package as this package > does not seem to have any serious reverse depends outside of x.org. > Again, just not building it would probably also be a solution. Yeah, the whole purpose of the package is DRI support after all. > This is the upstream part of the patch, which looks good to me. Michel, > do you think this is reasonable to submit upstream? Worth an attempt I think, although it may be desirable to take configs/linux-indirect into account. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
On Sat, Aug 26, 2006 at 04:23:07PM +0200, Michel Dänzer wrote: > > This is the upstream part of the patch, which looks good to me. > > Michel, do you think this is reasonable to submit upstream? > > Worth an attempt I think, although it may be desirable to take > configs/linux-indirect into account. Thanks again for your (much appreciated) comments, Michel. Upstream sent me back to that linux-indirect target, which really sounds like the way to go. Here are an updated patch, which only affects Debian-related files. Quick summary of this patch: - add a diversion so that libdirectfb builds for hurd too (configs/debian-directfb) - add a customized indirect target (configs/debian-indirect) - add a diversion from debian-dri to debian-indirect for hurd (configs/debian-dri) - tag libdirectfb-dev as [!hurd-i386] (debian/control) Of course, that's doesn't impact the build on Linux (I checked on i386). Michael Banck reported that he successfully built freeglut and mesa-utils from experimental with these packages. Sounds like we've got a solution: - following upstream's advice - solving FTBFS troubles, for this release and the next one at least (I mean experimental's CVS snapshot) - allowing us to build (build-)depending packages Would you please consider applying it? Thanks, -- Cyril Brulebois --- mesa-build.orig/mesa-6.4.2/configs/debian-directfb 1970-01-01 12:44:32.0 + +++ mesa-build/mesa-6.4.2/configs/debian-directfb 2006-08-30 21:32:40.0 + @@ -5,3 +5,10 @@ GL_LIB_DEPS = -lm -lpthread DRIVER_DIRS = directfb + +ifeq ($(DEB_HOST_ARCH),hurd-i386) +gnudefault: + @echo "No directfb on hurd, disabling the build by default target diversion" + @echo "Creating an empty and invalid shared object so that the build runs OK" + touch mesa/drivers/directfb/libidirectfbgl_mesa.so +endif --- mesa-build.orig/mesa-6.4.2/configs/debian-dri 1970-01-01 12:44:32.0 + +++ mesa-build/mesa-6.4.2/configs/debian-dri2006-08-30 21:37:24.0 + @@ -2,6 +2,11 @@ CONFIG_NAME = debian-dri +ifeq ($(DEB_HOST_ARCH_OS),hurd) +# Switch to debian-indirect target +include $(TOP)/configs/debian-indirect +else + DEBIAN_COMMON_CPPFLAGS += -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR=\"$(DEBIAN_DRIVERS_DIR)\" LIBDRM_LIB = `pkg-config --libs libdrm` @@ -31,3 +36,5 @@ ifeq ($(DEB_HOST_ARCH),amd64) DRI_DIRS += i915 endif + +endif # DRI or debian-indirect --- /dev/null 1970-01-01 00:00:00.0 + +++ mesa-build/mesa-6.4.2/configs/debian-indirect 2006-08-30 21:34:30.0 + @@ -0,0 +1,6 @@ +DEBIAN_COMMON_CPPFLAGS += -DPTHREADS -DHAVE_ALIAS + +DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl +GL_LIB_DEPS = `pkg-config --libs x11 xext xxf86vm` -lm -lpthread -ldl + +SRC_DIRS = glx/x11 glu glut/glx glw --- mesa-build.orig/mesa-6.4.2/debian/control 1970-01-01 12:44:32.0 + +++ mesa-build/mesa-6.4.2/debian/control2006-08-30 21:30:41.0 + @@ -4,7 +4,7 @@ Maintainer: Mesa package maintainers <[EMAIL PROTECTED]> Uploaders: Marcelo E. Magallon <[EMAIL PROTECTED]> Standards-Version: 3.7.2 -Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 2) [!hurd-i386], libdirectfb-dev, xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, x11proto-gl-dev +Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 2) [!hurd-i386], libdirectfb-dev [!hurd-i386], xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, x11proto-gl-dev Package: libgl1-mesa-swx11 Section: libs signature.asc Description: Digital signature
Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
On Sat, Jul 22, 2006 at 06:16:31PM +0200, Michel Daenzer wrote: > That's probably just a bug. libgl1-mesa-glx could definitely be useful > without DRI support, but there may also be upstream issues preventing > that ATM. Nothing that can't be fixed though. Hi, here's my attempt to get mesa compiled on hurd-i386 without modifying debian/rules. Quick summary: - debian/control: B-D on libdirectfb-dev disactived for hurd-i386. - debian/debian-directfb hacked for hurd-i386, a dummy .so is `touch'-ed so that debian/rules hasn't to be modified. - debian/debian-dri hacked for hurd-i386: - -DGLX_DIRECT_RENDERING is added to DEBIAN_COMMON_CPPFLAGS conditionally; - some variables are changed too for hurd-i386. - src/glx/x11/Makefile has been modified a bit so that XF86dri.c is not added to SOURCES when disactivation of DRI & DRM has been asked. I guess that this could be handled upstream, using GLX_DIRECT_RENDERING. I also tried a bit to play with configs/debian-*_hurd-i386 but TTBOML, watching the last releases of mesa, with *_i386 files, that's only a way to add files, libs, etc. to packages, not a way to replace a target (e.g. debian-dri) with another (e.g. debian-dri_hurd-i386). I also checked that this patch allows the build of latest mesa (6.5-cvs in experimental) without changing much. The src/glx/x11/Makefile patch has to be adapted a bit (the context changes a bit, and SOURCES/C_SOURCES variable renaming occured). I checked too that the build of mesa-6.4.2 on i386 still produces the same files for each package, once that this patch is applied. Cheers, -- Cyril Brulebois diff -urN mesa-6.4.2.old/configs/debian-directfb mesa-6.4.2/configs/debian-directfb --- mesa-6.4.2.old/configs/debian-directfb 2006-08-12 16:59:25.0 + +++ mesa-6.4.2/configs/debian-directfb 2006-08-12 17:00:02.0 + @@ -5,3 +5,10 @@ GL_LIB_DEPS = -lm -lpthread DRIVER_DIRS = directfb + +ifeq ($(DEB_HOST_ARCH),hurd-i386) +gnudefault: + @echo "No directfb on hurd, disabling the build by default target diversion" + @echo "Creating an empty and invalid shared object so that the build runs OK" + touch mesa/drivers/directfb/libidirectfbgl_mesa.so +endif diff -urN mesa-6.4.2.old/configs/debian-dri mesa-6.4.2/configs/debian-dri --- mesa-6.4.2.old/configs/debian-dri 2006-08-12 16:59:25.0 + +++ mesa-6.4.2/configs/debian-dri 2006-08-12 17:00:02.0 + @@ -2,7 +2,12 @@ CONFIG_NAME = debian-dri -DEBIAN_COMMON_CPPFLAGS += -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR=\"$(DEBIAN_DRIVERS_DIR)\" +DEBIAN_COMMON_CPPFLAGS += -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR=\"$(DEBIAN_DRIVERS_DIR)\" + +ifneq ($(DEB_HOST_ARCH),hurd-i386) +DEBIAN_COMMON_CPPFLAGS += -DGLX_DIRECT_RENDERING +endif + LIBDRM_LIB = `pkg-config --libs libdrm` DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) @@ -31,3 +36,10 @@ ifeq ($(DEB_HOST_ARCH),amd64) DRI_DIRS += i915 endif + +ifeq ($(DEB_HOST_ARCH),hurd-i386) +DEBIAN_DRIVER_DIRS = +DRIVER_DIRS = +DRI_DIRS = +NO_DRI_NO_DRM = Yes_Please +endif diff -urN mesa-6.4.2.old/debian/control mesa-6.4.2/debian/control --- mesa-6.4.2.old/debian/control 2006-08-12 16:59:25.0 + +++ mesa-6.4.2/debian/control 2006-08-12 17:00:02.0 + @@ -4,7 +4,7 @@ Maintainer: Mesa package maintainers <[EMAIL PROTECTED]> Uploaders: Marcelo E. Magallon <[EMAIL PROTECTED]> Standards-Version: 3.7.2 -Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 2) [!hurd-i386], libdirectfb-dev, xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, x11proto-gl-dev +Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 2) [!hurd-i386], libdirectfb-dev [!hurd-i386], xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, x11proto-gl-dev Package: libgl1-mesa-swx11 Section: libs diff -urN mesa-6.4.2.old/src/glx/x11/Makefile mesa-6.4.2/src/glx/x11/Makefile --- mesa-6.4.2.old/src/glx/x11/Makefile 2006-08-12 16:59:25.0 + +++ mesa-6.4.2/src/glx/x11/Makefile 2006-08-12 17:00:02.0 + @@ -33,7 +33,11 @@ glx_query.c \ glx_texture_compression.c \ dri_glx.c \ - XF86dri.c \ + +ifndef NO_DRI_NO_DRM +C_SOURCES += \ + XF86dri.c +endif X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S X86-64_SOURCES = $(TOP)/src/mesa/x86-64/glapi_x86-64.S