ZM-1.34 - porting to OpenWrt
Posted: Tue Aug 20, 2019 1:47 pm
Folks;
I am in process of porting ZM to OpenWrt (x86_64); part of this product portfolio: https://www.rossco.org
got past all the dependencies, config fails:
./zmconfgen.pl: Perl lib version (5.28.1) doesn't match executable '/usr/bin/perl' version (5.16.3) at /home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/Config.pm line 51
config seems to be detecting my system as opposed to openwrt perl, despite these Makefile settings:
CMAKE_OPTIONS += -DPERL_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION) - correct perl executable
export PERL5LIB:=$(STAGING_DIR_ROOT)/usr/lib/perl$(PERL_MAJOR)/$(PERL_VERSION2) - correct perl libs
export PATH:=$(STAGING_DIR_HOSTPKG)/usr/bin:$(PATH) - point to correct perl path first
commenting /staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/Config.pm:
#$^V eq 5.28.1
# or die sprintf "%s: Perl lib version (5.28.1) doesn't match executable '$^X' version (%vd)", $0, $^V;
gets past this, to:
[ 96%] Building ZoneMinder perl modules
Can't load '/home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/auto/Cwd/Cwd.so' for module Cwd: /home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/auto/Cwd/Cwd.so: undefined symbol: Perl_xs_boot_epilog at /home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/XSLoader.pm line 87
The missing symbol (Perl_xs_boot_epilog) is from libperl.so or built in to perl
nm -a staging_dir/hostpkg/usr/bin/perl | grep Perl_xs_boot_epilog
0000000000447b30 T Perl_xs_boot_epilog
...an indication that the first failure was correct: ZM is using system as opposed to openwrt perl.
So; how do I tell ZM to use the correct perl?
Thanks;
Bill
I am in process of porting ZM to OpenWrt (x86_64); part of this product portfolio: https://www.rossco.org
got past all the dependencies, config fails:
./zmconfgen.pl: Perl lib version (5.28.1) doesn't match executable '/usr/bin/perl' version (5.16.3) at /home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/Config.pm line 51
config seems to be detecting my system as opposed to openwrt perl, despite these Makefile settings:
CMAKE_OPTIONS += -DPERL_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION) - correct perl executable
export PERL5LIB:=$(STAGING_DIR_ROOT)/usr/lib/perl$(PERL_MAJOR)/$(PERL_VERSION2) - correct perl libs
export PATH:=$(STAGING_DIR_HOSTPKG)/usr/bin:$(PATH) - point to correct perl path first
commenting /staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/Config.pm:
#$^V eq 5.28.1
# or die sprintf "%s: Perl lib version (5.28.1) doesn't match executable '$^X' version (%vd)", $0, $^V;
gets past this, to:
[ 96%] Building ZoneMinder perl modules
Can't load '/home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/auto/Cwd/Cwd.so' for module Cwd: /home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/auto/Cwd/Cwd.so: undefined symbol: Perl_xs_boot_epilog at /home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/target-x86_64_glibc/root-x86/usr/lib/perl5/5.28/XSLoader.pm line 87
The missing symbol (Perl_xs_boot_epilog) is from libperl.so or built in to perl
nm -a staging_dir/hostpkg/usr/bin/perl | grep Perl_xs_boot_epilog
0000000000447b30 T Perl_xs_boot_epilog
...an indication that the first failure was correct: ZM is using system as opposed to openwrt perl.
So; how do I tell ZM to use the correct perl?
Thanks;
Bill