Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#21968 closed defect (fixed)

prereq-build.mk (git-core) check broken

Reported by: andieq@… Owned by: developers
Priority: normal Milestone:
Component: toolchain Version: Trunk
Keywords: Cc:

Description

make menuconfig results in:

Build dependency: Please install Git (git-core) >= 1.7.12.2

/home/andy/openwrt/include/prereq.mk:12: recipe for target 'prereq' failed
Prerequisite check failed. Use FORCE=1 to override.
/home/andy/openwrt/include/toplevel.mk:152: recipe for target 'staging_dir/host/.prereq-build' failed
make[1]: *** [staging_dir/host/.prereq-build] Error 1
/home/andy/openwrt/include/toplevel.mk:81: recipe for target 'prepare-tmpinfo' failed
make: *** [prepare-tmpinfo] Error 2
Cannot open './tmp/.packageinfo': No such file or directory
Can't open file './tmp/.targetinfo': No such file or directory

Im on Arch/Manjaro and have git-2.7.2-1 installed.

Attachments (0)

Change History (23)

comment:1 Changed 2 years ago by anonymous

oki thats because i used the github "download zip" option, which is missing the .git folder, so the new git-core check fails.

I mainly use the zip option because its generally faster to download for me and i have a archive i can compare changes against locally via a filemanager.

So is the new check really checking if the .git folder exists or just want to make sure the git package is a current one?

comment:2 Changed 2 years ago by bittorf@…

IMHO the problem is another thing - please show the output of

git submodule update --help

comment:3 Changed 2 years ago by andieq@…

What you mean "another thing"?

This configure error only happens if the .git folder is missing, which happens if you download the source either via the "snapshot" option on the official git repo or use the "download zip" option on the github mirror.

You now need to-do a "git init" to fix this.

This was not needed before, so i simply wonder if the new check really wants to ensure a correctly init git repo or just looks for a current git version? I don't see new dependency's that would prevent configuring and compiling openWRT from a raw snapshot/zip without a explicit "git init"?

git submodule update --help
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

thx
Andy

comment:4 Changed 2 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

fixed in r48926

comment:5 Changed 2 years ago by seph

I have same problem with latest trunk

Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'libssl'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'md5sum'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'svn'... ok.
Checking 'git'... failed.
Checking 'file'... ok.
Checking 'openssl'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: Please install Git (git-core) >= 1.7.12.2

Prerequisite check failed. Use FORCE=1 to override.
make[1]: *** [staging_dir/host/.prereq-build] Error 1
make: *** [prepare-tmpinfo] Error 2
Cannot open './tmp/.packageinfo': No such file or directory
Can't open file './tmp/.targetinfo': No such file or directory
Installing package 'ethtool' from packages
WARNING: No feed for package 'libc' found, maybe it's already part of the standard packages?
WARNING: No feed for package 'libssp' found, maybe it's already part of the standard packages?
WARNING: No feed for package 'librt' found, maybe it's already part of the standard packages?
WARNING: No feed for package 'libpthread' found, maybe it's already part of the standard packages?

comment:6 Changed 2 years ago by nbd

Please try running this command and show me the output:

git submodule --help 2>&1 | grep -- --recursive

comment:7 Changed 2 years ago by seph

  • Resolution fixed deleted
  • Status changed from closed to reopened

I get this error all the time and I have done a git clone.

It doesn't work at all for me.

comment:8 Changed 2 years ago by seph

@nbd The output of that command in the fresh checkout of openwrt is empty. The exit code of that is 1.

comment:9 Changed 2 years ago by nbd

what git version are you using? is it older than 1.7.12.2?

comment:10 Changed 2 years ago by risa2000

I have the problem with this check as well (I am on gentoo).
git submodules --help defaults to man page and I have MANPAGER=/usr/bin/vimmanpager. So the pipe does not receives anything and the command never finishes.

I tried to fix it by using info instead of man, but then I am not sure the output from grep is what the developers expect:

risa@gentoo-vb ~/openwrt/openwrt2 $ git submodule --help -i 2>&1 | grep -- --recursive
     If ‘--recursive’ is specified, this command will recurse into
     If ‘--recursive’ is specified, this command will recurse into the
     evaluating the command.  If ‘--recursive’ is given, submodules are

comment:11 Changed 2 years ago by nbd

Does this patch help with your MANPAGER issue?
http://nbd.name/prereq-test.patch

comment:12 Changed 2 years ago by risa2000

