Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74161 - matroxset won't compile. Problem is in asm/ioctl.h
Summary: matroxset won't compile. Problem is in asm/ioctl.h
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Joel Martin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-11 21:10 UTC by moonlite
Modified: 2005-03-10 18:27 UTC (History)
3 users (show)

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


Attachments
the patch (patch,484 bytes, patch)
2004-12-11 21:15 UTC, moonlite
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description moonlite 2004-12-11 21:10:49 UTC
emerge matroxset would give me:
gcc    -c -o matroxset.o matroxset.c
matroxset.c: In function `main':
matroxset.c:95: error: syntax error before '[' token
matroxset.c:101: error: syntax error before '[' token
matroxset.c:104: error: syntax error before '[' token
matroxset.c:110: error: syntax error before '[' token
make: *** [matroxset.o] Error 1

I tracked down the error but don't know the correct fix.
Here's the deal:
In /usr/include/asm/ioctl.h this is defined:

/* provoke compile error for invalid uses of size argument */
extern unsigned int __invalid_size_argument_for_IOC;
#define _IOC_TYPECHECK(t) \
	((sizeof(t) == sizeof(t[1]) && \
	  sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
	  sizeof(t) : __invalid_size_argument_for_IOC)

This fails and if i remove the first check, like this:
#define _IOC_TYPECHECK(t) \
	(( sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
	  sizeof(t) : __invalid_size_argument_for_IOC)
It compiles and should in most cases do the same thing.
This is probably not a good fix but it's at least something.

Reproducible: Always
Steps to Reproduce:
1. emerge matroxset
2.
3.
Comment 1 moonlite 2004-12-11 21:15:32 UTC
Created attachment 45800 [details, diff]
the patch

Here's a patch if you want that for some reason. I guess the sizeof-check
should still be done in some way though.
Should i forward this to the linux-devel list?
Comment 2 moonlite 2004-12-17 03:15:29 UTC
No comment on this?
Comment 3 Chris White (RETIRED) gentoo-dev 2005-01-27 17:55:10 UTC
This is a kernel patch.  Kernel team needs to check on this.
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2005-01-28 03:30:35 UTC
It's not kernel. Its headers. Which headers are in use?
Comment 5 moonlite 2005-02-12 07:53:50 UTC
I use sys-kernel/linux26-headers-2.6.8.1-r1
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2005-02-12 13:24:13 UTC
Try linux-headers-2.6.10 please (not linux26-headers).
Comment 7 moonlite 2005-02-15 17:38:41 UTC
root@starserver /home/moonlite # emerge -va linux-headers

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[blocks B     ] sys-kernel/linux26-headers (from pkg sys-kernel/linux-headers-2.4.21-r1)
[ebuild  N    ] sys-kernel/linux-headers-2.4.21-r1  -build 27,864 kB 

Total size of downloads: 27,864 kB

!!! Error: The above package list contains packages which cannot be installed
!!!        on the same system.

----
OK, it wants me to get 2.4 headers. So  try this:
----

root@starserver /home/moonlite # emerge -va /usr/portage/sys-kernel/linux-headers/linux-headers-2.6.10.ebuild 
emerging by path implies --oneshot... adding --oneshot to options.

*** emerging by path is broken and may not always work!!!


These are the packages that I would merge, in order:

Calculating dependencies   
*** You are emerging a masked package. It is MUCH better to use
*** /etc/portage/package.* to accomplish this. See portage(5) man
*** page for details.
>>> Waiting 10 seconds before starting...
>>> (Control-C to abort)...
Continuing... in: 10 9 8 7 6 5 4 3 2 1                                                             ...done!
[blocks B     ] sys-kernel/linux26-headers (from pkg sys-kernel/linux-headers-2.6.10)
[ebuild  N    ] sys-kernel/linux-headers-2.6.10  35,677 kB 

Total size of downloads: 35,677 kB

!!! Error: The above package list contains packages which cannot be installed
!!!        on the same system.

---
Well that package was masked.
Is this due to me using an old profile?
Anyway, i really dont want to go through a lot of  hassle to get this working. Especially since i don't use matroxset anymore.
Comment 8 Joel Martin (RETIRED) gentoo-dev 2005-03-10 18:27:23 UTC
I just emerged it with linux-headers-2.4.19 and linux-headers-2.4.22 and linux-headers-2.6.10 and it worked fine for me.

So it's a header issue with the linux26-headers.

I am closing this since the original poster no longer uses matroxset.