1

I downloaded the luci trunk from git https://github.com/openwrt/luci.git and got the following error when i compile it on centOS.

I already have iw package intalled but still got the error.

   Package iw-3.10-4.el7.x86_64 already installed and latest version

How can i fix this issue?

make[1]: Entering directory `/home/mullex/Dev/Projects/openwrt-luci/modules/admin-full'
rm -f src/*.o src/luci-bwc
gcc  -O2 --std=gnu99 -Wall -pedantic    -fPIC -c -o src/luci-bwc.o src/luci-bwc.c
src/luci-bwc.c:35:20: fatal error: iwinfo.h: No such file or directory
#include <iwinfo.h>
                ^
compilation terminated.
make[1]: *** [src/luci-bwc.o] Error 1
make[1]: Leaving directory `/home/mullex/Dev/Projects/openwrt-luci/modules/admin-full'
*** Compilation of modules/admin-full failed!
make: *** [gccbuild] Error 1
vaj oja
  • 1,151
  • 2
  • 16
  • 47

1 Answers1

3

I experienced this same problem this morning, when running the LuCI Makefile on Ubuntu, in order to get LuCI up and running on my PC for development purposes without the need to be connected to a router. I solved it in the following way:

At this web page...

http://luci.subsignal.org/trac/changeset/10377

... there is a description of lines that were added to two files to implement features requiring the iwinfo.h include file. I had already installed iw (by using the command "sudo apt-get install iw") but it seemed that this did not include iwinfo.h, which I understand is a file that you can only install on OpenWRT. Therefore, to solve the issue, I manually reverted the two files back to their original state by deleting the green lines and adding in the red lines. By green lines and red lines I mean those highlighted in the Diff output of the files given at the above web page. Hence, I ended up with two revised (rolled-back) versions of the following two files:

contrib/package/luci/Makefile and modules/admin-full/src/luci-bwc.c

I then ran the top-level LuCI Makefile again, using the following command while in the top-level directory:

sudo make runuhttpd

The Makefile completed without errors, and its final step was to start the web server at localhost:8080/luci/

At this point in the terminal window, the process waits (i.e. does not return to command prompt) because it is running the web server. In my web browser, at localhost:8080/luci/, I now successfully see the default index page. If I enter CTRL-C in the terminal window, to kill the process, the web server stops and the default index page is no longer viewable in the web browser.

To run the web server again, in the terminal I enter the last command that was executed by the Makefile, which is:

[my-top-level-LUCI-installation-directory]/host/usr/sbin/uhttpd -p 8080 -h [my-top-level-LUCI-installation-directory]/host/www -f

Hope this helps.

QYH
  • 46
  • 3
  • many thanks,i resolved the issue which bothered me for weeks! – vaj oja Nov 04 '14 at 03:11
  • 1
    If you're using the git repo, the change that you'll need to revert was on commit 89678917. You can run these commands to revert those changes: `git checkout 89678917~1 contrib/package/luci/Makefile` `git checkout 89678917~1 modules/admin-full/src/luci-bwc.c` – awelkie Dec 16 '14 at 18:14