I recently am facing problems on building MegaSdkC+ python wheel on alpine edge Linux docker ...I currently tried to port it via the Ubuntu Dockerfile
Error:
#8 184.6 In file included from /usr/include/openssl/bio.h:20,
#8 184.6 from /usr/include/openssl/ssl.h:18,
#8 184.6 from ./include/mega/posix/meganet.h:28,
#8 184.6 from ./include/mega.h:74,
#8 184.6 from src/posix/net.cpp:22:
#8 184.6 src/posix/net.cpp: In constructor 'mega::CurlHttpIO::CurlHttpIO()':
#8 184.6 src/posix/net.cpp:272:10: error: converting to 'bool' from 'std::nullptr_t' requires direct-initialization [-fpermissive]
#8 184.6 272 | if (!CRYPTO_get_locking_callback()
#8 184.6 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 184.6 src/posix/net.cpp:274:13: error: converting to 'bool' from 'std::nullptr_t' requires direct-initialization [-fpermissive]
#8 184.6 274 | && !CRYPTO_THREADID_get_callback())
#8 184.6 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 185.1 make[2]: *** [Makefile:2767: src/posix/libmega_la-net.lo] Error 1
#8 185.1 make[2]: *** Waiting for unfinished jobs....
#8 187.0 mv -f src/posix/.deps/libmega_la-waiter.Tpo src/posix/.deps/libmega_la-waiter.Plo
#8 187.0 make[2]: Leaving directory '/root/home/sdk'
#8 187.0 make[1]: *** [Makefile:3347: all-recursive] Error 1
#8 187.0 make[1]: Leaving directory '/root/home/sdk'
#8 187.0 make: *** [Makefile:1517: all] Error 2
Here is the direct logs of the errors of which is built via github actions:
Tried to port from Ubuntu .. Dockerfile and Github Actions build logs are given below
Logs
https://github.com/AmirulAndalib/slumtoolkit0-docker/runs/7595322451?check_suite_focus=true
Dockerfile
https://github.com/AmirulAndalib/slumtoolkit0-docker/blob/master/Dockerfile
For alpine Build
Dockerfile
https://github.com/AmirulAndalib/MLTB-ALPINE-DOCKER/blob/master/Dockerfile%20Base/Dockerfile
Gitflow Logs
https://github.com/AmirulAndalib/MLTB-ALPINE-DOCKER/runs/7592589121?check_suite_focus=true
MegaSdkC Repository
Thank you @mpb I had added the -fpermissive
flag as you told and the errors were actually downgraded to warnings also my built code is working very well
Fix :
https://github.com/AmirulAndalib/MLTB-ALPINE-DOCKER/blob/master/Dockerfile%20Base/Dockerfile#L45
thank you very much for helping