[ZBX-14751] Cross-compiling not working on OpenWRT/EntWare Created: 2018 Aug 22  Updated: 2024 Apr 10  Resolved: 2018 Aug 26

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Proxy (P), Server (S)
Affects Version/s: 4.0.0alpha7, 4.0.0alpha8, 4.0.0alpha9
Fix Version/s: 4.0.0beta1, 4.0 (plan)

Type: Incident report Priority: Trivial
Reporter: Edgar Akhmetshin Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 0
Labels: openwrt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File libpthread_menuconfig.png     PNG File menuconfig_setting.png    
Issue Links:
Causes
caused by ZBXNEXT-4577 Convert configuration cache mutexes t... Closed
Team: Team A
Sprint: Sprint 41
Story Points: 0.5

 Description   

Steps to reproduce:
Prepare buildroot for OpenWRT/EntWare (Ubuntu 16.04/18.04):

sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev
git clone https://github.com/Entware/Entware
cd Entware
echo "src-git keendev3x https://github.com/The-BB/keendev-3x.git" >> ./feeds.conf
cp configs/mipsel-3.4.config .config
make package/symlinks
make menuconfig
### enable libpthread
make tools/install
make toolchain/install
make target/compile
### adjust ./feeds/packages/admin/zabbix/Makefile to 4.0.0alpha9 with DEPENDS += $(ICONV_DEPENDS) $(INTL_DEPENDS) +libcurl +libnetsnmp +libevent2 +unixodbc +zlib +libpthread +libpcre +libopenssl
### remove uclibc/old-libc patch set 002/500* from the ./feeds/packages/admin/zabbix/patches/
make package/zabbix/compile

Result:

configure:4669: checking pthread.h usability
configure:4669: mipsel-openwrt-linux-gnu-gcc -c -O2 -pipe -mno-branch-likely -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float  -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libiconv-full/include -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libintl-full/include  -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/include -I/home/dante/entware/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-7.3.0_glibc-2.27/include -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libiconv-full/include -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libintl-full/include  conftest.c >&5
configure:4669: $? = 0
configure:4669: result: yes
configure:4669: checking pthread.h presence
configure:4669: mipsel-openwrt-linux-gnu-gcc -E -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/include -I/home/dante/entware/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-7.3.0_glibc-2.27/include -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libiconv-full/include -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libintl-full/include  conftest.c
configure:4669: $? = 0
configure:4669: result: yes
configure:4669: checking for pthread.h
configure:4669: result: yes
menus
configure:10411: checking for process shared libpthread support
configure:10473: mipsel-openwrt-linux-gnu-gcc -o conftest -O2 -pipe -mno-branch-likely -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float  -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libiconv-full/include -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libintl-full/include  -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/include -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/include -I/home/dante/entware/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-7.3.0_glibc-2.27/include -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libiconv-full/include -I/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libintl-full/include  -rdynamic -L/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link=/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib -Wl,--dynamic-linker=/opt/lib/ld.so.1 -L/home/dante/entware/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-7.3.0_glibc-2.27/lib -L/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libiconv-full/lib -Wl,-rpath-link=/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libiconv-full/lib -L/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libintl-full/lib -Wl,-rpath-link=/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib/libintl-full/lib  -L/home/dante/entware/Entware/staging_dir/target-mipsel_mips32r2_glibc-2.27/opt/lib conftest.c -lm -ldl  -lresolv -lpthread >&5
configure:10473: $? = 0
configure:10481: error: in `/home/dante/entware/Entware/build_dir/target-mipsel_mips32r2_glibc-2.27/zabbix-4.0.0alpha9':
configure:10483: error: cannot run test program while cross compiling
See `config.log' for more details

Expected:
IPK packages for Server or Proxy like for 3.4 version.



 Comments   
Comment by Vladislavs Sokurenko [ 2018 Aug 24 ]

Fixed in:

  • pre-4.0.0alpha10 (trunk) r84090
Generated at Thu Apr 25 01:28:36 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.