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

v0.12 Binaries for sunos do not work on Solaris 11.2 - Error: listen EPROTOTYPE #9282

Closed
GeorgeBailey opened this issue Feb 25, 2015 · 13 comments

Comments

@GeorgeBailey
Copy link

I tried on both the x86 and x64 versions with same results.

root@myhost:/mydir/opt# node-v0.10.36-sunos-x64/bin/node -e "require('http').createServer().listen(8080)"

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen Unknown system errno 98
    at errnoException (net.js:905:11)
    at Server._listen2 (net.js:1024:19)
    at listen (net.js:1065:10)
    at Server.listen (net.js:1139:5)
    at [eval]:1:32
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:456:26)
    at evalScript (node.js:559:25)
    at startup (node.js:80:7)
    at node.js:929:3
root@myhost:/surfn/opt# node-v0.12.0-sunos-x64/bin/node -e "require('http').createServer().listen(8080)"
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: listen EPROTOTYPE
    at exports._errnoException (util.js:746:11)
    at Server._listen2 (net.js:1112:19)
    at listen (net.js:1155:10)
    at Server.listen (net.js:1240:5)
    at [eval]:1:32
    at Object.exports.runInThisContext (vm.js:74:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:460:26)
    at evalScript (node.js:431:25)
    at startup (node.js:90:7)
root@myhost:/mydir/opt# 

I've managed for now using Peter Tribble's build for Solaris 10, on my Solaris 11.2 machine. However, this should not be necessary, and I'd rather rely on the official build in case some of my work is brought into question down the road.

@piscisaureus
Copy link

Could it be that your Solaris version doesn't support IPv6?

@GeorgeBailey
Copy link
Author

I have disabled IPv6 intentionally. Is this the problem? Is there a way I can tell my app not to listen on IPv6? I already tried specifying the IPv4 address to listen on but am not 100% sure if I did it thoroughly. Let me know if you want me to run some test code and post the results.

@cgalibern
Copy link

It looks like same issues as this one: #7004
you need to build manually node from source code.

cgalibern added a commit to cgalibern/node that referenced this issue Mar 6, 2015
@GeorgeBailey
Copy link
Author

@cgalibern, Does this commit solve the problem?

@cgalibern
Copy link

Yes you can try:

git clone https://github.com/cgalibern/node.git
cd node
./configure --dest-cpu=x64  --dest-os=solaris --prefix=/opt/node --without-mdb
gmake

@GeorgeBailey
Copy link
Author

Thanks to the --without-mdb option, I got a lot further. However I received the following error
Node.js compile error: could not find objdump
Check that GNU binutils are installed and included in PATH

which gobjcopy outputs /usr/bin/gobjcopy

Let me know if you need more details.

@cgalibern
Copy link

Hi George,
you will find it into pkg 'developer/gnu-binutils', so you need 'pkg install developer/build/gnu-make'
I have used developer/gcc-48 to compile

@cgalibern
Copy link

Hi George,
Any news about your issue ?

@jasnell
Copy link
Member

jasnell commented Jun 25, 2015

@GeorgeBailey ... is this still an issue?

@GeorgeBailey
Copy link
Author

@cgalibern, @jasnell Yes,

I tried again with Node.JS v0.12.5 (latest version) pre-compiled and am still getting EPROTOTYPE (new line numbers)

So I tried from source, and still got the
Node.js compile error: could not find objdump
Check that GNU binutils are installed and included in PATH
during compile.

details on my building from source

On pkg install developer/build/gnu-make I'm getting No updates necessary for this image.. Maybe it's redundant to the pkg install gcc git mercurial I ran previously.

Seeing the package is i=installed with pkg list, I tried to build from source.

mkdir /gb/opt/github-cgalibern
cd /gb/opt/github-cgalibern
git clone https://github.com/cgalibern/node.git
cd node
export CC=/usr/bin/gcc
./configure --dest-cpu=x64  --dest-os=solaris --prefix=`pwd` --without-mdb
gmake

Followed by enormous output, ending in the same error.

  g++ '-D_GLIBCXX_USE_C99_MATH' '-DNODE_WANT_INTERNALS=1' '-DARCH="x64"' '-DNODE_TAG=""' '-DNODE_V8_OPTIONS=""' '-DHAVE_OPENSSL=1' '-DHAVE_DTRACE=1' '-D__POSIX__' '-DPLATFORM="sunos"' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/gb/opt/github-cgalibern/node/out/Release/obj/gen -I../deps/debugger-agent/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -m64 -pthreads -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /gb/opt/github-cgalibern/node/out/Release/.deps//gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/udp_wrap.o.d.raw  -c -o /gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/udp_wrap.o ../src/udp_wrap.cc
  g++ '-D_GLIBCXX_USE_C99_MATH' '-DNODE_WANT_INTERNALS=1' '-DARCH="x64"' '-DNODE_TAG=""' '-DNODE_V8_OPTIONS=""' '-DHAVE_OPENSSL=1' '-DHAVE_DTRACE=1' '-D__POSIX__' '-DPLATFORM="sunos"' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/gb/opt/github-cgalibern/node/out/Release/obj/gen -I../deps/debugger-agent/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -m64 -pthreads -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /gb/opt/github-cgalibern/node/out/Release/.deps//gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/uv.o.d.raw  -c -o /gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/uv.o ../src/uv.cc
  g++ '-D_GLIBCXX_USE_C99_MATH' '-DNODE_WANT_INTERNALS=1' '-DARCH="x64"' '-DNODE_TAG=""' '-DNODE_V8_OPTIONS=""' '-DHAVE_OPENSSL=1' '-DHAVE_DTRACE=1' '-D__POSIX__' '-DPLATFORM="sunos"' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/gb/opt/github-cgalibern/node/out/Release/obj/gen -I../deps/debugger-agent/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -m64 -pthreads -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /gb/opt/github-cgalibern/node/out/Release/.deps//gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/util.o.d.raw  -c -o /gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/util.o ../src/util.cc
  g++ '-D_GLIBCXX_USE_C99_MATH' '-DNODE_WANT_INTERNALS=1' '-DARCH="x64"' '-DNODE_TAG=""' '-DNODE_V8_OPTIONS=""' '-DHAVE_OPENSSL=1' '-DHAVE_DTRACE=1' '-D__POSIX__' '-DPLATFORM="sunos"' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/gb/opt/github-cgalibern/node/out/Release/obj/gen -I../deps/debugger-agent/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -m64 -pthreads -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /gb/opt/github-cgalibern/node/out/Release/.deps//gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_crypto.o.d.raw  -c -o /gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_crypto.o ../src/node_crypto.cc
  g++ '-D_GLIBCXX_USE_C99_MATH' '-DNODE_WANT_INTERNALS=1' '-DARCH="x64"' '-DNODE_TAG=""' '-DNODE_V8_OPTIONS=""' '-DHAVE_OPENSSL=1' '-DHAVE_DTRACE=1' '-D__POSIX__' '-DPLATFORM="sunos"' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/gb/opt/github-cgalibern/node/out/Release/obj/gen -I../deps/debugger-agent/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -m64 -pthreads -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /gb/opt/github-cgalibern/node/out/Release/.deps//gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_crypto_bio.o.d.raw  -c -o /gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_crypto_bio.o ../src/node_crypto_bio.cc
  g++ '-D_GLIBCXX_USE_C99_MATH' '-DNODE_WANT_INTERNALS=1' '-DARCH="x64"' '-DNODE_TAG=""' '-DNODE_V8_OPTIONS=""' '-DHAVE_OPENSSL=1' '-DHAVE_DTRACE=1' '-D__POSIX__' '-DPLATFORM="sunos"' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/gb/opt/github-cgalibern/node/out/Release/obj/gen -I../deps/debugger-agent/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -m64 -pthreads -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /gb/opt/github-cgalibern/node/out/Release/.deps//gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_crypto_clienthello.o.d.raw  -c -o /gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_crypto_clienthello.o ../src/node_crypto_clienthello.cc
  g++ '-D_GLIBCXX_USE_C99_MATH' '-DNODE_WANT_INTERNALS=1' '-DARCH="x64"' '-DNODE_TAG=""' '-DNODE_V8_OPTIONS=""' '-DHAVE_OPENSSL=1' '-DHAVE_DTRACE=1' '-D__POSIX__' '-DPLATFORM="sunos"' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/gb/opt/github-cgalibern/node/out/Release/obj/gen -I../deps/debugger-agent/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -m64 -pthreads -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /gb/opt/github-cgalibern/node/out/Release/.deps//gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/tls_wrap.o.d.raw  -c -o /gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/tls_wrap.o ../src/tls_wrap.cc
  g++ '-D_GLIBCXX_USE_C99_MATH' '-DNODE_WANT_INTERNALS=1' '-DARCH="x64"' '-DNODE_TAG=""' '-DNODE_V8_OPTIONS=""' '-DHAVE_OPENSSL=1' '-DHAVE_DTRACE=1' '-D__POSIX__' '-DPLATFORM="sunos"' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/gb/opt/github-cgalibern/node/out/Release/obj/gen -I../deps/debugger-agent/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -m64 -pthreads -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /gb/opt/github-cgalibern/node/out/Release/.deps//gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_dtrace.o.d.raw  -c -o /gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_dtrace.o ../src/node_dtrace.cc
  LD_LIBRARY_PATH=/gb/opt/github-cgalibern/node/out/Release/lib.host:/gb/opt/github-cgalibern/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p /gb/opt/github-cgalibern/node/out/Release/obj/gen; tools/genv8constants.py "/gb/opt/github-cgalibern/node/out/Release/obj/gen/v8constants.h" "/gb/opt/github-cgalibern/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a"

      Node.js compile error: could not find objdump

      Check that GNU binutils are installed and included in PATH

  LD_LIBRARY_PATH=/gb/opt/github-cgalibern/node/out/Release/lib.host:/gb/opt/github-cgalibern/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p /gb/opt/github-cgalibern/node/out/Release/obj.target/node/src; dtrace -64 "-I/gb/opt/github-cgalibern/node/out/Release/obj/gen" -Isrc -C -G -s src/v8ustack.d -o "/gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_dtrace_ustack.o"
dtrace: failed to compile script src/v8ustack.d: line 399: failed to resolve V8DBG_OFF_FP_CONTEXT: Unknown variable name
gmake[1]: *** [/gb/opt/github-cgalibern/node/out/Release/obj.target/node/src/node_dtrace_ustack.o] Error 1
gmake[1]: Leaving directory `/gb/opt/github-cgalibern/node/out'
gmake: *** [node] Error 2

@jasnell
Copy link
Member

jasnell commented Jun 29, 2015

@misterdjules ... any thoughts?

@misterdjules
Copy link

@GeorgeBailey That looks similar to #7933. Did you make sure that objdump is in your PATH when building node?

@GeorgeBailey
Copy link
Author

I tried building from cgalibern's fork again with export PATH=$PATH:/usr/gnu/bin and it worked. v0.12 is pretty old now. I posted an issue on the new repo for v4.2.0.

@GeorgeBailey GeorgeBailey changed the title Binaries for sunos do not work on Solaris 11.2 - Error: listen EPROTOTYPE v0.12 Binaries for sunos do not work on Solaris 11.2 - Error: listen EPROTOTYPE Oct 13, 2015
@Trott Trott closed this as completed Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants