Conflict of 2 extensions GameAnalytics and Defold-luasec

#1

if to use 2 this libs:
image

there will be an error:

ping @britzl @mts :slight_smile:

empty project with this 2 libs:
test_ga.zip (2.0 KB)

0 Likes

#2

defold version 1.2.164, windows 10. although, I’m not sure if this plays a role…

0 Likes

#3

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…

1 Like

#4

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…

0 Likes

#5

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?

4 Likes

#6

Yes, that is probably even more correct

3 Likes

#7

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.

2 Likes

#8
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.

1 Like

#9

@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?

3 Likes

#10

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.

2 Likes

#11

Ah yeah thanks of course that makes sense. I have added the header files now to the repo.

2 Likes

#12

The Defold LuaSec extension uses OpenSSL 1.1.0e. Maybe that is what’s causing the problem?

1 Like

#13

Yeah there is a breaking change from OpenSSL 1.0.x to 1.1.x I think

0 Likes

#14

It breaks curl (for HTTPS support) which the GameAnalytics SDK is also dependent on for Linux, Mac and Windows platforms.

0 Likes

#15

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

1 Like

#16

Could this be impacting Defold’s built in http.request() too? They seem to be failing more often now.

0 Likes

#17

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

4 Likes