Opened 9 years ago

Closed 9 years ago

#49637 closed defect (fixed)

nodejs @ 4.2.2_0 fail to build on El Capitan

Reported by: trond.kandal@… Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: mp@…
Port: nodejs

Description

  /usr/bin/clang '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I/opt/local/include -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin  -Os -gdwarf-2 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -MMD -MF /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs/nodejs/work/node-v4.2.2/out/Release/.deps//opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs/nodejs/work/node-v4.2.2/out/Release/obj.target/cares/deps/cares/src/ares_parse_txt_reply.o.d.raw -Os -c -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs/nodejs/work/node-v4.2.2/out/Release/obj.target/cares/deps/cares/src/ares_parse_txt_reply.o ../deps/cares/src/ares_parse_txt_reply.c
../deps/cares/src/ares_parse_txt_reply.c:153:25: error: no member named 'record_start' in 'struct ares_txt_reply'
              txt_curr->record_start = strptr == aptr;
              ~~~~~~~~  ^
1 error generated.
make[1]: *** [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs/nodejs/work/node-v4.2.2/out/Release/obj.target/cares/deps/cares/src/ares_parse_txt_reply.o] Error 1

Attachments (2)

main.log.gz (21.3 KB) - added by trond.kandal@… 9 years ago.
nodejs-4.2.2-fail-even-without-ares.log (763.8 KB) - added by mp@… 9 years ago.
c-ares deactivated still doesn't build

Download all attachments as: .zip

Change History (17)

Changed 9 years ago by trond.kandal@…

Attachment: main.log.gz added

comment:1 Changed 9 years ago by ci42

Keywords: nodejs El Capitan removed
Owner: changed from macports-tickets@… to ciserlohn@…
Port: 4.2.2_0 removed
Summary: nodejs 4.2.2_0 fail to build on El Capitannodejs @ 4.2.2_0 fail to build on El Capitan

Please provide the output of

$ port installed c-ares

and

$ ls -l /usr/local/include

In the future please Cc the port maintainer (port info --maintainer <portname>), don't use arbitrary keywords (see keyword guidelines) and just use the portname without the version in the port field.

comment:2 Changed 9 years ago by mp@…

Cc: mp@… added

Cc Me!

comment:3 in reply to:  1 Changed 9 years ago by mp@…

Same issue on Mavericks.

Replying to ciserlohn@…:

$ port installed c-ares

c-ares @1.10.0_0+universal (active)

$ ls -l /usr/local/include

ls: /usr/local/include: No such file or directory

