Summary: | [x11 overlay] x11-base/x11-drm-99999999 fails to build | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | SpOeK |
Component: | New packages | Assignee: | Bryan Stine (RETIRED) <battousai> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | Joel.Bosveld, Michael.Gaber, oahong, rion4ik, x11-drivers |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Updated patch with fixed define (-D_POSIX_C_SOURCE=199309L) and added flag (-lrt)
need patch |
Description
SpOeK
2009-01-12 15:41:42 UTC
here is my correspondence with commiter:
> Hi
>
> f4f76a6894b40abd77f0ffbf52972127608b9bca commit to mesa/drm breaks
> compilation on gentoo system.
>
> see attached build log.
>
> i have linux-headers-2.6.28 (aka kernel headers)
> and glibc-2.9_p20081201 (with gentoo patches).
>
> maybe something wrong with gentoo patches. I can send time.h and
> sys/time.h files to you for check.
Looks like it builds initially:
...
libtool: compile:
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -I../shared-core -march=native -O2 -pipe -fomit-frame-pointer -MT
xf86drmSL.lo -MD -MP -MF .deps/xf86drmSL.Tpo -c xf86drmSL.c -o xf86drmSL.o
if /bin/sh ../libtool --mode=compile
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -I../shared-core -march=native -O2 -pipe -fomit-frame-pointer -MT
xf86drmMode.lo -MD -MP -MF ".deps/xf86drmMode.Tpo" \
-c -o xf86drmMode.lo `test -f 'xf86drmMode.c' || echo './'`xf86drmMode.c; \
then mv -f ".deps/xf86drmMode.Tpo" ".deps/xf86drmMode.Plo"; \
else rm -f ".deps/xf86drmMode.Tpo"; exit 1; \
fi
libtool: compile:
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -I../shared-core -march=native -O2 -pipe -fomit-frame-pointer -MT
xf86drmMode.lo -MD -MP -MF .deps/xf86drmMode.Tpo -c xf86drmMode.c -o xf86drmMode.o
/bin/sh ../libtool --mode=link
i686-pc-linux-gnu-gcc -I../shared-core -march=native -O2 -pipe -fomit-frame-pointer -o
libdrm.la -rpath /usr/lib -version-number 2:4:0 -no-undefined xf86drm.lo xf86drmHash.lo xf86drmRandom.lo
xf86drmSL.lo xf86drmMode.lo -lrt
libtool: link: i686-pc-linux-gnu-ar cru .libs/libdrm.a xf86drm.o xf86drmHash.o xf86drmRandom.o
xf86drmSL.o xf86drmMode.o
libtool: link: i686-pc-linux-gnu-ranlib .libs/libdrm.a
libtool: link: ( cd ".libs" && rm -f "libdrm.la" && ln -s "../libdrm.la" "libdrm.la" )
make[3]: Leaving directory `/var/tmp/portage/x11-base/x11-drm-99999999/work/drm/libdrm'
...
Then the linux-core build fails (which I'd expect, you really shouldn't
build that anymore on Linux) and then you see the CLOCK_GETTIME problem.
And you script seems to fail too:
...
/var/tmp/portage/x11-base/x11-drm-99999999/work/drm/linux-core...
/var/tmp/portage/x11-base/x11-drm-99999999/temp/environment: line 3954: MODULESD_DRM.KO_ENABLED=yes:
command not found
/var/tmp/portage/x11-base/x11-drm-99999999/temp/environment: line 3954: MODULESD_RADEON.KO_ENABLED=yes:
command not found
ln: creating symbolic link `Module.symvers': File exists
...
which might cause trouble.
Oh and then it's the dristat program that fails to build... is that file
missing a time.h include or maybe defining some incompatible gcc feature
flags?
-- Jesse Barnes, Intel Open Source Technology Center
maintainers: there is no metadata.xml for x11-drm in the x11 overlay. please add it - thanks. After some work, I think I've found the problem. It's some kind of typo in linux-core/Makefile: "-DPOSIX_C_SOURCE=199309L" should be "-_DPOSIX_C_SOURCE=199309L" (note the underscore). Also, the LDFLAG "-lrt" is necessary for "clock_gettime". I don't know if this is somewhat related exclusively to Gentoo or upstream didn't test dristat compilation. Should upstream be notified? Created attachment 178435 [details, diff]
Updated patch with fixed define (-D_POSIX_C_SOURCE=199309L) and added flag (-lrt)
(In reply to comment #3) > After some work, I think I've found the problem. It's some kind of typo in > linux-core/Makefile: "-DPOSIX_C_SOURCE=199309L" should be > "-_DPOSIX_C_SOURCE=199309L" (note the underscore). Also, the LDFLAG "-lrt" is > necessary for "clock_gettime". I don't know if this is somewhat related > exclusively to Gentoo or upstream didn't test dristat compilation. Should > upstream be notified? > Well, reviewing my previous comment I've seen a mistake: the new define should be "-D_POSIX_C_SOURCE=199309L". This mistake doesn't affect the proposed patch. a bit more my correspondence
On Friday, January 16, 2009 10:54 am Rion wrote:
> > Jesse Barnes пишет:
>> > > On Tuesday, January 13, 2009 11:21 pm Rion wrote:
>>> > >> Hi, Jesse!
>>> > >>
>>> > >> can you look at last comments here
>>> > >>
>>> > >> http://bugs.gentoo.org/show_bug.cgi?id=254649 ?
>> > >
>> > > Did you figure this out yet? It looked like that bug ended up with a
>> > > resolution at the end...
> >
> > resolution is additional patch which fixes some things in original
> > Makefile.
> >
> > one of them is:
> >
> > -PRGCFLAGS = $(CFLAGS) -g -ansi -pedantic -DPOSIX_C_SOURCE=199309L \
> > +PRGCFLAGS = $(CFLAGS) -g -ansi -pedantic -D_POSIX_C_SOURCE=199309L \
> >
> > probably should be fixed in upstream, isn't it?
> >
> > i don't sure about other things.
Yeah, please post the patch to dri-devel for review & commit.
Thanks,
-- Jesse Barnes, Intel Open Source Technology Center
--------------------------------------------
so can somebody more appreciative post there?
(In reply to comment #6) > a bit more my correspondence > > [...] > Yeah, please post the patch to dri-devel for review & commit. > > Thanks, > -- Jesse Barnes, Intel Open Source Technology Center > > > > > > -------------------------------------------- > so can somebody more appreciative post there? > I've posted the patch to dri-devel but it seems that this bug is related to Gentoo packaging of x11-drm. Here is the message [ http://sourceforge.net/mailarchive/message.php?msg_name=20090118232203.07bfb9a6%40daedalus.pq.iki.fi ] from dri-devel: > in my Gentoo box, "dristat", from "mesa/drm", fails to build because of > an incorrect define in linux-core/Makefile: "-DPOSIX_C_SOURCE=199309L" > should be "-D_POSIX_C_SOURCE=199309L". Also, "-lrt" is needed in the > linking stage. > > This problem was filed as a bug [1] to Gentoo's bugzilla but I think > that it should be fixed at this level. > [1] http://bugs.gentoo.org/show_bug.cgi?id=254649 Please, fix your build system to use the right Makefile, which is tests/Makefile. {dri,drm}stat are built with libdrm. This is purely a Gentoo packaging bug. See http://cgit.freedesktop.org/mesa/drm/commit/?id=27fae006853647ad0087067adc4eaa8d4ed4594a ------------------------------------------------------ The commit referred in the message is a total clean up of linux-core/Makefile, may be making unnecessary the current patch for x11-drm in Portage (x11-drm-99999999-gentoo-0.2.tar.bz2). I don't yet have access to the overlay. Once I get it, I can fix the ebuild there for the changes they've made. I had to comment 3 lines in order to make it build: EPATCH_SUFFIX="patch" epatch ${PATCHDIR} emake LINUXDIR="${KERNEL_DIR}" dristat || die "Building dristat failed." emake LINUXDIR="${KERNEL_DIR}" drmstat || die "Building drmstat failed." Now it builds and installs fine. the patch fails to apply: ***** 002_all_misc-makefile-fixes.patch ***** ============================================= PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < /var/tmp/paludis/x11-base-x11-drm-99999999/work/patch/002_all_misc-makefile-fixes.patch ============================================= can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -urN drm.orig/linux-core/Makefile drm/linux-core/Makefile |--- drm.orig/linux-core/Makefile 2005-05-02 23:36:46.000000000 -0400 |+++ drm/linux-core/Makefile 2005-05-02 23:42:00.000000000 -0400 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored ============================================= PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch < /var/tmp/paludis/x11-base-x11-drm-99999999/work/patch/002_all_misc-makefile-fixes.patch ============================================= patching file linux-core/Makefile Hunk #1 FAILED at 245. Hunk #2 FAILED at 263. 2 out of 2 hunks FAILED -- saving rejects to file linux-core/Makefile.rej ============================================= PATCH COMMAND: patch -p2 -g0 -E --no-backup-if-mismatch < /var/tmp/paludis/x11-base-x11-drm-99999999/work/patch/002_all_misc-makefile-fixes.patch ============================================= can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -urN drm.orig/linux-core/Makefile drm/linux-core/Makefile |--- drm.orig/linux-core/Makefile 2005-05-02 23:36:46.000000000 -0400 |+++ drm/linux-core/Makefile 2005-05-02 23:42:00.000000000 -0400 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored ============================================= PATCH COMMAND: patch -p3 -g0 -E --no-backup-if-mismatch < /var/tmp/paludis/x11-base-x11-drm-99999999/work/patch/002_all_misc-makefile-fixes.patch ============================================= missing header for unified diff at line 4 of patch can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -urN drm.orig/linux-core/Makefile drm/linux-core/Makefile |--- drm.orig/linux-core/Makefile 2005-05-02 23:36:46.000000000 -0400 |+++ drm/linux-core/Makefile 2005-05-02 23:42:00.000000000 -0400 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored ============================================= PATCH COMMAND: patch -p4 -g0 -E --no-backup-if-mismatch < /var/tmp/paludis/x11-base-x11-drm-99999999/work/patch/002_all_misc-makefile-fixes.patch ============================================= missing header for unified diff at line 4 of patch can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -urN drm.orig/linux-core/Makefile drm/linux-core/Makefile |--- drm.orig/linux-core/Makefile 2005-05-02 23:36:46.000000000 -0400 |+++ drm/linux-core/Makefile 2005-05-02 23:42:00.000000000 -0400 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored and i don't really think that this patch is needed if eutoreconf is corectly run before configuring. Please see the patch I provided late last week in bug 255647, to be applied against the x11 overlay. It now builds the x11-drm modules with no patches and has split the programs into their own package (x11-apps/drm-progs). *** Bug 255170 has been marked as a duplicate of this bug. *** (In reply to comment #11) > Please see the patch I provided late last week in bug 255647, to be applied > against the x11 overlay. > > It now builds the x11-drm modules with no patches and has split the programs > into their own package (x11-apps/drm-progs). > Thanks, now all the apps build fine, including the new ebuild drm-progs. The bug is fixed, at least for me. could this patch be changed in the overlay until it's fixed upstream? Thanks Michael *** This bug has been marked as a duplicate of bug 255647 *** Created attachment 207303 [details, diff]
need patch
|