[Resolved] Can't build to device if I have plugins

Been trying to figure out a build error, but no clue what is happening.

If I have plugins in my build.settings file, I get errors during the build process.  I am building on a Mac for iOS using public release 2189a.

Here is the applicable content of my build.settings file:

settings =
{
    orientation =
    {
        default = “landscapeRight”,
        content = “landscapeRight”,
        supported =
        {
            “landscapeRight”
        }
    },

    plugins =
    {
        [“plugin.google.iap.v3”] =
        {
            publisherId = “com.coronalabs”
        },

        [“plugin.amazon.iap”] =
        {
            publisherId = “com.amazon”
        },
        
        [“plugin.openssl”] =
        {
            publisherId = “com.coronalabs”
        },

        [“plugin.zip”] =
        {
            publisherId = “com.coronalabs”
        }
    },

Here is the error I get:

Runtime error
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: <error>{“status”:256,“message”:“ld: library not found for -l-lplugin.openssl\nclang: error: linker command failed with exit code 1 (use -v to see invocation)”}</error>
stack traceback:
    [C]: ?
    [C]: in function ‘assert’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: in function ‘checkError’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:318: in function ‘build’
    ?: in function ‘buildExe’
    ?: in function <?:695>
Runtime error: /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: <error>{“status”:256,“message”:“ld: library not found for -l-lplugin.openssl\nclang: error: linker command failed with exit code 1 (use -v to see invocation)”}</error>
stack traceback:
    [C]: ?
    [C]: in function ‘assert’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: in function ‘checkError’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:318: in function ‘build’
    ?: in function ‘buildExe’
    ?: in function <?:695>
 

If I remove the Open SSL plugin from the build.settings file, then I get this error:

Runtime error
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: <error>{“status”:256,“message”:“ld: library not found for -l-lplugin.zip\nclang: error: linker command failed with exit code 1 (use -v to see invocation)”}</error>
stack traceback:
    [C]: ?
    [C]: in function ‘assert’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: in function ‘checkError’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:318: in function ‘build’
    ?: in function ‘buildExe’
    ?: in function <?:695>
Runtime error: /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: <error>{“status”:256,“message”:“ld: library not found for -l-lplugin.zip\nclang: error: linker command failed with exit code 1 (use -v to see invocation)”}</error>
stack traceback:
    [C]: ?
    [C]: in function ‘assert’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: in function ‘checkError’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:318: in function ‘build’
    ?: in function ‘buildExe’
    ?: in function <?:695>
 

If I then remove the ZIP plugin from the build.settings file, I get a different error:

Runtime error
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: <error>{“status”:256,“message”:“clang: error: no such file or directory: ‘/Users/thegdog/Desktop/XXX.app/XXX’”}</error>
stack traceback:
    [C]: ?
    [C]: in function ‘assert’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: in function ‘checkError’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:318: in function ‘build’
    ?: in function ‘buildExe’
    ?: in function <?:695>
Runtime error: /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: <error>{“status”:256,“message”:“clang: error: no such file or directory: ‘/Users/thegdog/Desktop/XXX.app/XXX’”}</error>
stack traceback:
    [C]: ?
    [C]: in function ‘assert’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:295: in function ‘checkError’
    /Users/thegdog/Desktop/XXX.app/.build/libtemplate/Builder.lua:318: in function ‘build’
    ?: in function ‘buildExe’
    ?: in function <?:695>

(The XXX is just my actual app name changed to not reveal it.)

If I remove all the plugins, the build process completes.

Any idea what is happening?  Been trying to figure this out for over a week.  I get no errors when running in the Simulator.

You probably need to change:

[lua][“plugin.google.iap.v3”] = {publisherId = “com.coronalabs”},[/lua]

to 

[lua][“plugin.google.iap.v3”] = {publisherId = “com.coronalabs”, supportedPlatforms = {[“android”] = true}},[/lua]

@jonjonsson,

Thanks.  I just happened to come across your thread as well (http://forums.coronalabs.com/topic/45796-build-error-library-not-found-for-l-lpluginopenssl/) in my trying to figure this out.

Sad when it’s a bad documentation issue that keeps us running in circles.  Wish they could work on giving error messages that actually give the developer a clue as to what the problem is.  I love how it gave errors for everything other than the actual plugin causing the issue.

Thanks again!

I’ve asked that the documentation be updated to include the supportedPlatforms line.

Rob

Thanks, Rob.  But really, could you guys work on better error reporting?  It makes no sense to me why there’s an error for every plugin other than the one with a problem.

You probably need to change:

[lua][“plugin.google.iap.v3”] = {publisherId = “com.coronalabs”},[/lua]

to 

[lua][“plugin.google.iap.v3”] = {publisherId = “com.coronalabs”, supportedPlatforms = {[“android”] = true}},[/lua]

@jonjonsson,

Thanks.  I just happened to come across your thread as well (http://forums.coronalabs.com/topic/45796-build-error-library-not-found-for-l-lpluginopenssl/) in my trying to figure this out.

Sad when it’s a bad documentation issue that keeps us running in circles.  Wish they could work on giving error messages that actually give the developer a clue as to what the problem is.  I love how it gave errors for everything other than the actual plugin causing the issue.

Thanks again!

I’ve asked that the documentation be updated to include the supportedPlatforms line.

Rob

Thanks, Rob.  But really, could you guys work on better error reporting?  It makes no sense to me why there’s an error for every plugin other than the one with a problem.