Openssl and zlib libraries missing in TorizonCore Debian Based Container Images (Error during build)

Hi @jeremias.tx,

Thanks a lot for your input.

So, I could find the right solution from the article: C/C++ Development and Debugging on Torizon Using Visual Studio | Toradex Developer Center that you just mentioned. It pushed me in the right direction.

I only needed to add the devpackages in Torizon C/C++ Application Properties.
The devpackages are libssl-dev:arm64 and zlib1g-dev:arm64.
The build will be successful but while deploying the application on the module, it gives error that it cannot find some shared object libraries.

error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

Well, I fixed that by installing that library on the build container and then deployed it again:

    apt-get install lib32stdc++6
	cp /usr/aarch64-linux-gnu/lib/libstdc++.so.6 /usr/lib/
	cd /usr/lib/
	ln -s libstdc++.so.6 libstdc++.so
	ldconfig

Great! Now my application is deployed successfully on the module and it starts running!!

I couldn’t find the option for extrapackages in visual studio though. Is this removed from the configuration properties now because it’s not needed anymore? My problem was solved even without adding the extra packages to be included in the application container that runs on the target.

PS: Installing the lbssl-dev and zlib1g-dev libraries manually in the running container on the build environment doesn’t seem to be the right solution. I get new build errors for missing files after I do apt-get install libssl-dev and apt-get install zlib1g-dev.

build errors:

1>Build FAILED.    
    1>
    1>/usr/include/openssl/e_os2.h(13,11): error : openssl/opensslconf.h: No such file or directory
    1>/usr/include/openssl/e_os2.h(13,11): error :  # include <openssl/opensslconf.h>
    1>/usr/include/openssl/e_os2.h(13,11): error :            ^~~~~~~~~~~~~~~~~~~~~~~
    1>/usr/include/openssl/e_os2.h(13,11): error : compilation terminated.
    1>/usr/include/openssl/e_os2.h(13,11): error : openssl/opensslconf.h: No such file or directory  
    1>/usr/include/openssl/e_os2.h(13,11): error :  # include <openssl/opensslconf.h>   
    1>/usr/include/openssl/e_os2.h(13,11): error :            ^~~~~~~~~~~~~~~~~~~~~~~  
    1>/usr/include/openssl/e_os2.h(13,11): error : compilation terminated.

    1>/usr/lib/gcc-cross/aarch64-linux-gnu/8/../../../../aarch64-linux-gnu/bin/ld : error : cannot find -lz
    1>collect2 : error : ld returned 1 exit status

I could fix this after a long and tedious process of downloading the libraries and compiling them.
But adding the devpackages in the project properties seems to be the easiest way to solve this.

Regards,

Rudhi