Just to update my own post, installing the libstdc++-devel-4.6.2-1.aix6.1.ppc.rpm (matches version of gcc) provided the files to resolve the issue below, then krb5-devel-1.9.4-1.aix5.1.ppc.rpm to resolve a subsequent issue with not finding gssapi.h.
Now we have the error "../../../nan/nan.h:45:3: error: #error This version of node/NAN/v8 requires a C++11 compiler" which we think means the version of gcc is too old and we may need to try updating to 5.1 (which I think is the minimum to provide this support). I suppose another alternative would be to use an older version of node.js but that seems like a huge step backwards.
This is way harder than we expected.
I'll post another update if we get anywhere, or if anybody has tried gcc-5.1 and found it doesn't work in PASE then please say.
-----Original Message-----
From: Mark Ford
Sent: 06 September 2017 15:59
To: 'IBMi Open Source Roundtable'
Subject: RE: [IBMiOSS] node.js - 'module did not self-register' error
Sorry, I've not had a chance to put the log online, but we've made a little more progress after modifying the binding.gyp file to allow the linux section to be selected for inclusion (as a test). The log from this is below and it's now failing to find an include file called 'utility' referenced in the v8.h header file, so I'm now looking for that. It's supposedly a standard c header file.
$ npm install @internal/kerberos @internal/simple-kerberos
@internal/kerberos@0.0.5 install
/home/XX/node/krb/node_modules/@internal/kerberos
(node-gyp rebuild) || (exit 0)
gmake: Entering directory '/home/XX/node/krb/node_modules/@internal/kerberos/build'
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
In file included from /home/XX/.node-gyp/6.11.2/include/node/node.h:42:0,
from ../lib/kerberos.h:4,
from ../lib/kerberos.cc:1:
/home/XX/.node-gyp/6.11.2/include/node/v8.h:21:19: fatal error: utility: No such file or directory compilation terminated.
gmake: *** [kerberos.target.mk:95: Release/obj.target/kerberos/lib/kerberos.o] Error 1
gmake: Leaving directory '/home/XX/node/krb/node_modules/@internal/kerberos/build'
gyp ERR! build error
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/QOpenSys/QIBM/ProdData/OPS/Node6/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System OS400 7.2
gyp ERR! command "/QOpenSys/QIBM/ProdData/OPS/Node6/bin/node" "/QOpenSys/QIBM/ProdData/OPS/Node6/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/XX/node/krb/node_modules/@internal/kerberos
gyp ERR! node -v v6.11.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
krb@1.0.0 /home/XX/node/krb
`-- @internal/simple-kerberos@0.0.2
`-- @internal/kerberos@0.0.5
-----Original Message-----
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf Of Aaron Bartell
Sent: 06 September 2017 14:50
To: IBMi Open Source Roundtable
Subject: Re: [IBMiOSS] node.js - 'module did not self-register' error
I am curious if something didn't build correctly. Could you create a Github gist (or Bitbucket snippet) with the compile log?
Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces
On Wed, Sep 6, 2017 at 8:14 AM, Mark Ford <Mark.Ford@xxxxxxxxxxx> wrote:
There's nothing public to see but the kerberos package is unmodified,
as it installs via npm install. I wasn't aware that the binding.gyp
file might need to be modified for IBM i/PASE... I've just checked it
and it has sections for OS=mac, linux and win. Is it likely it will
need another section adding and if so, is there any advice/guidance on
how it should look?
The test script needs nothing more than the require statement for this
module to fail with the error.
-----Original Message-----
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf Of
Aaron Bartell
Sent: 06 September 2017 13:51
To: IBMi Open Source Roundtable
Subject: Re: [IBMiOSS] node.js - 'module did not self-register' error
Did you end up needing to change binding.gyp for the kerberos npm to
recognize the IBM i OS? Do you have a public fork so we can see?
Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces
On Wed, Sep 6, 2017 at 7:45 AM, Mark Ford <Mark.Ford@xxxxxxxxxxx> wrote:
Yes, the install of the package (and therefore node-gyp/compile) was
performed just prior to running it. I've only just got far enough
today to get the compile step working.
For info, the versions we have are:
node -v
v6.11.2
npm -v
3.10.10
-----Original Message-----
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf
Of Aaron Bartell
Sent: 06 September 2017 13:39
To: IBMi Open Source Roundtable
Subject: Re: [IBMiOSS] node.js - 'module did not self-register'
error
I can see from Google that this is a fairly common issue and is
normally
down to a mismatch with the version of node, which shouldn't be the
case here.
I'd be curious if a different version of Node.js was present at
~compile~
(gcc/node-gyp) time of the kerberos npm vs. run time. Can you
confirm the same Node.js version was used at kerberos compile and run time?
Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces
Proud partner of The Ageas Bowl.
This email has been sent by and on behalf of one or more of Ageas (UK) Limited (registered no: 1093301 ), Ageas Insurance Limited (registered no: 354568), Ageas Retail Limited (registered no: 1324965), or a subsidiary of Ageas (UK) Limited (together “Ageas UK”). Ageas UK companies are registered in England and Wales, and each entity’s registered office is Ageas House, Hampshire Corporate Park, Templars Way, Eastleigh SO53 3YA.
Ageas Retail Limited is authorised and regulated by the Financial Conduct Authority. Financial Services Register Number: 312468.
Ageas Insurance Limited is authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority. Financial Services Register Number: 202039
This e-mail together with any attachments are intended for the addressee only and may be private and confidential. If you are not the intended recipient, or the person responsible for delivering it to the intended recipient, you must not open any attachments, or copy, disclose, distribute, retain or use this e-mail, including any attachments, in any way whatsoever; please return it to us immediately using the reply facility on e-mail.
Consider the environment and think before you print this email.
As an Amazon Associate we earn from qualifying purchases.