linux-kernel-module-cheat icon indicating copy to clipboard operation
linux-kernel-module-cheat copied to clipboard

Build fails with: "fatal error: ui/input-keymap-linux-to-qcode.c: No such file or directory"

Open kamomil opened this issue 7 years ago • 12 comments

Hi, I have ubuntu 16.04 I run ./configure and then ./build few seconds after the ./build I get:

ui/input-keymap.c:8:44: fatal error: ui/input-keymap-linux-to-qcode.c: No such file or directory

kamomil avatar Apr 19 '18 05:04 kamomil

Hi Dafna,

It looks like QEMU did not properly clone all its submodules (ui/keycodemapdb).

Try:

git submodule update --init --recursive

I would also be interested to know if there are earlier error messages on ./configure to understand why the clone failed.

cirosantilli avatar Apr 19 '18 05:04 cirosantilli

Also possibly fixed by: https://github.com/cirosantilli/linux-kernel-module-cheat/commit/3fdabbda61a8f0a5d97df13f204008a84cc3e6a2

cirosantilli avatar Apr 19 '18 06:04 cirosantilli

Hi, I ran as you suggested and got:

dafna@guri:~/outreachy/linux-kernel-module-cheat$ git submodule update --init --recursive
Submodule 'gem5/gem5' (https://gem5.googlesource.com/public/gem5) registered for path 'gem5/gem5'
Submodule 'parsec-benchmark/parsec-benchmark' (https://github.com/cirosantilli/parsec-benchmark) registered for path 'parsec-benchmark/parsec-benchmark'
Cloning into 'gem5/gem5'...
remote: Sending approximately 159.38 MiB ...
remote: Counting objects: 52, done
remote: Finding sources: 100% (52/52)
remote: Total 177334 (delta 139261), reused 177321 (delta 139261)
Receiving objects: 100% (177334/177334), 159.25 MiB | 1.30 MiB/s, done.
Resolving deltas: 100% (139261/139261), done.
Checking connectivity... done.
Submodule path 'gem5/gem5': checked out '68af229490fc811aebddf68b3e2e09e63a5fa475'
Cloning into 'parsec-benchmark/parsec-benchmark'...
remote: Counting objects: 19805, done.
remote: Compressing objects: 100% (267/267), done.
remote: Total 19805 (delta 144), reused 253 (delta 102), pack-reused 19429
Receiving objects: 100% (19805/19805), 42.91 MiB | 1.02 MiB/s, done.
Resolving deltas: 100% (5012/5012), done.
Checking connectivity... done.
fatal: reference is not a tree: 580f134dc6d753531bf676b07c574d6b28b70e1d
Submodule 'capstone' (git://git.qemu.org/capstone.git) registered for path 'capstone'
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Submodule 'roms/QemuMacDrivers' (git://git.qemu.org/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers'
Submodule 'roms/SLOF' (git://git.qemu-project.org/SLOF.git) registered for path 'roms/SLOF'
Submodule 'roms/ipxe' (git://git.qemu-project.org/ipxe.git) registered for path 'roms/ipxe'
Submodule 'roms/openbios' (git://git.qemu-project.org/openbios.git) registered for path 'roms/openbios'
Submodule 'roms/openhackware' (git://git.qemu-project.org/openhackware.git) registered for path 'roms/openhackware'
Submodule 'roms/qemu-palcode' (git://github.com/rth7680/qemu-palcode.git) registered for path 'roms/qemu-palcode'
Submodule 'roms/seabios' (git://git.qemu-project.org/seabios.git/) registered for path 'roms/seabios'
Submodule 'roms/sgabios' (git://git.qemu-project.org/sgabios.git) registered for path 'roms/sgabios'
Submodule 'roms/skiboot' (git://git.qemu.org/skiboot.git) registered for path 'roms/skiboot'
Submodule 'roms/u-boot' (git://git.qemu-project.org/u-boot.git) registered for path 'roms/u-boot'
Submodule 'roms/vgabios' (git://git.qemu-project.org/vgabios.git/) registered for path 'roms/vgabios'
Submodule 'ui/keycodemapdb' (git://git.qemu.org/keycodemapdb.git) registered for path 'ui/keycodemapdb'
Cloning into 'capstone'...
remote: Counting objects: 22832, done.
remote: Compressing objects: 100% (6683/6683), done.
remote: Total 22832 (delta 16520), reused 21860 (delta 15769)
Receiving objects: 100% (22832/22832), 32.70 MiB | 1.05 MiB/s, done.
Resolving deltas: 100% (16520/16520), done.
Checking connectivity... done.
Submodule path 'qemu/capstone': checked out '22ead3e0bfdb87516656453336160e0a37b066bf'
Cloning into 'dtc'...
remote: Counting objects: 4271, done.
remote: Compressing objects: 100% (1658/1658), done.
remote: Total 4271 (delta 3151), reused 3450 (delta 2571)
Receiving objects: 100% (4271/4271), 965.94 KiB | 623.00 KiB/s, done.
Resolving deltas: 100% (3151/3151), done.
Checking connectivity... done.
Submodule path 'qemu/dtc': checked out '558cd81bdd432769b59bff01240c44f82cfb1a9d'
Cloning into 'roms/QemuMacDrivers'...
remote: Counting objects: 60, done.
remote: Compressing objects: 100% (59/59), done.
remote: Total 60 (delta 24), reused 0 (delta 0)
Receiving objects: 100% (60/60), 66.37 KiB | 0 bytes/s, done.
Resolving deltas: 100% (24/24), done.
Checking connectivity... done.
Submodule path 'qemu/roms/QemuMacDrivers': checked out 'd4e7d7ac663fcb55f1b93575445fcbca372f17a7'
Cloning into 'roms/SLOF'...
remote: Counting objects: 6706, done.
remote: Compressing objects: 100% (1966/1966), done.
remote: Total 6706 (delta 5144), reused 6089 (delta 4679)
Receiving objects: 100% (6706/6706), 2.03 MiB | 575.00 KiB/s, done.
Resolving deltas: 100% (5144/5144), done.
Checking connectivity... done.
Submodule path 'qemu/roms/SLOF': checked out '89f519f09bf850918b60526e50409afb663418aa'
Cloning into 'roms/ipxe'...
remote: Counting objects: 52466, done.
remote: Compressing objects: 100% (12920/12920), done.
remote: Total 52466 (delta 39831), reused 49815 (delta 37841)
Receiving objects: 100% (52466/52466), 12.69 MiB | 1.19 MiB/s, done.
Resolving deltas: 100% (39831/39831), done.
Checking connectivity... done.
Submodule path 'qemu/roms/ipxe': checked out '0600d3ae94f93efd10fc6b3c7420a9557a3a1670'
Cloning into 'roms/openbios'...
remote: Counting objects: 14176, done.
remote: Compressing objects: 100% (4063/4063), done.
remote: Total 14176 (delta 10461), reused 13649 (delta 10075)
Receiving objects: 100% (14176/14176), 2.80 MiB | 839.00 KiB/s, done.
Resolving deltas: 100% (10461/10461), done.
Checking connectivity... done.
Submodule path 'qemu/roms/openbios': checked out '83818bdb4460170621d789429ad5a75e8c73efd1'
Cloning into 'roms/openhackware'...
remote: Counting objects: 143, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 143 (delta 68), reused 143 (delta 68)
Receiving objects: 100% (143/143), 184.81 KiB | 338.00 KiB/s, done.
Resolving deltas: 100% (68/68), done.
Checking connectivity... done.
Submodule path 'qemu/roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5'
Cloning into 'roms/qemu-palcode'...
remote: Counting objects: 279, done.
remote: Total 279 (delta 0), reused 0 (delta 0), pack-reused 279
Receiving objects: 100% (279/279), 143.11 KiB | 149.00 KiB/s, done.
Resolving deltas: 100% (171/171), done.
Checking connectivity... done.
Submodule path 'qemu/roms/qemu-palcode': checked out 'f3c7e44c70254975df2a00af39701eafbac4d471'
Cloning into 'roms/seabios'...
remote: Counting objects: 15250, done.
remote: Compressing objects: 100% (3491/3491), done.
remote: Total 15250 (delta 12299), reused 14511 (delta 11751)
Receiving objects: 100% (15250/15250), 3.23 MiB | 861.00 KiB/s, done.
Resolving deltas: 100% (12299/12299), done.
Checking connectivity... done.
Submodule path 'qemu/roms/seabios': checked out '63451fca13c75870e1703eb3e20584d91179aebc'
Cloning into 'roms/sgabios'...
remote: Counting objects: 27, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 27 (delta 10), reused 0 (delta 0)
Receiving objects: 100% (27/27), 44.88 KiB | 0 bytes/s, done.
Resolving deltas: 100% (10/10), done.
Checking connectivity... done.
Submodule path 'qemu/roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a'
Cloning into 'roms/skiboot'...
remote: Counting objects: 25604, done.
remote: Compressing objects: 100% (10534/10534), done.
remote: Total 25604 (delta 19767), reused 19444 (delta 15003)
Receiving objects: 100% (25604/25604), 12.30 MiB | 936.00 KiB/s, done.
Resolving deltas: 100% (19767/19767), done.
Checking connectivity... done.
Submodule path 'qemu/roms/skiboot': checked out '762d0082f18e4fb921a2d44a1051b02d8b0f6381'
Cloning into 'roms/u-boot'...
remote: Counting objects: 539191, done.
remote: Compressing objects: 100% (88544/88544), done.
remote: Total 539191 (delta 445135), reused 536823 (delta 442851)
Receiving objects: 100% (539191/539191), 107.93 MiB | 1.15 MiB/s, done.
Resolving deltas: 100% (445135/445135), done.
Checking connectivity... done.
Submodule path 'qemu/roms/u-boot': checked out 'd85ca029f257b53a96da6c2fb421e78a003a9943'
Cloning into 'roms/vgabios'...
remote: Counting objects: 1281, done.
remote: Compressing objects: 100% (381/381), done.
remote: Total 1281 (delta 898), reused 1281 (delta 898)
Receiving objects: 100% (1281/1281), 761.91 KiB | 607.00 KiB/s, done.
Resolving deltas: 100% (898/898), done.
Checking connectivity... done.
Submodule path 'qemu/roms/vgabios': checked out '19ea12c230ded95928ecaef0db47a82231c2e485'
Cloning into 'ui/keycodemapdb'...
remote: Counting objects: 294, done.
remote: Compressing objects: 100% (120/120), done.
remote: Total 294 (delta 145), reused 253 (delta 128)
Receiving objects: 100% (294/294), 92.40 KiB | 0 bytes/s, done.
Resolving deltas: 100% (145/145), done.
Checking connectivity... done.
Submodule path 'qemu/ui/keycodemapdb': checked out '10739aa26051a5d49d88132604539d3ed085e72e'
Unable to checkout '580f134dc6d753531bf676b07c574d6b28b70e1d' in submodule path 'parsec-benchmark/parsec-benchmark'

now when running ./build I get

ui/input-keymap.c:8:44: fatal error: ui/input-keymap-linux-to-qcode.c: No such file or directory

I get some messages at the buggining of the ./build instruction:

dafna@guri:~/outreachy/linux-kernel-module-cheat$ ./build
patching file package/qemu/qemu.mk
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored
patching file package/flex/0001-flex-disable-documentation.patch
Reversed (or previously applied) patch detected!  Skipping patch.
3 out of 3 hunks ignored
The next patch would create the file package/flex/0002-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch,
which already exists!  Skipping patch.
1 out of 1 hunk ignored
patching file package/flex/flex.mk
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED

kamomil avatar Apr 19 '18 06:04 kamomil

The line:

Unable to checkout '580f134dc6d753531bf676b07c574d6b28b70e1d' in submodule path 'parsec-benchmark/parsec-benchmark'

indicates that you are on an old commit, the parsec submodule is not at that commit anymore.

Please pull this repo to master at e037ddcef5532f7b684f6bed2809bc2be3aa1bbf and try again.

cirosantilli avatar Apr 19 '18 07:04 cirosantilli

hi, the command git submodule update --depth 1 $gitjobs --init -- $submodules in the configure file is wrong. I get a 'usage' message for it.

kamomil avatar Apr 19 '18 08:04 kamomil

seems like my git version (2.7.4) does not support the --jobs argument

kamomil avatar Apr 19 '18 08:04 kamomil

The intention was that this should not be a problem in theory: errors there should jump to: https://github.com/cirosantilli/linux-kernel-module-cheat/blob/2852fe1989a6f1ab546e9a4fa88724423b3949f5/configure#L113

But maybe there is an error with the fallback mechanism.

cirosantilli avatar Apr 19 '18 09:04 cirosantilli

ok, now the git command returns with no errors and yet the ./build return with

ui/input-keymap.c:8:44: fatal error: ui/input-keymap-linux-to-qcode.c: No such file or directory

kamomil avatar Apr 19 '18 11:04 kamomil

Are there any files under:

ls qemu/ui/keycodemapdb

?

cirosantilli avatar Apr 19 '18 12:04 cirosantilli

dafna@guri:~/outreachy/linux-kernel-module-cheat/qemu$ ls ui/keycodemapdb/
data  LICENSE.BSD  LICENSE.GPL2  README  tests  thirdparty  tools
dafna@guri:~/outreachy/linux-kernel-module-cheat/qemu$ cd ui/keycodemapdb/
dafna@guri:~/outreachy/linux-kernel-module-cheat/qemu/ui/keycodemapdb$ git status
HEAD detached at 10739aa
nothing to commit, working directory clean

kamomil avatar Apr 19 '18 13:04 kamomil

OK, now I am out of ideas, besides recommending that you nuke everything and restart a clean build :-)

It could be that buildroot is not syncing QEMU source again (I think it doesn't).

You can double check this with:

ls out/x86_64/buildroot/build/host-qemu-custom/ui/keycodemapdb/

If that fails, try the Docker setup: https://github.com/cirosantilli/linux-kernel-module-cheat/tree/2852fe1989a6f1ab546e9a4fa88724423b3949f5#docker

cirosantilli avatar Apr 19 '18 14:04 cirosantilli

CC      ui/input-keymap.o
/root/qemu-hangover-0.6.5/ui/input-keymap.c:7:10: fatal error: ui/input-keymap-atset1-to-qcode.c: No such file or directory
    7 | #include "ui/input-keymap-atset1-to-qcode.c"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~

seisdr avatar Aug 08 '21 02:08 seisdr