#42380 closed defect (fixed)
nodejs @0.10.25 fails to install uv-darwin.h header
Reported by: | cooljeanius (Eric Gallager) | Owned by: | ci42 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: | nodejs |
Description
I was writing an autoconf configure script that checks for the <node.h>
header, and the conftest fails because it is missing the "uv-darwin.h"
header:
configure:6011: checking node.h usability configure:6011: g++ -c -g -O2 -I/opt/local/include -I/opt/local/include/node -I/opt/local/include/node/uv-private conftest.cpp >&5 In file included from /opt/local/include/node/uv.h:67, from /opt/local/include/node/node.h:61, from conftest.cpp:54: /opt/local/include/node/uv-private/uv-unix.h:49:24: error: uv-darwin.h: No such file or directory configure:6011: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "nodetcl" | #define PACKAGE_TARNAME "nodetcl" | #define PACKAGE_VERSION "1.0.0" | #define PACKAGE_STRING "nodetcl 1.0.0" | #define PACKAGE_BUGREPORT "jeff@bovine.net" | #define PACKAGE_URL "" | #define PACKAGE "nodetcl" | #define VERSION "1.0.0" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | /* end confdefs.h. */ | #include <stdio.h> | #ifdef HAVE_SYS_TYPES_H | # include <sys/types.h> | #endif | #ifdef HAVE_SYS_STAT_H | # include <sys/stat.h> | #endif | #ifdef STDC_HEADERS | # include <stdlib.h> | # include <stddef.h> | #else | # ifdef HAVE_STDLIB_H | # include <stdlib.h> | # endif | #endif | #ifdef HAVE_STRING_H | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | # include <memory.h> | # endif | # include <string.h> | #endif | #ifdef HAVE_STRINGS_H | # include <strings.h> | #endif | #ifdef HAVE_INTTYPES_H | # include <inttypes.h> | #endif | #ifdef HAVE_STDINT_H | # include <stdint.h> | #endif | #ifdef HAVE_UNISTD_H | # include <unistd.h> | #endif | #include <node.h> configure:6011: result: no configure:6011: checking node.h presence configure:6011: g++ -E -I/opt/local/include -I/opt/local/include/node -I/opt/local/include/node/uv-private conftest.cpp In file included from /opt/local/include/node/uv.h:67, from /opt/local/include/node/node.h:61, from conftest.cpp:21: /opt/local/include/node/uv-private/uv-unix.h:49:24: error: uv-darwin.h: No such file or directory configure:6011: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "nodetcl" | #define PACKAGE_TARNAME "nodetcl" | #define PACKAGE_VERSION "1.0.0" | #define PACKAGE_STRING "nodetcl 1.0.0" | #define PACKAGE_BUGREPORT "jeff@bovine.net" | #define PACKAGE_URL "" | #define PACKAGE "nodetcl" | #define VERSION "1.0.0" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | /* end confdefs.h. */ | #include <node.h> configure:6011: result: no configure:6011: checking for node.h configure:6011: result: no
The file does actually exist upstream: https://github.com/joyent/node/blob/master/deps/uv/include/uv-darwin.h (doing port -d extract nodejs
will confirm that it exists in the tarball, too)
The block in <uv-unix.h>
that tries to drag in the header in question is between lines 44 and 55:
#if defined(__linux__) # include "uv-linux.h" #elif defined(__sun) # include "uv-sunos.h" #elif defined(__APPLE__) # include "uv-darwin.h" #elif defined(__DragonFly__) || \ defined(__FreeBSD__) || \ defined(__OpenBSD__) || \ defined(__NetBSD__) # include "uv-bsd.h" #endif
The reason that the nodejs Portfile fails to install this header is because it hardcodes the headers it installs and does not include uv-darwin.h
in its hardcoded list:
# install privat uv headers xinstall -m 644 -W ${worksrcpath} \ deps/uv/include/uv-private/ngx-queue.h \ deps/uv/include/uv-private/tree.h \ deps/uv/include/uv-private/uv-unix.h \ deps/uv/include/uv-private/uv-win.h \ ${incpdir}
Adding deps/uv/include/uv-private/uv-darwin.h
to this list should be pretty simple.
Change History (3)
comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added; ciserlohn@… removed |
---|---|
Owner: | changed from macports-tickets@… to ciserlohn@… |
comment:2 follow-up: 3 Changed 11 years ago by ci42
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 11 years ago by cooljeanius (Eric Gallager)
Replying to ciserlohn@…:
That solves my original issue; thanks! Ryan's question still remains though...
Is there a reason why the list of headers to be installed has to be cherry-picked? Could not the entire uv-private directory be copied into the destroot? Perhaps an even better question: why doesn't node provide an "install" target in its Makefile that we could use instead of having to guess what files have to be copied where?