(while building… because I do

sudo mv -vi /usr/local /usr/localno; time nice sudo port -p upgrade -v outdated; sudo mv -vi /usr/localno /usr/local;`

)

comment:4 Changed 9 years ago by mp@…

sudo port clean nodejs

and a new upgrade solved it right now, because it didn't get built from source, but instead used the already built nodejs-4.2.2_0+python27+ssl.darwin_13.x86_64.tbz2 from packages.macports.org.

comment:5 Changed 9 years ago by mp@…

Still the same error when building from source.

Noticed this:

egrep -r ares_txt_reply /opt/local/include/
/opt/local/include/ares.h:struct ares_txt_reply {
/opt/local/include/ares.h:  struct ares_txt_reply  *next;
/opt/local/include/ares.h:                                      struct ares_txt_reply** txt_out);
/opt/local/include/node/ares.h:struct ares_txt_reply {
/opt/local/include/node/ares.h:  struct ares_txt_reply  *next;
/opt/local/include/node/ares.h:                                      struct ares_txt_reply** txt_out);
port provides /opt/local/include/ares.h 
/opt/local/include/ares.h is provided by: c-ares
port provides /opt/local/include/node/ares.h 
/opt/local/include/node/ares.h is provided by: nodejs
diff /opt/local/include/ares.h /opt/local/include/node/ares.h 
22,23d21
< #include "ares_build.h"    /* c-ares build definitions */
< #include "ares_rules.h"    /* c-ares rules enforcement */
33a32,34
> /* Data type definition of ares_socklen_t. */
> typedef unsigned ares_socklen_t;
> 
474a476,477
>   unsigned char           record_start;  /* 1 - if start of new record
>                                           * 0 - if a chunk in the same record */
diff /opt/local/include/ares_version.h /opt/local/include/node/ares_version.h 
10c10
< #define ARES_VERSION_PATCH 0
---
> #define ARES_VERSION_PATCH 1
14c14
< #define ARES_VERSION_STR "1.10.0"
---
> #define ARES_VERSION_STR "1.10.1-DEV"

It seems nodejs should include the

/opt/local/include/node/

directory before

/opt/local/include/

Actually, it should make sure to include

./deps/cares/include/

before any global include directories.

Last edited 9 years ago by mp@… (previous) (diff)

comment:7 Changed 9 years ago by ci42

Please deactivate c-ares when installing nodejs. You can activate again afterwards.

$ sudo port -f deactivate c-ares
$ sudo install nodejs
$ sudo port activate c-ares

Marked nodejs, nodejs-devel with conflicts_build in r142329.

Changed 9 years ago by mp@…

c-ares deactivated still doesn't build

comment:8 in reply to:  7 ; Changed 9 years ago by mp@…

Replying to ciserlohn@…:

Please deactivate c-ares when installing nodejs. You can activate again afterwards.

Already was building it with c-ares deactivated, but it also failed.
nodejs-devel also just failed with the same errors:

...
:info:build In file included from ../src/debug-agent.cc:24:
:info:build In file included from ../src/node.h:156:
:info:build ../src/node_internals.h:323:5: error: no type named 'MaybeLocal' in namespace 'v8'
:info:build v8::MaybeLocal<v8::Object> Copy(Environment* env, const char* data, size_t len);
:info:build ~~~~^
:info:build ../src/node_internals.h:323:15: error: expected unqualified-id
:info:build v8::MaybeLocal<v8::Object> Copy(Environment* env, const char* data, size_t len);
:info:build               ^
...

... and more ...

comment:9 Changed 9 years ago by trond.kandal@…

$ port installed c-ares
The following ports are currently installed:
  c-ares @1.10.0_0 (active)
$ ls -l /usr/local/include
$

comment:10 Changed 9 years ago by trond.kandal@…

$ sudo port -f deactivate c-ares
$ sudo port installed nodejs
The following ports are currently installed:
  nodejs @0.10.36_0+python27+ssl (active)
  nodejs @0.12.7_0+python27+ssl
$ sudo port -v upgrade outdated
--->  Computing dependencies for nodejs.
--->  Fetching archive for nodejs
--->  nodejs-4.2.2_0+python27+ssl.darwin_15.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
--->  Attempting to fetch nodejs-4.2.2_0+python27+ssl.darwin_15.x86_64.tbz2 from http://lil.fr.packages.macports.org/nodejs
...
$ sudo port -v installed nodejs
The following ports are currently installed:
  nodejs @0.10.36_0+python27+ssl platform='darwin 15' archs='x86_64'
  nodejs @0.12.7_0+python27+ssl platform='darwin 15' archs='x86_64'
  nodejs @4.2.2_0+python27+ssl (active) platform='darwin 15' archs='x86_64'
$  sudo port -v -f activate c-ares
...
$

Seems to work to build from source without c-ares on El Capitan (at least on my computer).

Also I upgraded Xcode to Version 7.1.1 (7B1005) this morning.

Last edited 9 years ago by trond.kandal@… (previous) (diff)

comment:11 in reply to:  9 Changed 9 years ago by ci42

Replying to trond.kandal@…:

$ port installed c-ares
The following ports are currently installed:
  c-ares @1.10.0_0 (active)
$ ls -l /usr/local/include
$

Please deactivate c-ares when installing nodejs (see my previous comment).

comment:12 in reply to:  8 Changed 9 years ago by ci42

Replying to mp@…:

Replying to ciserlohn@…:

Please deactivate c-ares when installing nodejs. You can activate again afterwards.

Already was building it with c-ares deactivated, but it also failed.
nodejs-devel also just failed with the same errors:

...
:info:build In file included from ../src/debug-agent.cc:24:
:info:build In file included from ../src/node.h:156:
:info:build ../src/node_internals.h:323:5: error: no type named 'MaybeLocal' in namespace 'v8'
:info:build v8::MaybeLocal<v8::Object> Copy(Environment* env, const char* data, size_t len);
:info:build ~~~~^
:info:build ../src/node_internals.h:323:15: error: expected unqualified-id
:info:build v8::MaybeLocal<v8::Object> Copy(Environment* env, const char* data, size_t len);
:info:build               ^
...

... and more ...

This is not the same error as before.

I can reproduce the original error when c-ares is installed. This can be circumvented by temporarily deactivating c-ares.

comment:13 in reply to:  8 ; Changed 9 years ago by ci42

Replying to mp@…:

Replying to ciserlohn@…:

Please deactivate c-ares when installing nodejs. You can activate again afterwards.

Already was building it with c-ares deactivated, but it also failed.
nodejs-devel also just failed with the same errors:

...
:info:build In file included from ../src/debug-agent.cc:24:
:info:build In file included from ../src/node.h:156:
:info:build ../src/node_internals.h:323:5: error: no type named 'MaybeLocal' in namespace 'v8'
:info:build v8::MaybeLocal<v8::Object> Copy(Environment* env, const char* data, size_t len);
:info:build ~~~~^
:info:build ../src/node_internals.h:323:15: error: expected unqualified-id
:info:build v8::MaybeLocal<v8::Object> Copy(Environment* env, const char* data, size_t len);
:info:build               ^
...

... and more ...

Please also deactivate v8 and try again.

comment:14 in reply to:  13 Changed 9 years ago by mp@…

Replying to ciserlohn@…:

Replying to mp@…:

Replying to ciserlohn@…:

Please deactivate c-ares when installing nodejs. You can activate again afterwards.

Already was building it with c-ares deactivated, but it also failed.

Please also deactivate v8 and try again.

It worked. Both nodejs and nodejs-devel build fine when c-ares and v8 are deactivated.
I'm not on GitHub, so maybe someone would like to let the nodejs team know here: https://github.com/nodejs/node/issues/2637

Last edited 9 years ago by mp@… (previous) (diff)

comment:15 Changed 9 years ago by ci42

Resolution: fixed
Status: newclosed

Fixed in r142345 and r142329.

Note: See TracTickets for help on using tickets.