Symbol lookup error on script request


#1

we have DF 2.1 on a centos 6 installed without using the Bitnami image,

the problem we are facing is that whenever we make GET request to a server side script, DF goes down with the below error, but any other requests to any table works fine.

/usr/local/zend/bin/php: symbol lookup error: /usr/local/zend/lib/php_extensions/v8js.so: undefined symbol: _ZNSt6chrono3_V212system_clock3nowEv

which shared library provides the symbol that is failing?
so we can try to inspect.

here’s the script we trying to call:
// check for required body var body = event.request.parameters; var required = ["card_serial"]; lodash._.each( required, function( element ) { if (!body.hasOwnProperty(element) || !body[element]) { throw new Error( "Missing '" + element + "' in body\n" ); } });

Your help is appreciated,

Thank you,
Yahya Saddiq


#2

Hey Yahya,

Thanks for reaching out. We’re looking into this for you! If someone in the community wants to help, in the meantime, we encourage that also.


Thanks,
@AlexBowen
Community Manager


#3

@ysadiq is this your whole script? because it looks like you’re trying to use lodash without including it.

var lodash = require("lodash.min.js");


#4

@drewpearce yes that’s my whole script.
I thought the problem was from the lodash script that’s why I disabled it.


#5

i disabled lodash, changed my script to this, and still the same error happens

required.forEach(function(element, index, array) {
   if (!body.hasOwnProperty(element) || !body[element]) {
        throw new Error( "Missing '" + element + "' in params\n" );
    }
});

#6

Finally we fixed it, that was somehow complicated issue …

The v8js version required by dreamfactory requires a version of GCC that is newer than supplied with CentOS by default. So I used the Software Collection (SC) repos to get newer dev tools.

However, these dev tools are too new for the v8js version. That is why this failed.

The workaround was to link older headers for the failing functions but compile them with the newer compilers.

Found clues to this here:
https://github.com/phpv8/v8js/issues/142