if to use 2 this libs:
there will be an error:
empty project with this 2 libs:
test_ga.zip (2.0 KB)
defold version 1.2.164, windows 10. although, I’m not sure if this plays a role…
Well, this is a problem since both LuaSec and GameAnalytics uses OpenSSL. One option you’d have is to fork LuaSec/GameAnalytics and remove libssl. It might work…
thanks @britzl workaround probably will work, but it’s very inconvenient, each time to fork after update of one of this libs. I’ll be back to GoogleAnalytics…
Could another solution be to make a “OpenSSL” extension which would hold the native library and then make LuaSec and GameAnalytics extensions dependent on that new extension? Would that work?
Yes, that is probably even more correct
Ok I have create an Defold OpenSSL extension here https://github.com/GameAnalytics/defold-openssl/archive/master.zip. It works fine for the GameAnalytics extension when adding it as a dependency to your project but when I tried to test it with luasec by manually downloading the extension and adding it my project and then remove the OpenSSL libs (osx, linux and win) then I get some undefined symbols like this:
The GameAnalytics SDK uses OpenSSL 1.0.2h so I am not sure if the luasec extension uses another version of OpenSSL or what is causing the problem.
dependencies = https://github.com/subsoap/defos/archive/master.zip,https://github.com/subsoap/defsave/archive/master.zip,https://github.com/subsoap/defstring/archive/master.zip,https://github.com/subsoap/defmath/archive/master.zip,https://github.com/britzl/monarch/archive/master.zip,https://github.com/rgrams/rendercam/archive/v1.0.1.zip,https://github.com/britzl/defold-lfs/archive/master.zip,https://github.com/GameAnalytics/GA-SDK-DEFOLD/archive/master.zip,https://github.com/britzl/steamworks-defold/archive/master.zip,https://github.com/subsoap/discordrich/archive/v1.0.4.zip,https://github.com/Lerg/extension-directories/archive/master.zip,https://github.com/dapetcu21/defold-fmod/archive/master.zip,https://github.com/subsoap/defprocess/archive/master.zip,https://github.com/Lerg/extension-ios_keyboard_notification/archive/master.zip,https://github.com/defold/extension-gps/archive/master.zip
With these deps I get this error
https://github.com/GameAnalytics/GA-SDK-DEFOLD/archive/3.0.3.zip works for me for now.
@Pkeod you need to add https://github.com/GameAnalytics/defold-openssl/archive/master.zip to your dependencies now, or is there a smart way I can make the GameAnalytics SDK extension dependent on the new OpenSSL extension?
A tip: Since you now have an extension with an openssl version, I would suggest you put the header in the include
folder. That way it’s accessible from other extensions. It’s easier to keep track of versioning that way.
Ah yeah thanks of course that makes sense. I have added the header files now to the repo.
The Defold LuaSec extension uses OpenSSL 1.1.0e. Maybe that is what’s causing the problem?
Yeah there is a breaking change from OpenSSL 1.0.x to 1.1.x I think
It breaks curl (for HTTPS support) which the GameAnalytics SDK is also dependent on for Linux, Mac and Windows platforms.
I will look into to see what I need to do with curl library if I need to upgrade curl to get it working with OpenSSL 1.1.x
Could this be impacting Defold’s built in http.request() too? They seem to be failing more often now.
It shouldn’t be since we don’t use openssl, we use mbedTls now.
And we’re hoping we can supply access to this too so that others don’t have to add a second ssl library to the engine
I have updated the openssl extension to use the latest 1.1.x version of openssl (v1.1.1d). I have also updated the curl library in the GameAnalytics SDK to work with the new openssl extension. I tried to test defold-luasec extension to see if it works with the updated defold-openssl extension but it still has some compile errors. It might be because it only uses 1.1.0e instead of 1.1.1d of openssl I am not sure.
Difficult to say without seeing the errors