@nbd Yes, this fixes git check problem. Thanks!

comment:13 Changed 2 years ago by anonymous

@nbd I didn't have man installed. Installing man fixed the bug. Maybe we need to check if man is installed?

comment:14 Changed 2 years ago by ikebanat

same problem with /48931

ikebanat@ikebanat-VirtualBox:~/openwrt$ make menuconfig
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'libssl'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'md5sum'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'svn'... ok.
Checking 'git'... failed.
Checking 'file'... ok.
Checking 'openssl'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: Please install Git (git-core) >= 1.7.12.2

Prerequisite check failed. Use FORCE=1 to override.
make: * [staging_dir/host/.prereq-build] Errore 1

comment:15 Changed 2 years ago by risa2000

@nbd It seems that the patch fixes the prereq check in the build, but does not work in ImageBuilder. When I run build in ImageBuilder I am getting:

rm: missing operand
Try 'rm --help' for more information.
rm -rf /home/risa/openwrt/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64/tmp /home/risa/openwrt/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64/dl /home/risa/openwrt/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64/build_dir/target-mips_34kc_musl-1.1.14/root-ar71xx /home/risa/openwrt/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64/bin/ar71xx
make[1]: Entering directory '/home/risa/openwrt/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64'
mkdir -p tmp
rm -f tmp/.host.mk
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'libssl'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'md5sum'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'svn'... ok.
Checking 'git'... failed.
Checking 'file'... ok.
Checking 'openssl'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: Please install Git (git-core) >= 1.7.12.2

/home/risa/openwrt/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64/include/prereq.mk:12: recipe for target 'prereq' failed
Prerequisite check failed. Use FORCE=1 to override.
Makefile:91: recipe for target 'staging_dir/host/.prereq-build' failed
make[1]: *** [staging_dir/host/.prereq-build] Error 1
make[1]: Leaving directory '/home/risa/openwrt/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64'
Makefile:195: recipe for target 'image' failed
make: *** [image] Error 2

Removing MANPAGER=cat from the check fixes it in ImageBuilder.

comment:16 Changed 2 years ago by anonymous

r48931 fails the prereq check on Debian 8 (Jessie) with this error, also reported in duplicate issue #21978 to fail on Ubuntu 15.10. This is not limited to ImageBuilder, it failed for me by cloning the repo, updating feeds and doing make prereq.

$ git submodule --help 2>&1 | grep -- --recursive
git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
                     [--depth <depth>] [--recursive] [--] [<path>...]
       git submodule [--quiet] foreach [--recursive] <command>
       git submodule [--quiet] sync [--recursive] [--] [<path>...]
           If --recursive is specified, this command will recurse into nested submodules, and show their status as well.
           If --recursive is specified, this command will recurse into the registered submodules, and update any nested submodules within.
           prints the name of each submodule before evaluating the command. If --recursive is given, submodules are traversed recursively (i.e. the given shell command is evaluated in nested
       --recursive

Running MANPAGER=cat git submodule --help 2>&1 | grep -q -- --recursive in a shell is successful (returns 0). As suggested by risa2000, remvoing MANPAGER=cat (reverting r48927) solves the problem.

comment:18 Changed 2 years ago by dibdot

the patch did not work for me ... 'make menuconfig' hangs ...

'ps ax'

18413 pts/1    S+     0:00 make menuconfig
18728 pts/1    S+     0:00 make -r -s staging_dir/host/.prereq-build OPENWRT_BUI
18731 pts/1    S+     0:00 bash /home/dirk/Downloads/openwrt/dd/bcm2709/openwrt/
18732 pts/1    S+     0:00 bash /home/dirk/Downloads/openwrt/dd/bcm2709/openwrt/
18733 pts/1    S+     0:00 git log
18734 pts/1    S+     0:00 grep -m 1 git-svn-id
18735 pts/1    S+     0:00 awk { gsub(/.*@/, "", $0); print $1 }

comment:20 Changed 2 years ago by dibdot

v3 works fine, at least for me. Thank you!

comment:21 Changed 2 years ago by nbd

  • Resolution set to fixed
  • Status changed from reopened to closed

fixed in r48934

comment:22 Changed 2 years ago by anonymous

Just manually applied this change in my local repo and it worked! Thanks.

comment:23 Changed 2 years ago by risa2000

@nbd Just to confirm it is now OK in both: regular build and ImageBuilder as well. Thanks.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.