Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Compilation of v0.11.8 fails on Solaris 10 and some Illumos distros due to missing libproc.h #6439

Closed
ptribble opened this issue Oct 30, 2013 · 18 comments
Assignees
Milestone

Comments

@ptribble
Copy link

Building recent v0.11.X source on Solaris 10 fails with:

../deps/mdb_v8/mdb_v8.c:53:21: fatal error: libproc.h: No such file or directory
compilation terminated.

That's expected. The interfaces in libproc.h are private and the header file is explicitly excluded from packaging, so this will be true of Solaris and most Illumos-based distros. (I suspect you don't realize this for SmartOS, because it ends up in the proto area.)

I can work around this by explicitly turning off node_use_mdb in the configure script, but this ought to be handled properly.

@bnoordhuis
Copy link
Member

/cc @tjfontaine and @davepacheco

@davepacheco
Copy link

cc @rmustacc. I'm not sure what we intend to assume about the build
machine. @ptribble, does that mean on an S10 system, it's impossible to
build an MDB module that uses libproc.h outside of the ON source tree
itself?

@ptribble
Copy link
Author

On S10, I presume it would be impossible to build an MDB module that uses libproc.h at all; unless you copied the header from ON and the interfaces were still compatible. But the same difficulty arises on OpenIndiana, OmniOS, et al - libproc.h isn't shipped in any package, so you have to go to the ON source. (But at least on an Illumos distro, you can use the binary builds from nodejs.org, so building it is less of an issue.)

@awreece
Copy link

awreece commented Oct 17, 2014

Can we get an update on this issue please?

@davepacheco
Copy link

I don't have much of an update, but it occurs to me that the dmod also makes use of illumos-specific MDB module API additions. So it won't build on S10 even with the libproc.h issue resolved. The best solution is probably to patch the "configure" script to set node_use_mdb to false on S10.

cgalibern added a commit to cgalibern/node that referenced this issue Mar 6, 2015
We need a way to disable node_use_mdb on non Illumos derivated, because of missing libproc.h.
    
Example:
    ./configure --dest-cpu=x64  --dest-os=solaris --prefix=/opt/node --without-mdb
    creating  ./icu_config.gypi
    { 'target_defaults': { 'cflags': [],
                           'default_configuration': 'Release',
                           'defines': [],
                           'include_dirs': [],
                           'libraries': []},
      'variables': { 'clang': 0,
                     'gcc_version': 48,
                     'host_arch': 'ia32',
                     'icu_small': 'false',
                     'node_install_npm': 'true',
                     'node_prefix': '/opt/node',
                     'node_shared_cares': 'false',
                     'node_shared_http_parser': 'false',
                     'node_shared_libuv': 'false',
                     'node_shared_openssl': 'false',
                     'node_shared_v8': 'false',
                     'node_shared_zlib': 'false',
                     'node_tag': '',
                     'node_use_dtrace': 'true',
                     'node_use_etw': 'false',
                     'node_use_mdb': 'false',
                     'node_use_openssl': 'true',
                     'node_use_perfctr': 'false',
                     'openssl_no_asm': 0,
                     'python': '/usr/bin/python',
                     'target_arch': 'x64',
                     'uv_library': 'static_library',
                     'uv_parent_path': '/deps/uv/',
                     'uv_use_dtrace': 'true',
                     'v8_enable_gdbjit': 0,
                     'v8_enable_i18n_support': 0,
                     'v8_no_strict_aliasing': 1,
                     'v8_optimized_debug': 0,
                     'v8_random_seed': 0,
                     'v8_use_snapshot': 'true',
                     'want_separate_host_toolset': 1}}
    creating  ./config.gypi
    creating  ./config.mk
cgalibern added a commit to cgalibern/node that referenced this issue Mar 8, 2015
configure: add --without-mdb flag (fix issue nodejs#6439)
smanders pushed a commit to externpro-archive/node-v0.x-archive that referenced this issue Apr 9, 2015
We need a way to disable node_use_mdb on non Illumos derivated, because of missing libproc.h.

Example:
    ./configure --dest-cpu=x64  --dest-os=solaris --prefix=/opt/node --without-mdb
    creating  ./icu_config.gypi
    { 'target_defaults': { 'cflags': [],
                           'default_configuration': 'Release',
                           'defines': [],
                           'include_dirs': [],
                           'libraries': []},
      'variables': { 'clang': 0,
                     'gcc_version': 48,
                     'host_arch': 'ia32',
                     'icu_small': 'false',
                     'node_install_npm': 'true',
                     'node_prefix': '/opt/node',
                     'node_shared_cares': 'false',
                     'node_shared_http_parser': 'false',
                     'node_shared_libuv': 'false',
                     'node_shared_openssl': 'false',
                     'node_shared_v8': 'false',
                     'node_shared_zlib': 'false',
                     'node_tag': '',
                     'node_use_dtrace': 'true',
                     'node_use_etw': 'false',
                     'node_use_mdb': 'false',
                     'node_use_openssl': 'true',
                     'node_use_perfctr': 'false',
                     'openssl_no_asm': 0,
                     'python': '/usr/bin/python',
                     'target_arch': 'x64',
                     'uv_library': 'static_library',
                     'uv_parent_path': '/deps/uv/',
                     'uv_use_dtrace': 'true',
                     'v8_enable_gdbjit': 0,
                     'v8_enable_i18n_support': 0,
                     'v8_no_strict_aliasing': 1,
                     'v8_optimized_debug': 0,
                     'v8_random_seed': 0,
                     'v8_use_snapshot': 'true',
                     'want_separate_host_toolset': 1}}
    creating  ./config.gypi
    creating  ./config.mk
@jasnell
Copy link
Member

jasnell commented Jun 3, 2015

@ptribble @davepacheco ... any updates on this one?

@ptribble
Copy link
Author

ptribble commented Jun 4, 2015

I'm manually patching configure to disable mdb on Solaris 10, which seems to work.

On other illumos variants I'm temporarily dropping in a copy of libproc.h (and currently adding an unversioned symlink for libavl.so.1, although that should shortly be unnecessary). Ideally the fix would be on the illumos side, to make libproc a public and committed interface.

@rmustacc
Copy link

rmustacc commented Jun 4, 2015

Which is something I'm slowly working on from the illumos side.

@dago
Copy link

dago commented Jun 12, 2015

Would it be possible to merge the above commits to a release version?

@jasnell
Copy link
Member

jasnell commented Jun 24, 2015

@joyent/node-tsc @orangemocha @misterdjules ... any thoughts? should we land this here or defer to the converged repo?

@cgalibern
Copy link

I have proposed this pull request #9349 , it allow configure --without-mdb.
Is it possible to merge it ?
thanks

@jasnell
Copy link
Member

jasnell commented Jun 25, 2015

@misterdjules @orangemocha ... what do you think?

@misterdjules
Copy link

@jasnell #9349 seems like it would be useful.

@orangemocha
Copy link
Contributor

I am really out of my depth here, but would it make sense to set node_use_mdb to false by default for Solaris? It's the only platform for which it's set to true.

The original change is here: e851fef

Also, #9349 is against master. It should probably be rebased against v0.12.

@misterdjules
Copy link

@orangemocha Let's continue the discussion in #9349. Thank you 👍

@misterdjules misterdjules added this to the 0.12.6 milestone Jun 25, 2015
@misterdjules
Copy link

Added the P-1 label because it prevents Solaris and derivatives' users from building Node.js on their platform.

@misterdjules misterdjules modified the milestones: 0.12.6, 0.12.7, 0.12.8 Jul 6, 2015
@ip1981
Copy link

ip1981 commented Jul 14, 2015

libproc is used to be a private interface.

misterdjules pushed a commit to misterdjules/node that referenced this issue Jul 17, 2015
Fixes build issues on Solaris based platforms where libproc.h is not
available or not compatible with the one shipped by SmartOS.

Fixes nodejs#6439.
@misterdjules misterdjules self-assigned this Jul 17, 2015
misterdjules pushed a commit to misterdjules/node that referenced this issue Jul 17, 2015
Add a configuration flag that prevents mdb_v8.so from being built.
The default behavior is still the same and mdb_v8.so is built by default
on Solaris based platforms such as SmartOS.

Using --without-mdb fixes build issues on Solaris based platforms where
libproc.h is not available or not compatible with the one shipped by
SmartOS.

Fixes nodejs#6439.
misterdjules pushed a commit that referenced this issue Jul 17, 2015
Add a configuration flag that prevents mdb_v8.so from being built.
The default behavior is still the same and mdb_v8.so is built by default
on Solaris based platforms such as SmartOS.

Using --without-mdb fixes build issues on Solaris based platforms where
libproc.h is not available or not compatible with the one shipped by
SmartOS.

Fixes #6439.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: #25707
@misterdjules
Copy link

Fixed with 8b81f98, thank you @cgalibern 👍

smanders pushed a commit to externpro-archive/node-v0.x-archive that referenced this issue Oct 13, 2015
We need a way to disable node_use_mdb on non Illumos derivated, because of missing libproc.h.

Example:
    ./configure --dest-cpu=x64  --dest-os=solaris --prefix=/opt/node --without-mdb
    creating  ./icu_config.gypi
    { 'target_defaults': { 'cflags': [],
                           'default_configuration': 'Release',
                           'defines': [],
                           'include_dirs': [],
                           'libraries': []},
      'variables': { 'clang': 0,
                     'gcc_version': 48,
                     'host_arch': 'ia32',
                     'icu_small': 'false',
                     'node_install_npm': 'true',
                     'node_prefix': '/opt/node',
                     'node_shared_cares': 'false',
                     'node_shared_http_parser': 'false',
                     'node_shared_libuv': 'false',
                     'node_shared_openssl': 'false',
                     'node_shared_v8': 'false',
                     'node_shared_zlib': 'false',
                     'node_tag': '',
                     'node_use_dtrace': 'true',
                     'node_use_etw': 'false',
                     'node_use_mdb': 'false',
                     'node_use_openssl': 'true',
                     'node_use_perfctr': 'false',
                     'openssl_no_asm': 0,
                     'python': '/usr/bin/python',
                     'target_arch': 'x64',
                     'uv_library': 'static_library',
                     'uv_parent_path': '/deps/uv/',
                     'uv_use_dtrace': 'true',
                     'v8_enable_gdbjit': 0,
                     'v8_enable_i18n_support': 0,
                     'v8_no_strict_aliasing': 1,
                     'v8_optimized_debug': 0,
                     'v8_random_seed': 0,
                     'v8_use_snapshot': 'true',
                     'want_separate_host_toolset': 1}}
    creating  ./config.gypi
    creating  ./config.mk
jBarz pushed a commit to ibmruntimes/node that referenced this issue Nov 4, 2016
Add a configuration flag that prevents mdb_v8.so from being built.
The default behavior is still the same and mdb_v8.so is built by default
on Solaris based platforms such as SmartOS.

Using --without-mdb fixes build issues on Solaris based platforms where
libproc.h is not available or not compatible with the one shipped by
SmartOS.

Fixes nodejs#6439.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: nodejs#25707
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests