Bug 10547 - nouveau: __ucmpdi2 unresolved on ppc32
Summary: nouveau: __ucmpdi2 unresolved on ppc32
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/other (show other bugs)
Version: DRI git
Hardware: PowerPC Linux (All)
: medium major
Assignee: Nouveau Project
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-06 11:57 UTC by Pekka Paalanen
Modified: 2008-04-19 09:28 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Pekka Paalanen 2007-04-06 11:57:37 UTC
I am submitting this bug for another user (voodoochild142 on #nouveau), I do not have ppc32 hardware myself.

It seems some versions of GCC generate calls to __ucmpdi2 for 64-bit comparisons, especially for switch-statements. There are two old GCC bugs [1,2] about it and it might be fixed somewhere, but voodoochild142 still hit it on Gentoo today, using the nouveau overlay ebuild x11-drm for installing DRM modules from git tree.

__ucmpdi2 is implemented in libgcc, and there are patches around to take it from there [3]. Another suggested way is to implement it in assembly [4]. These are kernel-wide options.

In the mean time, V4L2 also hit this problem and solved it with a hack [5].

voodoochild142 is using a not-the-latest kernel, 2.6.19-gentoo-r5, but as far as I can see, there is no ppc32 implementation for __ucmpdi2 in 2.6.20. I do not know about the bugfix versions 2.6.20.x or .21-rc. Note, that this bug is GCC-version specific, more info in the links below.

[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21237
[2] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25724
[3] http://marc.info/?l=linux-kernel&m=116612657105264&w=2
[4] http://marc.info/?l=linux-kernel&m=116636223214963&w=2
[5] http://marc.info/?l=linux-kernel&m=116888864416842&w=2
Comment 1 Stephane Marchesin 2007-04-06 12:02:37 UTC
Last time I heard about that, it was a gcc bug and was fixed in later versions. Could you try a later gcc version ?
Comment 2 Stephane Marchesin 2007-04-09 01:43:57 UTC
More precisely, this should be fixed in gcc 4.2
Comment 3 Andy Wingo 2007-04-22 14:57:05 UTC
I also ran into this. I applied the patch from [4] and was able to continue, after a reboot of course...
Comment 4 Stephane Marchesin 2007-05-01 14:43:01 UTC
Reassigning bugs to the list.
Comment 5 Brian Tarricone 2007-11-12 01:56:27 UTC
(In reply to comment #2)
> More precisely, this should be fixed in gcc 4.2

I have gcc 4.2.2 here, and I'm still hitting this.  Patch from [4] works for me as well.
Comment 6 Maarten Maathuis 2008-02-01 11:16:02 UTC
I've not heard people complain about this recently, is it still an issue?
Comment 7 Brian Tarricone 2008-02-01 12:08:09 UTC
Yes, I still had to patch 2.6.24 to add an implementation for this symbol.  Using gcc 4.2.2 here.
Comment 8 Henrik Sørensen 2008-02-05 09:43:04 UTC
I just hit this today. Running a debian compiled 2.6.24-1 ppc32 kernel and I'm compiling with gcc version 4.2.3 (Debian 4.2.3-1).
Comment 9 Emanuele Zamprogno 2008-02-06 04:55:50 UTC
Hi,

I'm using an gcc 4.2.3 from Debian and a Kernel 2.6.24 in a Powerbook G4 [ppc32], but when i conpile DRM, i continue to have the problem.

[drm] Initialized drm 1.1.0 20060810
nouveau: Unknown symbol __ucmpdi2
 

Any ideas? or anything  i can bring here to explain these?

Thanks
Comment 10 KIMURA Masaru 2008-02-06 08:14:49 UTC
FYI, same here on gentoo (ppc32, <=gentoo-sources2.6.23-r5, gcc-4.2.2).
I've filed this bug at gentoo's bugzilla too, b/c to ask toolchain and/or x11 maintainers about where problem is.

http://bugs.gentoo.org/show_bug.cgi?id=204985
Comment 11 Danny 2008-03-13 01:15:37 UTC
I just add here a link to marcheu's patch to do this in drm instead (to make it easy for ppl who want to avoid rebuilding their kernel:

http://icps.u-strasbg.fr/~marchesin/nvdri/ucmpdi2.diff

d.
Comment 12 Stephane Marchesin 2008-04-19 09:28:19 UTC
There is now a fix in the 2.6.25 kernel, I'll close this bug.

If you encounter this on < 2.6.25, apply the patch linked above.


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.