[MacPorts] #42380: nodejs @0.10.25 fails to install uv-darwin.h header

MacPorts noreply at macports.org
Wed Feb 5 18:48:45 PST 2014


#42380: nodejs @0.10.25 fails to install uv-darwin.h header
---------------------+--------------------------------
 Reporter:  egall@…  |      Owner:  macports-tickets@…
     Type:  defect   |     Status:  new
 Priority:  Normal   |  Milestone:
Component:  ports    |    Version:  2.2.1
 Keywords:           |       Port:  nodejs
---------------------+--------------------------------
 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 at 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 at 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.

-- 
Ticket URL: <https://trac.macports.org/ticket/42380>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list