Not working on SmartOS #44

Closed
serby opened this Issue Oct 28, 2012 · 7 comments

Comments

Projects
None yet
2 participants

serby commented Oct 28, 2012

$ sdc-createmachine --dataset sdc:sdc:nodejs:1.4.0 --name node-dev-01 -p 'Extra Small 512 MB'

$ ssh admin@{IP}

$ nave use stable
installed from binary
using 0.8.14
[admin@node-dev-01 ~]$ node -v
ld.so.1: node: fatal: libstdc++.so.6: open failed: No such file or directory
Killed

serby commented Oct 28, 2012

Please excuse me. It is not a problem with nave installing the wrong thing. It is the SunOS binary that is causing the error.

Owner

isaacs commented Oct 29, 2012

The SunOS binary works for me on SmartOS.

$ env | grep NAVE
NAVE=0.8.14
NAVENAME=0.8.14
NAVE_DIR=/home/isaacs/.nave
NAVEPATH=/home/isaacs/.nave/installed/0.8.14/bin
NAVE_ROOT=/home/isaacs/.nave/installed
NAVEVERSION=0.8.14
NAVE_LOGIN=1
NAVELVL=1
NAVE_SRC=/home/isaacs/.nave/src

$ node -v
v0.8.14

$ node -pe 'console.log("foo")'
foo
undefined

$ which node
/home/isaacs/.nave/installed/0.8.14/bin/node

@isaacs isaacs closed this Oct 29, 2012

Owner

isaacs commented Oct 29, 2012

Maybe you have an older version of SmartOS, or a weird LD_PATH or something?

serby commented Oct 30, 2012

This is with the newest SmartOS (dataset sdc:sdc:nodejs:1.4.0 derived from the most recent base)

  $ sdc-createmachine --dataset sdc:sdc:nodejs:1.4.0 --name node-dev-01 -p 'Extra Small 512 MB'

  $uname -a 

  SunOS node-drone-02.local 5.11 joyent_20120912T055050Z i86pc i386 i86pc Solaris

Setting LD_LIBRARY_PATH to the custom location fixes the problem, but that's not a permanent solution.

  export LD_LIBRARY_PATH="/opt/local/gcc47/lib/"
  node -v

This touches on the issue joyent/node#3741

Will it be possible to compile the binaries so that they work with custom library paths?

Owner

isaacs commented Oct 30, 2012

What does pkgin se gcc output?

Owner

isaacs commented Oct 30, 2012

The smartos drone I build the binaries on is sdc:sdc:smartos:1.5.4. Here's the gcc stuff I have installed:

$ pkgin se gcc
gcc-compiler-4.6.1 = GNU Compiler Collection 4.6
gcc-runtime-4.6.1 =  GNU Compiler Collection 4.6 Runtime libs
gcc-tools-0 =        Subset of binutils needed for GCC

serby commented Oct 30, 2012

On the base (sdc:sdc:base:1.7.2) and node.js mongodb (sdc:sdc:nodejs:1.4.0) datasets gcc 4.7 is installed

  [admin@node-drone-05 ~]$ pkgin se gcc
  gcc47-runtime-4.7.0nb1 = The GNU Compiler Collection (GCC) - 4.7 Release Series
  gcc47-4.7.0nb1       The GNU Compiler Collection (GCC) - 4.7 Release Series

  [admin@node-drone-05 ~]$ pkgin pkg-descr gcc47-runtime-4.7.0nb1
  Information for http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/gcc47-runtime-4.7.0nb1.tgz:
  Description:
  This package contains GCC 4.7 runtime libraries and is required
  for most Joyent pkgsrc packages to work. It is thus marked as
  non-removable once installed.
  Homepage:
  http://gcc.gnu.org/

I've spun up the dataset you use and can see that '/opt/local/lib' is in your ld.config

  [root@node-drone-06 /home/admin]# crle

  Configuration file [version 4]: /var/ld/ld.config  
    Platform:     32-bit LSB 80386
    Default Library Path (ELF):   /lib:/usr/lib:/opt/local/lib
    Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)

  Command line:
    crle -c /var/ld/ld.config -l /lib:/usr/lib:/opt/local/lib

on the newer machines that have gcc 4.7, it is missing:

  [admin@node-drone-05 ~]$ crle

  Configuration file [version 4]: /var/ld/ld.config  
    Platform:     32-bit LSB 80386
    Default Library Path (ELF):   /lib:/usr/lib
    Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)

  Command line:
    crle -c /var/ld/ld.config -l /lib:/usr/lib

I'll report this as a potential issue to the dataset maintainer and stop wasting your time.

@serby serby referenced this issue in nodejs/node-v0.x-archive Oct 31, 2012

Closed

Publish node binaries for other unix platforms #3741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment