Compiling on Windows10

Trying to compile, in Ubuntu inside Windows 10 gives me this error, can you help me to solve?

make menuconfig

/home/gevagiorgio/openwrt/include/prereq-build.mk:160: recipe for target '/home/gevagiorgio/openwrt/staging_dir/host/bin/mkhash' failed
Prerequisite check failed. Use FORCE=1 to override.
/home/gevagiorgio/openwrt/include/toplevel.mk:167: recipe for target 'staging_dir/host/.prereq-build' failed
make: * [staging_dir/host/.prereq-build] Error 1

sudo apt-get install mkhash
[sudo] password for gevagiorgio:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mkhash

Mkhash is ap rogram built by OpenWrt itself. The error must be elsewhere, please provide more log context.

Hi
How can I create log files of the "make menuconfig" command ?

Try "make preqreq V=sc" and see if you get more verbose output.

have you updated the package database of the Linux subsystem?
"sudo apt-get update"?

yesterday
git clone https://git.openwrt.org/openwrt/openwrt.git

today
sudo apt-get update
sudo apt-get upgrade

--> make menuconfig

Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... failed.
Checking 'working-gcc'... failed.
Checking 'g++'... failed.
Checking 'working-g++'... failed.
Checking 'ncurses'... failed.
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 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'gtime'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
/home/gevagiorgio/openwrt/include/prereq-build.mk:160: recipe for target '/home/gevagiorgio/openwrt/staging_dir/host/bin/mkhash' failed
Prerequisite check failed. Use FORCE=1 to override.
/home/gevagiorgio/openwrt/include/toplevel.mk:167: recipe for target 'staging_dir/host/.prereq-build' failed
make: *** [staging_dir/host/.prereq-build] Error 1

--> make preqreq V=sc

Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... failed.
Checking 'working-gcc'... failed.
Checking 'g++'... failed.
Checking 'working-g++'... failed.
Checking 'ncurses'... failed.
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 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'gtime'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
/home/gevagiorgio/openwrt/include/prereq-build.mk:160: recipe for target '/home/gevagiorgio/openwrt/staging_dir/host/bin/mkhash' failed
Prerequisite check failed. Use FORCE=1 to override.
/home/gevagiorgio/openwrt/include/toplevel.mk:167: recipe for target 'staging_dir/host/.prereq-build' failed
make[2]: *** [staging_dir/host/.prereq-build] Error 1
/home/gevagiorgio/openwrt/include/toplevel.mk:83: recipe for target 'prepare-tmpinfo' failed
make[1]: *** [prepare-tmpinfo] Error 2
/home/gevagiorgio/openwrt/include/toplevel.mk:216: recipe for target 'preqreq' failed
make: *** [preqreq] Error 2

Just a quick thought, completely uconfirmed -- since Python 3 is standard on current Ubuntu installs, and Python 2 is not only deprecated, but not installed, does mkhash require Python 2?

Looks like you have not installed gcc.
That is needed for mkhash compilation later.

(jow was naturally right, mkhash is compiled during the prereq test process, but it needs a wroknig gcc, first https://github.com/openwrt/openwrt/blob/master/include/prereq-build.mk#L159 )

EDIT:
you will need to check that you have installed the required prequisite packages, as explained in wiki:
https://wiki.openwrt.org/doc/howto/buildroot.exigence#prerequisites

I use this list in my own Ubuntu 18.04 build host (in Virtualbox):

### Prerequisites for buildroot                                           
sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev
sudo apt-get install gawk gcc-multilib flex git-core gettext libssl-dev   
                                                                          
### Prerequisite on Ubuntu 17.10 as it has python3 by default             
sudo apt-get install python

Thanks, now make menuconfig work, but not make.

gevagiorgio@PC-Ufficio:~/openwrt$ make image PROFILE=GEVA
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
time: target/linux/prereq#0.20#0.31#1.59
 make[1] image
make -r image: build failed. Please re-run make with -j1 V=s to see what's going on
/home/gevagiorgio/openwrt/include/toplevel.mk:216: recipe for target 'image' failed
make: *** [image] Error 1

make image is no valid make target for the buildroot, it is only used in the image builder. Simply run make without arguments to build a full system.

Make work

However, how do I select my personal IO map ?

I have put my config file on:
target/linux/ramips/dts/GEVA.dts

But I do not find it in the menuconfig options

I had a note, which I used to do in the past.
make image PROFILE=GEVA

Hi there,
I have got the same problem here. It was because the gcc I had been using was broken. Fixed it by updating gcc.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.