Bug 1149280 - riscv64: Experience a compiling error "sys/uio.h: No such file or directory" while cross-compiling riscv64 Linux kernel on x86_64.
riscv64: Experience a compiling error "sys/uio.h: No such file or directory" ...
Status: RESOLVED INVALID
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel
Current
Other Other
: P5 - None : Minor (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-04 06:10 UTC by Chester Lin
Modified: 2019-09-13 11:36 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chester Lin 2019-09-04 06:10:46 UTC
The error message:

net/bpfilter/main.c:3:10: fatal error: sys/uio.h: No such file or directory
    3 | #include <sys/uio.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.host:107: net/bpfilter/main.o] Error 1
make[1]: *** [scripts/Makefile.build:490: net/bpfilter] Error 2
make: *** [Makefile:1087: net] Error 2

It happened while cross-compiling the Linux kernel [ARCH=riscv] on x86_64, which was based on current stable branch (v5.2.11) and the following files under openSUSE:Factory:RISCV -->

kernel-source/patches.addon/*.patch files
kernel-source/config.tar.gz -> config/riscv/default

My cross-compiler packages are as below, and both cross-riscv64-elf-gcc and cross-riscv64-gcc can experience this issue:

S  | Name                                | Type    | Version           | Arch   | Repository             
---+-------------------------------------+---------+-------------------+--------+------------------------
i+ | cross-riscv64-binutils              | package | 2.32-6.1          | x86_64 | openSUSE-Tumbleweed-Oss
v  | cross-riscv64-binutils              | package | 2.32-6.1          | i586   | openSUSE-Tumbleweed-Oss
   | cross-riscv64-elf-gcc8              | package | 8.3.1+r271793-1.5 | x86_64 | openSUSE-Tumbleweed-Oss
   | cross-riscv64-elf-gcc8              | package | 8.3.1+r271793-1.5 | i586   | openSUSE-Tumbleweed-Oss
   | cross-riscv64-elf-gcc8-bootstrap    | package | 8.3.1+r271793-1.5 | x86_64 | openSUSE-Tumbleweed-Oss
   | cross-riscv64-elf-gcc8-bootstrap    | package | 8.3.1+r271793-1.5 | i586   | openSUSE-Tumbleweed-Oss
i+ | cross-riscv64-elf-gcc9              | package | 9.2.1+r274709-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
v  | cross-riscv64-elf-gcc9              | package | 9.2.1+r274709-1.1 | i586   | openSUSE-Tumbleweed-Oss
   | cross-riscv64-elf-gcc9-bootstrap    | package | 9.2.1+r274709-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
   | cross-riscv64-elf-gcc9-bootstrap    | package | 9.2.1+r274709-1.1 | i586   | openSUSE-Tumbleweed-Oss
   | cross-riscv64-gcc8                  | package | 8.3.1+r271793-1.5 | x86_64 | openSUSE-Tumbleweed-Oss
   | cross-riscv64-gcc8-icecream-backend | package | 8.3.1+r271793-1.5 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | cross-riscv64-gcc9                  | package | 9.2.1+r274709-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | cross-riscv64-gcc9-icecream-backend | package | 9.2.1+r274709-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | cross-riscv64-newlib-devel          | package | 3.1.0-1.2         | x86_64 | openSUSE-Tumbleweed-Oss
v  | cross-riscv64-newlib-devel          | package | 3.1.0-1.2         | i586   | openSUSE-Tumbleweed-Oss
Comment 1 Andreas Schwab 2019-09-04 13:30:22 UTC
The cross compiler only supports a freestanding environment.
Comment 2 Jiri Slaby 2019-09-13 11:36:44 UTC
(In reply to Andreas Schwab from comment #1)
> The cross compiler only supports a freestanding environment.

Right, and sys/uio.h comes from glibc.