Building O2 fails at InfoLogger@v1.3.7

Dear experts,

I tried updating O2 and QC on ubuntu 18.04 today using

aliBuild build -w sw/ O2Suite --defaults o2

but it fails at Infologger@v1.3.7 with some incorrect function calls. The first of several errors is the following:

[ 78%] Building CXX object CMakeFiles/infoLoggerServer.dir/src/ConfigInfoLoggerServer.cxx.o
/home/tklemenz/AliSoftware/sw/SOURCES/InfoLogger/v1.3.7/v1.3.7/src/infoLoggerJAVASCRIPT_wrap.cxx: In function 'int SWIG_V8_GetInstancePtr(v8::Handle<v8::Value>, void**)':
/home/tklemenz/AliSoftware/sw/SOURCES/InfoLogger/v1.3.7/v1.3.7/src/infoLoggerJAVASCRIPT_wrap.cxx:1113:52: error: no matching function for call to 'v8::Value::ToObject()'
   v8::Handle<v8::Object> objRef = valRef->ToObject();
                                                    ^
In file included from /home/tklemenz/AliSoftware/sw/SOURCES/InfoLogger/v1.3.7/v1.3.7/src/infoLoggerJAVASCRIPT_wrap.cxx:202:0:
/usr/include/node/v8.h:2576:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                            ^~~~~~~~
/usr/include/node/v8.h:2576:44: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/node/v8-internal.h:14:0,
                 from /usr/include/node/v8.h:25,
                 from /home/tklemenz/AliSoftware/sw/SOURCES/InfoLogger/v1.3.7/v1.3.7/src/infoLoggerJAVASCRIPT_wrap.cxx:202:
/usr/include/node/v8.h:2590:31: note: candidate: v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^
/usr/include/node/v8config.h:318:44: note: in definition of macro 'V8_DEPRECATED'
 #define V8_DEPRECATED(message, declarator) declarator
                                            ^~~~~~~~~~
/usr/include/node/v8.h:2590:31: note:   candidate expects 1 argument, 0 provided
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^
/usr/include/node/v8config.h:318:44: note: in definition of macro 'V8_DEPRECATED'
 #define V8_DEPRECATED(message, declarator) declarator
                                            ^~~~~~~~~~

At first this looked to me like a typical “forgot to update alidist” problem but alidist, O2 and QC are at the latest dev (O2) and master (alidist and QC) commit.

I am wondering if I am missing some packages on my system because of these lines in the log:

-- Could NOT find TCL (missing: TCL_INCLUDE_PATH) 
-- Could NOT find TCLTK (missing: TCL_INCLUDE_PATH TK_INCLUDE_PATH) 
-- Could NOT find TK (missing: TK_INCLUDE_PATH) 

The full log can be found here.

Thanks for your help!

Cheers,
Thomas

This happens in building the library for nodejs, it seems swig is not compatible with the version (12.0.4) installed on your system and generates code causing this error. I will have a look next week. If this is blocking you, please temporarily hide/move/rename the “node” executable before building infoLogger, corresponding deps will be skipped. (this is an optional lib)

cheers,
sylvain

Hi Sylvain,

thanks for the fast reply.
I renamed all node executables I could find on my system (to make sure it does not go back to v10), which were

../sw/ubuntu1804_x86-64/node/v10.15.3-2/bin/node
../sw/ubuntu1804_x86-64/node/v12.13.0-1/bin/node

but I still get the same result. Am I missing something? I feel like aliBuild is still trying to do the same as before.

Cheers,
Thomas

In the infologger cmake, nodejs bindings are not built if node executable not found.
You should also get a message telling you from where it picks up nodejs.

find_program(NODE_EXECUTABLE node)
execute_process(COMMAND {NODE_EXECUTABLE} --version COMMAND tr -d 'v' OUTPUT_VARIABLE NODEJS_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) get_filename_component(NODE_DIR {NODE_EXECUTABLE} DIRECTORY)
find_path(NODEJS_INCLUDE_DIRS NAMES node.h NO_DEFAULT_PATH PATHS {Nodejs_ROOT} {Nodejs_ROOT}/include {NODE_DIR}/../include/node) if (NODEJS_INCLUDE_DIRS AND "{NODEJS_VERSION}" VERSION_GREATER_EQUAL “8.9”)
message(“Bindings for node.js will be generated”)
message(“Using NODEJS_INCLUDE_DIRS={NODEJS_INCLUDE_DIRS}") message("Node.js version {NODEJS_VERSION}”)

actually, it might work better with node v10 than v12 (as the error is caused by a lack of support of more recent versions of nodejs by swig).

I found that aliBuild tried to use my local nodejs, so I temporarily renamed

/usr/local/include/node/node.h

and

../sw/ubuntu1804_x86-64/node/v12.13.0-1/bin/node

but left

../sw/ubuntu1804_x86-64/node/v10.15.3-2/bin/node

untouched.
Now everything compiled just fine.
Thanks for your help!

Cheers,
Thomas