Problem during my image build


I just enter ''make'' in terminal and I got that error, what can I do, it is my first try.. thanks

make[2]: Entering directory '/home/james/openwrt/git/openwrt/scripts/config'
cc -O2   -c -o conf.o conf.c
cc   conf.o confdata.o expr.o lexer.lex.o preprocess.o symbol.o util.o   -o conf
make[2]: Leaving directory '/home/james/openwrt/git/openwrt/scripts/config'
time: target/linux/prereq#0.36#0.16#0.48
 make[1] world
 make[2] tools/compile
 make[3] -C tools/flock compile
 make[3] -C tools/xz compile
 make[3] -C tools/sed compile
 make[3] -C tools/patch compile
 make[3] -C tools/tar compile
    ERROR: tools/tar failed to build.
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/home/james/openwrt/git/openwrt/include/ world] Error 1

I dont want to touch anything after that error, Im waiting :wink:

Did you do this? It can often reveal a lot more info about what might be wrong.

1 Like

tar usually errors out if you're running your build as root, don't do that EVER.


nope, I do ? make with whcich option?

yes I was as ''root'
Do i have to restart?

this is the command.

Yes, you've messed up the access permissions in your git clone, delete and start over from scratch - you don't need root for compiling (nor cloning the git tree) OpenWrt at all.


ok I try that

just deleting all my files in my folders or I need to do some things via terminal?
im on debian linux (new in linux, new as firmware builder ) but I love it

The newly created openwrt directory (which you got by running git clone and everything below it needs to be deleted.

1 Like

btw, a question, I checked some tutos here and there and pretty often, I see that as command:

apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc file

 apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk flex quilt

we need that? , I did not see it in open wrt docs?

Appears so.

1 Like

Those are general build dependencies, expected to be present on the host (to be installed once). The former example appear to be more up to date than the lower (git-core has been renamed to just git quite a while ago, although ccache would be optional at best).

1 Like

I'm building from Debian, I have one laptop on debian and the other one on linux mint.
What would be your choice on the link gave from @anomeome ? Or I can take the one I wrote ?

Any semi-contemporary general purpose distribution should work; the project's official buildbots are running Debian, but that is not mandatory (pick the faster system, which has at least 15 GB free space).


And what about those commands and do we need to use it and when on the process?

make clean

make dirclean

make distclean

Different escalation steps of cleaning up (removing) binary build artifacts after a build (respectively after pulling in larger code changes in the future).


Ok so I don't really need to do that.
But if not, just before " make" ?

Doing "make clean" makes sense before a build. I always do that.
It only cleans the build artefacts, but does not touch the toolchain.

In practice "make dirclean" is only needed when there are complex changes in the toolchain/ or tools/
Or you want to re-build the toolchain.

And I never use make distclean. It would just delete also the download source tar.xz packages, which makes no sense to me.


Also, i just saw about linksys wrt3200 that there are 2 versions, rango wrt 3200 and the other wrt3200.
So I'm uploading my building image right now and i chose in "" make menu config" wrt3200 and rango was also in the list...
Do I need to restart again all my build?