Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 353514 - x11-drivers/psb-kmod-4.41.1_p10-r3 does not compile on amd64
Summary: x11-drivers/psb-kmod-4.41.1_p10-r3 does not compile on amd64
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 12:10 UTC by Sven Eden
Modified: 2012-12-25 13:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Log of the first try (log_03_trans.log,2.94 KB, text/plain)
2011-02-02 12:11 UTC, Sven Eden
Details
Log of the second try (log_04_trans.log,53.43 KB, text/plain)
2011-02-02 12:11 UTC, Sven Eden
Details
Updated ebuild, adding right arch and patchin drm_ioc32.c (psb-kmod-4.42.0-r1.ebuild,2.83 KB, text/plain)
2011-02-02 21:11 UTC, Sven Eden
Details
Fixes calls to psb_drm_ioctl() on amd64 machines (fix_ioc32_on_amd64.patch,8.28 KB, patch)
2011-02-02 21:12 UTC, Sven Eden
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Eden 2011-02-02 12:10:30 UTC
I have downloaded the updated ebuilds and patches for psb-kmod and xf86-video-psb, but the new kernel seems to have had some changes:

First try:

>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1 ...
make -j15 -l8 DRM_MODULES=psb 
make -C /usr/src/linux  SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
make[1]: Entering directory `/usr/src/linux-2.6.37-gentoo'
Makefile:546: /usr/src/linux-2.6.37-gentoo/arch/amd64/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-2.6.37-gentoo/arch/amd64/Makefile'.  Stop.
make[1]: Leaving directory `/usr/src/linux-2.6.37-gentoo'
make: *** [modules] Error 2
emake failed

--- okay. The old arch/amd64 directory is gone, the x86 folder now is unified for both i386 and x86_64.
I added a symlink from x86 to amd64 and tried again:

Second try: (Warning! For some riddle of a reason I do not understand, I can't get the output to something else but german. Even exporting LANG and LC_ALL with "C" does not change it. So here is a google translated log. Sorry about that!)

/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.c: compat_drm_version In function ':
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.c: 106:200: warning: passing argument 1 of 'drm_ioctl 'from incompatible pointer type
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drmP.h: 947:13: Note: expected 'struct file *, "but argument is of type 'struct inode *'
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.c: 106:200: warning: passing argument 2 of 'drm_ioctl 'makes integer from pointer without a cast
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drmP.h: 947:13: Note: expected 'unsigned int' but argument is of type "struct file *"
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.c: 106:200: error: 'drm_ioctl too many arguments to function "

(... and a lot more such messages until finally:)

make [2]: *** [/ var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.o] Error 1
make [1]: *** [_module_/var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1] Error 2
make [1]: Leaving directory `/ usr/src/linux-2.6.37-gentoo '
make: *** [modules] Error 2
emake failed
 * ERROR: x11-drivers/psb-kmod-4.41.1_p10-r3 failed:
 * (No error message)
 *
 * Call stack:
 * Ebuild.sh, line 56: Called src_compile
 * Environment, line 3662: Called die
 * The specific snippet of code:
 * LINUXDIR = / usr / src / linux emake DRM_MODULES = psb | | die
 *
 * If you need support, post the output of 'emerge - info = x11-drivers/psb-kmod-4.41.1_p10-r3'
 * The complete build log and the output of 'emerge-PQV = x11-drivers/psb-kmod-4.41.1_p10-r3'.
 * This ebuild is from an overlay named 'SED-local': '/ usr / local / portage /'
 * The complete build log is located at '/ var/log/portage/x11-drivers: psb-kmod 4.41.1_p10-r3 :20110202-115 748 log.'.
 * The ebuild environment file is located at '/ var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/temp/environment'.
 * S: '/ var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1'


-----

I'll add the full (translated) logs as attachment.

It seems only drmP.h and drm_ioc32.c are involved.

P.S.: Getting a brand new laptop with 4GiB RAM and an Intel i7 is awesome. Noticing that it has a wretched GMA500 Poulsbo chipset is awful. :-(
Comment 1 Sven Eden 2011-02-02 12:11:18 UTC
Created attachment 261344 [details]
Log of the first try

This is the log before adding a symlink in /usr/src/linux/arch from x86 to amd64
Comment 2 Sven Eden 2011-02-02 12:11:43 UTC
Created attachment 261345 [details]
Log of the second try

This is the log after adding said symlink
Comment 3 Sven Eden 2011-02-02 15:29:15 UTC
Unfortunately I get the same errors when trying to build against 2.6.36 kernel.
Comment 4 Sven Eden 2011-02-02 21:09:17 UTC
Okay. The first error happens, because linux-mod_pkg_setup does not set ARCH to x86 with a recent kernel, but amd64. Adding a call to set_arch_to_kernel fixed that.

The second set of errors, well, I fixed them and added a patch, and everything compiles now on my old dev machine. (The one I have to wipe tomorrow, this is why I am in such a hurry and have hijacked at least three other bugs. Sorry about that!)
Comment 5 Sven Eden 2011-02-02 21:11:01 UTC
Created attachment 261376 [details]
Updated ebuild, adding right arch and patchin drm_ioc32.c

This is the updated ebuild that (with the following patch) fixes the reported errors on my test machine.

I can test the stuff on the target machine tomorrow, when I am back at work.
Comment 6 Sven Eden 2011-02-02 21:12:52 UTC
Created attachment 261377 [details, diff]
Fixes calls to psb_drm_ioctl() on amd64 machines

I do not know whether this works out tomorrow. The patched file has a header saying it is about "32bit compatibility". For what on a 64bit machine? Maybe it gets compiled but not linked in? I'll see tomorrow.
Comment 7 Sven Eden 2011-02-02 21:43:26 UTC
I just learned from Peter John Hartman in Bug 274184 comment 53, that there is a new advance on the Poulsbo at launchpad.net/emgd. Besides this new ebuild and patch, I'll give those Ubuntu people a try tomorrow.
Comment 8 Sven Eden 2011-02-03 11:13:17 UTC
*sigh*

My patched ebuild compiles fine, the module loads without problems into the kernel, and X exits with "(EE) No devices detected"

First: I used this site here http://www.cs.bham.ac.uk/~axs/laptop/#config as a reference which states:
"Graphics: Intel. HD Graphics With Express Card, Often referred to as Intel GMA 500 (or Poulsbo)"
The author has the same laptop, a dell latitude e6410, like me. So I took that information for granted. (Big mistake)

But the above message from X let me take a closer look at all those specs out there.

I couldn't find any of the chipset identifiers for GMA500 in what lspci tells me. ( http://en.wikipedia.org/wiki/Intel_GMA#Specifications ) So I took a closer look at /proc/cpuinfo, and it seems that Dell send over a more polished model of the Latitude E6410 than we expected. The CPU is said to be an Intel Core i7 640M, which has not "Poulsbo", but "Arrandale" (Aka GMA HD) built in. (And the reference to GMA500 on the website above was due to an "Express Card", a detail I didn't notice on first sight.)

So nicely enough I made this ebuild compile, install and load fine on amd64 with gentoo-sources-2.6.37, but I can't use it.

However, it got me some nice insights into kernel and driver development last night. ;)
Comment 9 Pacho Ramos gentoo-dev 2012-12-25 13:22:21 UTC
dropped