Article [#6088] Build fails due to __user in input.h(2010)

[#6088] Build fails due to __user in input.h

Submitted By: Jay Ku

Open Date

2010-07-01 14:15:11     Close Date

2010-07-01 16:14:44

Priority:

Medium     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

snaps     Release:

svn-9707

Category:

N/A     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Rejected

Uboot version or rev.:

    Toolchain version or rev.:

svn-4690

App binary format:

N/A     

Summary: Build fails due to __user in input.h

Details:

My build fails on this line in uclinux-dist/linux-2.6.x/include/linux/input.h:

struct ff_periodic_effect {

    __u16 waveform;

    __u16 period;

    __s16 magnitude;

    __s16 offset;

    __u16 phase;

    struct ff_envelope envelope;

    __u32 custom_len;

//  __s16 __user *custom_data;   <-- causes build to fail (this is line 944)

    __s16 *custom_data;

};

Failure is here:

make[4]: Entering directory `/home/jayk/blackfin_tools/latest/uclinux-dist/user/blkfin-test/event_test'

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf537-0.2 -Wall -DEMBED -D__uClinux__ -I/home/jayk/blackfin_tools/latest/uclinux-dist  -mcpu=bf537-0.2  -Wl,-elf2flt    -mcpu=bf537-0.2  event_test.c   -o event_test

In file included from event_test.c:34:

/home/jayk/blackfin_tools/latest/toolchain/bfin-uclinux/bfin-uclinux/runtime/usr/include/linux/input.h:944: error: expected â:â, â,â, â;â, â}â or â__attribute__â before â*â token

If I take out the '__user' (as shown), it completes the build.

- Jay

Follow-ups

--- Mike Frysinger                                           2010-07-01 14:24:50

do not include linux headers directly from the source tree

--- Jay  Ku                                                  2010-07-01 15:24:21

What do you mean?  I got everything out of SVN and tried to build... what did I

do wrong?

--- Mike Frysinger                                           2010-07-01 15:42:33

no kernel header installed by the toolchain build script includes __user in it.

line 944 of the installed header is *not* "custom_data".  that means

you have an incorrect unsanitized header and your toolchain is broken.

--- Jay  Ku                                                  2010-07-01 15:55:02

I see.  Initially I tried svn-9707 of uclinux with 2009R1-10 tools, which didn't

work.  When troubleshooting this I messed with input.h in svn-9707.  Eventually

I figured out I had to build with a more recent toolchain, so I re-built that

from source but I'd already messed with the latest input.h.  I removed my

changes from input.h and copied it into the toolchain include directories

without rerunning the toolchainbuild script - I didn't realize the headers get

modified as part of the build script.  Got it now.

--- Mike Frysinger                                           2010-07-01 16:11:50

ok, glad you sorted that out.  fyi, we really only support the latest versions

of a branch/trunk and not any specific revision.

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

File Name     File Type     File Size     Posted By

No Files Were Found

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.