Skip to contentSkip to conversation

ion selftest compilation failed

DISCUSSION alexey.skidanov at intel.com (Alexey Skidanov) 1 participant 5 messages Sep 11, 2018 – Sep 12, 2018 Kselftest

lore
Share & tools
lore

alexey.skidanov at intel.com (Alexey Skidanov)

#0 lore raw

Hi,

ION selftest compilation failed with the following error on my machine:

ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory

I have resolved it by exporting kernel headers for user space:

make headers_install INSTALL_HDR_PATH=/usr

Probably it should be part of the make file?

Tthanks,
Alexey

#1 lore raw
Quoted 6 lines · Alexey Skidanov

Hi,

ION selftest compilation failed with the following error on my machine:

ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory

Quoted 9 lines

I have resolved it by exporting kernel headers for user space:

make headers_install INSTALL_HDR_PATH=/usr

Probably it should be part of the make file?

Tthanks,
Alexey

Hi Alexey,

Is this on the mainline or linux-next? Can you give me more details on how your are compiling and code base etc.

thanks,
-- Shuah

#2 lore raw
Quoted 13 lines · Shuah Khan
Quoted 12 lines · Alexey Skidanov

Hi,

ION selftest compilation failed with the following error on my machine:

ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory

I have resolved it by exporting kernel headers for user space:

make headers_install INSTALL_HDR_PATH=/usr

Probably it should be part of the make file?

Quoted 8 lines
Quoted 3 lines

Tthanks,
Alexey

Hi Alexey,

Is this on the mainline or linux-next? Can you give me more details on how your are compiling and code base etc.

I use mainline 4.19-rc2. Compilation is done by:

cd tools/testing/selftests/android/ion
make

as it's described in README file

Quoted 4 lines

thanks,
-- Shuah

Thanks,
Alexey

#3 lore raw
Quoted 25 lines · Alexey Skidanov
Quoted 13 lines · Shuah Khan
Quoted 12 lines · Alexey Skidanov

Hi,

ION selftest compilation failed with the following error on my machine:

ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory

I have resolved it by exporting kernel headers for user space:

make headers_install INSTALL_HDR_PATH=/usr

Probably it should be part of the make file?

Quoted 8 lines
Quoted 3 lines

Tthanks,
Alexey

Hi Alexey,

Is this on the mainline or linux-next? Can you give me more details on how your are compiling and code base etc.

Quoted 6 lines

I use mainline 4.19-rc2. Compilation is done by:

cd tools/testing/selftests/android/ion
make

as it's described in README file

So the test already does

INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/

which should pick up the headers from the root of the kernel directory. I don't know exactly how those get generated though.

Quoted 8 lines
Quoted 4 lines

thanks,
-- Shuah

Thanks,
Alexey

#4 lore raw
Quoted 33 lines · Laura Abbott
Quoted 32 lines · Alexey Skidanov
Quoted 18 lines · Shuah Khan
Quoted 7 lines · Alexey Skidanov

Hi,

ION selftest compilation failed with the following error on my machine:

ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory

Quoted 9 lines

I have resolved it by exporting kernel headers for user space:

make headers_install INSTALL_HDR_PATH=/usr

Probably it should be part of the make file?

Tthanks,
Alexey

Quoted 5 lines

Hi Alexey,

Is this on the mainline or linux-next? Can you give me more details on how your
are compiling and code base etc.

I use mainline 4.19-rc2. Compilation is done by:

cd tools/testing/selftests/android/ion
make

Quoted 6 lines
Quoted 1 line

as it's described  in README file

So the test already does

INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/

This path ../../../../../usr/include/ is wrong. Generally, the kernel headers for user space (IOCTL definition, etc ...) are under /usr/include/linux. There should be located dma-buf.h. kernel headers for user space are installed by make headers_install.

Quoted 13 lines

which should pick up the headers from the root of the kernel directory. I don't know exactly how those get generated though.

Quoted 8 lines
Quoted 4 lines

thanks,
-- Shuah

Thanks,
Alexey

Thanks,
Alexey