Bug 3410

Summary: "make install.sdk" fails when MakeDllModules is enabled.
Product: xorg Reporter: Mike A. Harris <mharris>
Component: Build/MonolithicAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: high CC: dberkholz
Version: 6.8.99.8   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
fix-SDK-dlloader-build.patch none

Description Mike A. Harris 2005-05-27 03:35:44 UTC
The current SDK is broken when doing "make install.sdk", failing when getting
to the first module (bitmap), with the following error:

installing driver SDK in lib/font/bitmap/module...
make[5]: Entering directory
`/home/mharris/rpmbuild/BUILD/xorg-x11-6.8.99.8/xc/lib/font/bitmap/module'
make[5]: *** No rule to make target `libbitmap.so', needed by `install.sdk'.  Stop.
make[5]: Leaving directory
`/home/mharris/rpmbuild/BUILD/xorg-x11-6.8.99.8/xc/lib/font/bitmap/module'
make[4]: *** [install.sdk] Error 2
make[4]: Leaving directory
`/home/mharris/rpmbuild/BUILD/xorg-x11-6.8.99.8/xc/lib/font/bitmap'
make[3]: *** [install.sdk] Error 2
make[3]: Leaving directory
`/home/mharris/rpmbuild/BUILD/xorg-x11-6.8.99.8/xc/lib/font'
make[2]: *** [install.sdk] Error 2
make[2]: Leaving directory `/home/mharris/rpmbuild/BUILD/xorg-x11-6.8.99.8/xc/lib'
make[1]: *** [install.sdk] Error 2
make[1]: Leaving directory `/home/mharris/rpmbuild/BUILD/xorg-x11-6.8.99.8/xc'
make: *** [install.sdk] Error 2
make: Leaving directory `/home/mharris/rpmbuild/BUILD/xorg-x11-6.8.99.8/xc'
error: Bad exit status from /home/mharris/rpmbuild/tmp/rpm-tmp.50886 (%install)


Investigation shows that the bitmap module is still being built as a
static lib even when MakeDllModules is enabled as it is by default in
CVS head.  Further investigation shows that the type1 module also gets
built as a static lib, however the "freetype" module gets built properly
as a .so.

The xc/lib/font/FreeType/module/Imakefile contains quite different code
which conditionalizes how the freetype module gets built depending on
wether it is a MakeDllModules build or not.  The Imakefiles for the
bitmap and type1 modules do not handle this situation properly however.

I considered attempting a patch to make the bitmap and type1 Imakefiles
more similar to the freetype one, however while the freetype one *works*,
it seems horribly written and very wrong.

ie:
/*#define BuildFreetypeDlModule NO*/

#if !defined(BuildFreetypeDlModule)
# define BuildFreetypeDlModule (HasFreetype2 && HasDlopen)
#endif

#if !BuildFreetypeDlModule
EXTRADEFINES = Freetype2BuildDefines -DFONTMODULE
# else
# undef MakeDllModules
# define MakeDllModules YES
#endif


This code seems backwards.  Shouldn't this be preferred instead?

#if !MakeDllModules
EXTRADEFINES = Freetype2BuildDefines -DFONTMODULE
# else
#define BuildFreetypeDlModule YES
#endif



Rather than going down that road however, it seems to me that this should
be code that is factored out into Imake rules files rather than being
duplicated throughout every X server module's Imakefile throughout the
tree.  That would remove a huge mess of conditional stuff from every
module Imakefile.

Admittedly, I haven't checked to see if there are already rules for this
that are just not being used in these modules currently, but I wanted
to report this issue before heading to bed, to gather thoughts
from others.
Comment 1 Mike A. Harris 2005-05-27 03:45:25 UTC
Actually my example:

#if !MakeDllModules
EXTRADEFINES = Freetype2BuildDefines -DFONTMODULE
# else
#define BuildFreetypeDlModule YES
#endif

Should have been:

#define BuildFreetypeDlModule   MakeDllModules
#if !BuildFreetypeDlModule
EXTRADEFINES = Freetype2BuildDefines -DFONTMODULE
#endif


Still quite a mess though IMHO.
Comment 2 Adam Jackson 2005-07-05 11:11:39 UTC
not really a loader issue, taking off the tracker.
Comment 3 Donnie Berkholz 2005-07-20 15:59:43 UTC
Might be nice to make this a release blocker, don't you think?
Comment 4 Donnie Berkholz 2005-07-20 16:01:18 UTC
Created attachment 3112 [details]
xorg-6.8.99.14 dual works

Here's a quick, fairly generic patch that fixes a similar breakage in the nv
driver. Seems to fall under the same bug summary, certainly.
Comment 5 Alan Coopersmith 2005-10-03 23:35:33 UTC
Patch lost in bugzilla disk death.   Attachment pointer now points to another
bug's Xorg.log.
Comment 6 Donnie Berkholz 2005-10-04 11:17:27 UTC
Created attachment 3480 [details] [review]
fix-SDK-dlloader-build.patch

Here 'tis.
Comment 7 Donnie Berkholz 2005-10-05 18:46:49 UTC

*** This bug has been marked as a duplicate of 4645 ***

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.