Error compiling OpenWrt

Hi

I have errors compiling it.

Yesterday version:
git clone https://git.openwrt.org/openwrt/openwrt.git
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig (Some change)

Target Mediatek Ralink MIPS;
Subtarghet RT5350
Targhet profile A5-V11
Base system:
Block-mount - block device mounting and checking
Blockd - Block device automounting
Bridge - ethernet bridging configuration utility (Dice Nossiac di non metterlo che c'è già nel busybox)
Kernel module ---->
Wireless Driver ---->
kmod-mt7601u
Network ---->
Web Server ---->
apache
Iperf
Iperf3
Iperf3-ssl
Ppp-mod-pppol2tp
(+ Other)
Luci ---->
Collection ---->
Luci
Application ---->
Luci-app-samb
Luci-app-samb4
Themes ---->
Material
Kernel module -->
Usb Support -->
kmod-usb2
kmod-usb-uhci
kmod-usb-ohci
kmod-usb-storage
kmod-usb-storage-extras
kmod-usb-storage-uas
kmod-usb-wdm
Utility -->
usbutils
usb-modeswitch

This error wit "make -j1 V=s"
https://pastebin.com/xE2GkC0F

This .config
https://pastebin.com/RFPNX6KJ

gevagiorgio@PC-Ufficio:~/AggBP$ make -j1 V=s
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
[...]

Try running feeds update and install again. The at least enter and exit make menuconfig to get your .config consistent.

Try make clean download world

Try a "vanilla" build to make sure that there isn't something completely borked

make distclean
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make

Same errors

make clean download world

Same errors

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
/home/gevagiorgio/AggBP/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 1

Now I try without adding anything.

If you can't successfully build a "vanilla" config, then your build chain is somehow messed up.

As a "last resort" (and one I've occasionally needed to employ), after backing up your build directory, try removing all the output and intermediate directories, such as by make distclean -- which, as a warning will also remove .config*, feeds, and packages.

I think both your config and directories are messed up. I tried building and it stops because both CONFIG_PACKAGE_ppp and CONFIG_PACKAGE_ppp-multilink are selected. I'd start from scratch in a new directory, follow https://openwrt.org/docs/guide-developer/quickstart-build-images exactly, and make a new config. Which platform are you using to build?

Ubuntu on Windows 10
Config and directories are not messed up

I have not added nothing and build is ok.

Now i try to add some feed for each make

Added some module and i have errors:

	Network ---->
		Web Server ---->
			apache
		Iperf
		Iperf3
	Luci ---->
		Collection ---->
			Luci
		Application ----> 
			Luci-app-samb
			Luci-app-samb4
		Themes ---->
			Material
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
/home/gevagiorgio/AggBP/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 1
make -j1 V=s
Collected errors:
 * check_data_file_clashes: Package samba4-server wants to install file /home/gevagiorgio/AggBP/build_dir/target-mipsel_24kc_musl/root-ramips/usr/sbin/smbd
        But that file is already provided by package  * samba36-server
 * opkg_install_cmd: Cannot install package luci-app-samba4.
 * check_data_file_clashes: Package samba4-server wants to install file /home/gevagiorgio/AggBP/build_dir/target-mipsel_24kc_musl/root-ramips/usr/sbin/smbd
        But that file is already provided by package  * samba36-server
 * opkg_install_cmd: Cannot install package samba4-server.
package/Makefile:65: recipe for target 'package/install' failed
make[2]: *** [package/install] Error 255
make[2]: Leaving directory '/home/gevagiorgio/AggBP'
package/Makefile:104: recipe for target '/home/gevagiorgio/AggBP/staging_dir/target-mipsel_24kc_musl/stamp/.package_install' failed
make[1]: *** [/home/gevagiorgio/AggBP/staging_dir/target-mipsel_24kc_musl/stamp/.package_install] Error 2
make[1]: Leaving directory '/home/gevagiorgio/AggBP'
/home/gevagiorgio/AggBP/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

"But that file is already provided by package * samba36-server"
So you have to choose which version you want.

You mean that I can only install one of these two modules?
Not both?

	Luci ---->
		Collection ---->
			Luci
		Application ----> 
			Luci-app-samb
			Luci-app-samb4

Removed "Luci-app-samb" but error is the same.

As the saying goes, here's a :fishing_pole_and_fish:

Reading error messages is a crucial skill in software development.

1 Like

New folder

Compile work
I add some function, and LUCI-samba4
But the memory of the device is not enough anymore (8Mbyte)

I remove Luci-samba4, add Luci-Samba
make clean
But compiling are not work

But i have to make new installaton each change on menucnfig ?

Collected errors:
 * check_data_file_clashes: Package samba4-server wants to install file /home/gevagiorgio/AggBP/build_dir/target-mipsel_24kc_musl/root-ramips/usr/sbin/smbd
        But that file is already provided by package  * samba36-server
 * opkg_install_cmd: Cannot install package samba4-server.

You only removed the Luci interface for samba4, not the "samba4-server" package which the Luci package depends on.

I did not add it.
Has it been added alone?
Where can I find it ?

Search for samba4-server and notice the location. Other packages you no longer need may have been added as well, so if you want to save some space it's easier to erase .config and start over.

Thank you, finally completed correctly build.

I have another problem.
I have to edit and add files, then re-pack the image.
Long and complex work.

Is it possible to do it before or during the make, to have the correct image already?

What do you mean by editing and adding files? Do you mean your routers configuration files? You can check that box on top of update button in your luci web interface which will save configuration, or you can include your configuration as defaults in your image. Read this https://wiki.openwrt.org/doc/howto/build#custom_files

1 Like

New URLs:
https://openwrt.org/docs/guide-developer/build-system/use-buildsystem#custom_files
https://openwrt.org/docs/guide-user/additional-software/imagebuilder#files_variable

The old page is for archival purposes only and does not receive updates any more.

Image do not start:
Error is:

[    1.379970] jffs2: Flash size not aligned to erasesize, reducing to 2520KiB
[    1.395260] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at                                                              0x00000000: 0x7368 instead
[    1.414308] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at                                                              0x00000004: 0x0632 instead
[    1.433263] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at                                                              0x00000008: 0x4f5b instead
[    1.452216] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at                                                              0x00000010: 0x000e instead
[    1.471168] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at                                                              0x00000014: 0x0004 instead

The change i have made to the files, for increase 4MB to 8MB are: (This compilation in July worked)
/target/linux/ramips/image/rt305x.mk

define Device/a5-v11
  DTS := A5-V11
  IMAGE_SIZE := $(ralink_default_fw_size_8M)
  IMAGES += factory.bin
  IMAGE/factory.bin := \
	$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B A5-V11 -F 8M
  DEVICE_TITLE := A5-V11
  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
endef
TARGET_DEVICES += a5-v11

tools/firmware-utils/src/mkporayfw.c

static struct board_info boards[] = {
	{
		.id             = "A5-V11",
		.hw_id          = HWID_A5_V11,
		.layout_id      = "8M",
		.key            = KEY_A5_V11,
        }, {

What is that error ?
I do not know what to do.