Need help with ssl on perl

Hi.

I am running the home automation server FHEM on LEDE/openwrt as suggested on many sites on the internet.

The platform is a Raspberry Pi 3 B.

While configuring i encountered a problem to set up the perl ssl component that is required for the webserver and for wireless communication with devices that use encryption.

The problem is that the modules Net:SSLeay and IO:Socket:SSL are not included in the LEDE perl packages.

I tried several approaches to get them installed:

For IO:Socket:SSL i used a package from Raspbian since it is architecture independent.

For Net:SSLeay i tried:

  • use packages for Raspbian Jessie; this won't work because LEDE uses ld-musl-armhf.o and the binaries of Raspbian use ld-linux-armhf.so.3

  • compile it using cpan: perl Makefile.PM fails due to missing compiler environment, while i have gcc installed.

Then this line is written all over the package:

*** Be sure to use the same compiler and options to compile your OpenSSL, perl, and Net::SSLeay. Mixing and matching compilers is not supported.

This is why i want to ask if LEDE can provide Net:SSLeay?

Or can you direct me to the next possible steps from here?

Thread can be closed. Found a solution to get perl fully running by myself.

Wonder why no one at least tried to point in directions.

Then you should share your solution with everyone here in case someone else will came across this problem (and this thread) so people know how to resolve this issue.

It was for me totally impossible without further directions from someone who is responsible for the perl modules on LEDE to set up any environment to build them correctly.

You have problems with:

  • musl: means you can not use binary modules from other linux distros which don't use musl and i found none except LEDE that uses musl.

  • incomplete perlbase-devel: means you can not compile perl modules on the machine itself; providing these from a new compiled perl source is also impossible; see next point.

  • GCC vs CCACHE; for perl on LEDE ccache was used as C-compiler. Modules need the exact same compiler environment as was used to compile perl itself. So it is impossible to add gcc compiled modules and gcc is the only compiler provided by LEDE.

  • Cross-Compiling: not sure how that would work, since missing modules are built on the running system through CPAN which would mean setting up a cross compile build environment for LEDE and for CPAN. Not sure if this is even possible with CPAN since it does a lot of tests with a built component within the running perl environment.

So i went another route.

I created what is called "DebianWRT" on the web:

  • install LEDE and use it as a base system with all needed kernel modules and software to access hardware and do the routing part

  • use debootstrap to install a debian-system in a fresh directory and chroot to it. Install PERL and FHEM to the chroot environment. Debian PERL provides all missing PERL modules.

1 Like

work

cpanm -n Net::SSLeay

This topic was automatically closed after 2 days. New replies are no longer allowed.