Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67747 - gnophone-0.2.4-r1 compile error: audio-oss.c
Summary: gnophone-0.2.4-r1 compile error: audio-oss.c
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Low minor
Assignee: Gentoo Net-im project
URL:
Whiteboard:
Keywords:
: 81042 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-15 23:14 UTC by Yann Ramin
Modified: 2006-02-04 15:42 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yann Ramin 2004-10-15 23:14:30 UTC
emerging gets stuck here

gcc -O -DHAS_IN_ADDR_T -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -I/usr/X11R6/include -DENABLE_UPGRADE -I/usr/lib/mozilla/include -I/usr/lib/mozilla/include/gtkembedmoz -I/usr/lib/mozilla/include/dist/include -I\../.. -I\../../src -DVERSION=\"0.2.4\" -c -o audio-phone.o audio-phone.c
In file included from audio-phone.c:29:
/usr/include/linux/ixjuser.h:353: error: syntax error before '*' token


2.6.7 kernel with alsa

Reproducible: Always
Steps to Reproduce:
1. emerge gnophone
2.
3.
Comment 1 foser (RETIRED) gentoo-dev 2004-10-27 08:45:34 UTC
attach the full output..

guess gnophone doesn't deal with alsa well...
Comment 2 Evan Langlois 2004-11-18 22:41:34 UTC
gcc -O3 -march=pentium4 -fomit-frame-pointer -pipe -DHAS_IN_ADDR_T -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -I/usr/X11R6/include -DENABLE_UPGRADE -I/usr/lib/mozilla/include -I/usr/lib/mozilla/include/gtkembedmoz -I/usr/lib/mozilla/include/dist/include -I\../.. -I\../../src -DVERSION=\"0.2.4\" -c -o audio-phone.o audio-phone.c
gcc -shared -Xlinker -x -o audio-oss.so audio-oss.o
In file included from audio-phone.c:29:
/usr/include/linux/ixjuser.h:353: error: parse error before '*' token
make[3]: *** [audio-phone.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/gnophone-0.2.4-r1/work/gnophone-0.2.4/src/modules'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/gnophone-0.2.4-r1/work/gnophone-0.2.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gnophone-0.2.4-r1/work/gnophone-0.2.4'
make: *** [all-recursive-am] Error 2


*********
this is what i get 
Comment 3 Evan Langlois 2004-12-23 21:36:09 UTC
The error in question, I believe, has to do with the __user *ce in the ixjuser.h file (from the kernel-headers, mine are kernel26-headers) below, which is the line in question.  I don't think __user is defined anywhere.  I'm guessing gnophone wants a 2.4 version of the header?

Trying to emerge an earlier version of gnophone doesn't help.


typedef struct {
        int index;
        int tone_on_time;
        int tone_off_time;
        int freq0;
        int gain0;
        int freq1;
        int gain1;
} IXJ_CADENCE_ELEMENT;

typedef enum {
        PLAY_ONCE,
        REPEAT_LAST_ELEMENT,
        REPEAT_ALL
} IXJ_CADENCE_TERM;

typedef struct {
        int elements_used;
        IXJ_CADENCE_TERM termination;
        IXJ_CADENCE_ELEMENT __user *ce;
} IXJ_CADENCE;
Comment 4 Steve Egbert 2005-01-11 19:36:33 UTC
Unable to locate the __user typedef under 2.6 kernel.  But I found posters indicating that just add the following to the afflicted source file (in this case, it was modules/audio-phone.c

#ifndef __user
#define __user
#endif

With the /var/tmp/portage/gnophone-0.2.4-r1/work/gnophone-0.2.4 in place (from the failed "emerge gnophone", I did the following to make this work.

linux # cd /var/tmp/portage/gnophone-0.2.4-r1/work/gnophone-0.2.4
linux # vi src/modules/audio-phone.c
(add the #ifndef statements above at the beginning of the source code)
linux # vi src/Makefile
(locate CFLAGS definition, around line 107)
(add "-I/usr/src/linux" and making this -I/usr/src/linux the first "-I")
linux # make install

Once done.... it builds and works.

I don't think I could have made this gnophone make work by excluding certain include files to prevent the "giant sucking sound" of linux kernel header files.
Comment 5 Mike Doty (RETIRED) gentoo-dev 2005-03-17 06:40:17 UTC
this bug hits amd64 machines as well
Comment 6 Rob Sworder 2005-04-19 01:30:36 UTC
I had similar problem fixed by suggestion from http://www.ussg.iu.edu/hypermail/linux/kernel/0503.0/2569.html


add
#include <linux/compiler.h>


to /usr/include/linux/ixjuser.h
Comment 7 Chan Min Wai 2005-04-23 04:15:27 UTC
Ok comment 5 seem to solved the problem but what is the big picture to solve it?
Comment 8 John N. Laliberte (RETIRED) gentoo-dev 2005-05-04 14:39:25 UTC
*** Bug 81042 has been marked as a duplicate of this bug. ***
Comment 9 John N. Laliberte (RETIRED) gentoo-dev 2005-05-23 07:22:55 UTC
from the looks of things, this package was last updated in 2002, should be
package masked and removed.  however, metadata says this is part of net-im,
reassigning.
Comment 10 Daniel Black (RETIRED) gentoo-dev 2006-02-04 15:42:11 UTC
fixed *finally*. Sorry for the delay. Thanks for the patches.