Custom Image Build Error
-
Re: Errors building source for cross development
Hello,
I am building a custom image following https://github.com/OnionIoT/source/tree/openwrt-18.06 and building using Docker.
To resolve the following error messages I tried the following two commands, but still facing the same error message.
./scripts/feeds update onion
./scripts/feeds update -amake: Entering directory '/root/source/build_dir/target-mipsel_24kc_musl/postfix-3.3.0/src/util'
mipsel-openwrt-linux-musl-gcc -DNO_NIS -DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/root/source/staging_dir/target-mipsel_24kc_musl/usr/include/sasl -DHAS_LDAP -DHAS_CDB -DNO_DB -DHAS_SQLITE -I/root/source/staging_dir/target-mipsel_24kc_musl/usr/include/ -DHAS_PCRE -I/root/source/staging_dir/target-mipsel_24kc_musl/usr/include/ -DNO_EAI -DDEF_DB_TYPE="cdb" -g -O -I. -DLINUX5 -c alldig.c
cc1: note: someone does not honour COPTS correctly, passed 0 times
In file included from alldig.c:29:0:
./sys_defs.h:1257:2: error: #error "unsupported platform"
#error "unsupported platform"
^~~~~
./sys_defs.h:1320:2: error: #error "define HAS_FCNTL_LOCK and/or HAS_FLOCK_LOCK"
#error "define HAS_FCNTL_LOCK and/or HAS_FLOCK_LOCK"
^~~~~
./sys_defs.h:1324:2: error: #error "define DEF_MAILBOX_LOCK"
#error "define DEF_MAILBOX_LOCK"
^~~~~
./sys_defs.h:1328:2: error: #error "define INTERNAL_LOCK"
#error "define INTERNAL_LOCK"
^~~~~
./sys_defs.h:1336:2: error: #error "define USE_STATFS or USE_STATVFS"
#error "define USE_STATFS or USE_STATVFS"
^~~~~
In file included from alldig.c:29:0:
./sys_defs.h:1347:57: error: unknown type name 'SOCKADDR_SIZE'
extern const char *inet_ntop(int, const void *, char *, SOCKADDR_SIZE);
^~~~~~~~~~~~~
Makefile:187: recipe for target 'alldig.o' failed
make: *** [alldig.o] Error 1
make: Leaving directory '/root/source/build_dir/target-mipsel_24kc_musl/postfix-3.3.0/src/util'
Makefile:92: recipe for target 'update' failed
make[4]: *** [update] Error 1
make[4]: Leaving directory '/root/source/build_dir/target-mipsel_24kc_musl/postfix-3.3.0'
Makefile:265: recipe for target '/root/source/build_dir/target-mipsel_24kc_musl/postfix-3.3.0/.built' failed
make[3]: *** [/root/source/build_dir/target-mipsel_24kc_musl/postfix-3.3.0/.built] Error 2
make[3]: Leaving directory '/root/source/feeds/packages/mail/postfix'
Command exited with non-zero status 2
time: package/feeds/packages/postfix/compile#0.18#0.05#0.22
package/Makefile:107: recipe for target 'package/feeds/packages/postfix/compile' failed
make[2]: *** [package/feeds/packages/postfix/compile] Error 2
make[2]: Leaving directory '/root/source'
package/Makefile:103: recipe for target '/root/source/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile' failed
make[1]: *** [/root/source/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/root/source'
/root/source/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2Any Suggestions?
Thank you!
-
Any information I can add that would help with debugging?
Thank you!
-
@Antony Judging from the error, it looks like the error is in compiling the postfix package.
Is this package essential to your firmware/use case? If not, you can just not compile this specific package, or perhaps use an alternative package.If it is essential, is there anyway you can install the already compiled version from the openwrt package repos on your device (instead of building it into the firmware)?
Another route to explore would be trying to debug the compilation error. Is this a package that's already included in the openwrt package feed or something that you've added?
-
Hi,
i also had the same error. Removing the postfix package over make menuconfig solved the problem. Its just marked as m so i think its not neccessary.
Anyway, firmware builds successfully but omega2-pro bin file is missing. In Menuconfig omega2-pro is activated.
I'm using the build system like described in the README at https://github.com/OnionIoT/source/tree/openwrt-18.06.
Using Ubuntu 18.06.Any ideas why omega2-pro image is not created?
-
@DocHardinger Yep, removing the postfix package in menuconfig is a good solution.
Which option are you following from this section? https://github.com/OnionIoT/source#options-for-using-the-build-system
Are you using the minimum build configuration?
-
I used a custom config created with menuconfig an there i activated only the omega2 pro for device and changed some packages. And then after building i see no bin file but compilation was successfull.
So i tried the minimal config. And then i get all bin files except the pro. Maybe i changed something i shouldnt change ;-). But i think if im using the minimal config with the python script the config should be overwritten?
Anyway whats the best way to reset the build config without setting up the whole build system again? Maybe that helps...