[Solved] Build error: "make: [toplevel.mk:218: world] Error 2"?

make -j24 V=s

It seems that the performance of the R9 3900X is really strong enough, but I have already gone to work, and it may take at night to continue compiling.:grin:

I'm getting more errors now.


...

openwrt/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/musl-1.1.19/src/complex/csqrt.c:89: undefined reference to `__muldf3'

openwrt/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/musl-1.1.19/src/internal/floatscan.c:421: undefined reference to `__floatsidf'

openwrt/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/musl-1.1.19/src/math/__rem_pio2.c:133: undefined reference to `__subdf3'

...

collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:164: lib/libc.so] Error 1
make[4]: Leaving directory '/home/loophole/openwrt/github/openwrt/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/musl-1.1.19'
make[3]: *** [Makefile:32: /home/loophole/openwrt/github/openwrt/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/musl-1.1.19/.built] Error 2
make[3]: Leaving directory '/home/loophole/openwrt/github/openwrt/toolchain/musl'                                                                                 time: toolchain/musl/compile#239.18#104.30#308.43
make[2]: *** [toolchain/Makefile:100: toolchain/musl/compile] Error 2
make[2]: Leaving directory '/home/loophole/openwrt/github/openwrt'
make[1]: *** [toolchain/Makefile:96: /home/loophole/openwrt/github/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/stamp/.toolchain_compile] Error 2
make[1]: Leaving directory '/home/loophole/openwrt/github/openwrt'
make: *** [/home/loophole/openwrt/github/openwrt/include/toplevel.mk:218: world] Error 2

So, i've ran some tests with arch5.1/gcc-9.2.0;

  1. master/gcc-8.3.0 ... for x64/mips24k [ok]
  2. v18.06.4/gcc-7.3.0 mips24-pistaccio [ok]
  3. v18.06.4/gcc-7.3.0 mips24-ramips_mt7620 [fail] interesting...
dodgy-workaround

-seems the wireless-regdb Makefile references src which is python2 but arch wants to use python3 ( maybe because i didn't "make distclean" after checking out v18... ) workaround by changing "python" to "python2.7" in /home/osboxes/openwrt/package/firmware/wireless-regdb/Makefile
also installed...
pacman -Sy python2
pacman -Sy python-pip
pacman -Sy python2-pytools

Note: a better fix is just to use a new src in the Makefile / find the patch that updated it to python3...

But I did not see errors similar to yours... [OK]

Narrowing down.... your issue seems related to;

  1. arch5.3/gcc?/prereq/tmux/shell/fs/path etc. etc.
  2. possibly the target makefiles require an old uboot / or similar? or some other target>src specific bug
  3. your build procedure
  4. your source state ( clean/distclean )

( in other words cutting edge OS and not so cutting edge source and/or related complications, for aging source things go much smoother using an OS/environment from the equivalent era or thereabouts )

1 Like

I removed the line "sloppiness = file_macro,locale,time_macros" from ~/.ccache/ccache.conf and make started working again.

I forgot to post this part of the log that clued me in on ccache because I had stdout and stderr going to different terminals:

ccache: error: /home/tonybryantjr/.ccache/ccache.conf:2: unknown sloppiness: "locale"
ccache: error: /home/tonybryantjr/.ccache/ccache.conf:2: unknown sloppiness: "locale"
ccache: error: /home/tonybryantjr/.ccache/ccache.conf:2: unknown sloppiness: "locale"
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:164: lib/libc.so] Error 1
make[3]: *** [Makefile:32: /home/tonybryantjr/openwrt/github/openwrt/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/musl-1.1.19/.built] Error 2
make[2]: *** [toolchain/Makefile:100: toolchain/musl/compile] Error 2
make[1]: *** [toolchain/Makefile:96: /home/tonybryantjr/openwrt/github/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/stamp/.toolchain_compile] Error 2
1 Like

The build completed this time. As a recap, I had two issues during the build that required me to edit a couple files. I'm putting those two edits below for quick access in case anyone runs into this problem in the future.

Remove line number 69 in the file:

openwrt/build_dir/host/u-boot-2018.03/include/compiler.h

typedef uint64_t __u64;

and I had to remove this line from

~/.ccache/ccache.conf

"sloppiness = file_macro,locale,time_macros"

Directory listing after make finished:

arch2 openwrt $ ls -R bin/targets/ramips/mt7620/
bin/targets/ramips/mt7620/:
config.seed
openwrt-ramips-mt7620-device-ex3700-ex3800.manifest
openwrt-ramips-mt7620-ex3700-ex3800-squashfs-factory.chk
openwrt-ramips-mt7620-ex3700-ex3800-squashfs-sysupgrade.bin
packages
sha256sums

bin/targets/ramips/mt7620/packages:
base-files_194.2-r7808-ef686b7292_mipsel_24kc.ipk
fstools_2019-03-28-ff1ded63-5_mipsel_24kc.ipk
fwtool_1_mipsel_24kc.ipk
ip6tables_1.6.2-1_mipsel_24kc.ipk
iptables_1.6.2-1_mipsel_24kc.ipk
iwinfo_2018-07-31-65b8333f-1_mipsel_24kc.ipk
kernel_4.14.131-1-08bfb2457bc0f6cefd1e86fde4ae52e3_mipsel_24kc.ipk
kmod-cfg80211_4.14.131+2017-11-01-10_mipsel_24kc.ipk
kmod-ebtables_4.14.131-1_mipsel_24kc.ipk
kmod-eeprom-93cx6_4.14.131-1_mipsel_24kc.ipk
kmod-gpio-button-hotplug_4.14.131-2_mipsel_24kc.ipk
kmod-ip6tables_4.14.131-1_mipsel_24kc.ipk
kmod-ipt-conntrack_4.14.131-1_mipsel_24kc.ipk
kmod-ipt-core_4.14.131-1_mipsel_24kc.ipk
kmod-ipt-nat_4.14.131-1_mipsel_24kc.ipk
kmod-ipt-offload_4.14.131-1_mipsel_24kc.ipk
kmod-leds-gpio_4.14.131-1_mipsel_24kc.ipk
kmod-lib-crc-ccitt_4.14.131-1_mipsel_24kc.ipk
kmod-lib-crc-itu-t_4.14.131-1_mipsel_24kc.ipk
kmod-mac80211_4.14.131+2017-11-01-10_mipsel_24kc.ipk
kmod-mt76-core_4.14.131+2019-03-23-a5f5605f-1_mipsel_24kc.ipk
kmod-mt76x02-common_4.14.131+2019-03-23-a5f5605f-1_mipsel_24kc.ipk
kmod-mt76x2_4.14.131+2019-03-23-a5f5605f-1_mipsel_24kc.ipk
kmod-mt76x2-common_4.14.131+2019-03-23-a5f5605f-1_mipsel_24kc.ipk
kmod-nf-conntrack_4.14.131-1_mipsel_24kc.ipk
kmod-nf-conntrack6_4.14.131-1_mipsel_24kc.ipk
kmod-nf-flow_4.14.131-1_mipsel_24kc.ipk
kmod-nf-ipt_4.14.131-1_mipsel_24kc.ipk
kmod-nf-ipt6_4.14.131-1_mipsel_24kc.ipk
kmod-nf-nat_4.14.131-1_mipsel_24kc.ipk
kmod-nf-reject_4.14.131-1_mipsel_24kc.ipk
kmod-nf-reject6_4.14.131-1_mipsel_24kc.ipk
kmod-ppp_4.14.131-1_mipsel_24kc.ipk
kmod-pppoe_4.14.131-1_mipsel_24kc.ipk
kmod-pppox_4.14.131-1_mipsel_24kc.ipk
kmod-rt2800-lib_4.14.131+2017-11-01-10_mipsel_24kc.ipk
kmod-rt2800-mmio_4.14.131+2017-11-01-10_mipsel_24kc.ipk
kmod-rt2800-pci_4.14.131+2017-11-01-10_mipsel_24kc.ipk
kmod-rt2800-soc_4.14.131+2017-11-01-10_mipsel_24kc.ipk
kmod-rt2x00-lib_4.14.131+2017-11-01-10_mipsel_24kc.ipk
kmod-rt2x00-mmio_4.14.131+2017-11-01-10_mipsel_24kc.ipk
kmod-rt2x00-pci_4.14.131+2017-11-01-10_mipsel_24kc.ipk
kmod-slhc_4.14.131-1_mipsel_24kc.ipk
libc_1.1.19-1_mipsel_24kc.ipk
libgcc_7.3.0-1_mipsel_24kc.ipk
libip4tc_1.6.2-1_mipsel_24kc.ipk
libip6tc_1.6.2-1_mipsel_24kc.ipk
libiwinfo_2018-07-31-65b8333f-1_mipsel_24kc.ipk
libpthread_1.1.19-1_mipsel_24kc.ipk
libxtables_1.6.2-1_mipsel_24kc.ipk
mtd_23_mipsel_24kc.ipk
Packages
Packages.gz
Packages.manifest
Packages.sig
1 Like

You are right. It seems that my network has a problem and the package cannot be downloaded. The master repository seems to have no problem, but the 18.06.4 version seems to have some compatibility problems with the compiler.:grinning:

normal compilation

not root user:

make folder
cd folder
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
scripts/feeds update -a
scripts/feeds install -a

make menuconfig
choice platform … kmod … luci ...
save ( write a .config file with your configuration)

make -j4

Help me

make[4]: Entering directory '/home/server/openwrt/build_dir/target-mips_24kc_musl/automake-1.15'
: && /bin/mkdir -p doc && { PATH='/home/server/openwrt/build_dir/target-mips_24kc_musl/automake-1.15/t/wrap:'$PATH && export PATH; } && /home/server/openwrt/staging_dir/host/bin/perl ./doc/help2man --output=doc/automake-1.15.1 automake-1.15
help2man: can't get `--help' info from automake-1.15
Try `--no-discard-stderr' if option outputs to stderr
Makefile:3687: recipe for target 'doc/automake-1.15.1' failed
make[4]: *** [doc/automake-1.15.1] Error 255
make[4]: Leaving directory '/home/server/openwrt/build_dir/target-mips_24kc_musl/automake-1.15'
Makefile:65: recipe for target '/home/server/openwrt/build_dir/target-mips_24kc_musl/automake-1.15/.built' failed
make[3]: *** [/home/server/openwrt/build_dir/target-mips_24kc_musl/automake-1.15/.built] Error 2
make[3]: Leaving directory '/home/server/openwrt/feeds/packages/devel/automake'
time: package/feeds/packages/automake/compile#0.31#0.07#0.39
package/Makefile:107: recipe for target 'package/feeds/packages/automake/compile' failed
make[2]: *** [package/feeds/packages/automake/compile] Error 2
make[2]: Leaving directory '/home/server/openwrt'
package/Makefile:103: recipe for target '/home/server/openwrt/staging_dir/target-mips_24kc_musl/stamp/.package_compile' failed
make[1]: *** [/home/server/openwrt/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/server/openwrt'
/home/server/openwrt/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

best to create a new thread "make fail 18 mipsXYZ arch" etc. etc. and link to this one...

include the exact commands / steps you have used...

your issues appear to be related to general setup / buildroot workflow ( albeit complicated by some os/target specific fixes herein )

1 Like

thank you for replying I am currently creating all IPK files using Buildrot and selecting this option in the global build settings, my question is should I not choose the buildrot option when I make all ipk files?

I think buildroot has to be enabled to build anything, but I'm not sure. I didn't touch that option in the menu so I'd leave it at it's default value unless you have a reason to change it.

Edit: I think you may have been referring to buildbot. I don't know much about that, either, but I'd suggest leaving that at it's default value as well unless you have a reason to change it.

It might be a version issue. I would do an update and upgrade with your package manager and try again.

Here's a thread about the Error 255:

Building automake in current master fails with help2man error

Someone on this thread suggests the installed version of automake may be outdated:

https://issm.ess.uci.edu/forum/d/201-autotools-help2man-can-t-get-help-info-from-automake-1-14/2

1 Like

thank you for your willingness to improve i really appreciate it. but that's not all that I got when the manufacturing process was still there else else I got the process failed

What commands are you using to start the build? You can add:

>build.log 2>&1

to the end to save the log to a text file and paste it here or in your thread. In your post please include the commands that you are typing to start the build as well and it may be easier to help you.

1 Like

I use this command

make V=s

Have you tried:

make -j1 V=s

and did you run

make download

before you started building?

Edit: by the way, you know that if you use Image Builder then you won't have to compile everything, right?

I have tried and the results are the same error

Which OS is the computer running that you are you building with?

How did you set up your build directory? With git or did you download a tarball?

Did you run this before you started building?

./scripts/feeds update -a && ./scripts/feeds install -a

1 Like

hi sorry I just replied your question. now it can handle and run successfully and no need to make all ipk files. thank you for the support and guidance

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