Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

OS X 10.5 "dyld: unknown required load command 0x80000022". #910

Closed
Skeeve opened this Issue · 16 comments

6 participants

@Skeeve

I'd still like to know how to fix that "unknown required load command" issue.

Just a short comment about Removing nodde.js by "rm which node": Stop kidding. At least the man page remains unremoved.

@Skeeve

Comment about undeleting: http://www.hexorcist.com/wordpress/2010/12/26/uninstalling-osx-pkg-files/

Don't close the issue. I'd still like it to be fixed.

@Skeeve Skeeve closed this
@Skeeve Skeeve reopened this
@ry
ry commented

you need to provide more information. it sounds like you're trying to load an addon which wasn't compile with the current version of node.

@Skeeve

I have no more information.

I installed node.js using the package downloaded from the node.js page.

Then I created the example.js, taken from the main page:

$ cat example.js

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8124, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');

and try to start it

$ node example.js

dyld: unknown required load command 0x80000022
Trace/BPT trap

@rtsuk

Check out http://developer.apple.com/library/mac/#technotes/tn2004/tn2124.html%23SECDYLD for environmental variables you can set to get a lot more information out of the dynamic linker.

@Skeeve

Okay… I've set the variables but this doesn't tell me anything more:

$ node example.js

opt[0] = "node"
opt[1] = "example.js"
MANPATH=/opt/local/share/man:/usr/share/man:/usr/local/share/man:/usr/X11/man:/usr/local/git/share/man:/usr/local/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
TMPDIR=/var/folders/aC/aC5qXaOpGluB8a2SSXjCM++++TM/-Tmp-/
Apple_PubSub_Socket_Render=/tmp/launch-E8olBq/Render
TERM_PROGRAM_VERSION=240.2
OLDPWD=/Users/skeeve/Documents
DYLD_NO_FIX_PREBINDING=1
USER=skeeve
DYLD_PRINT_BINDINGS=1
DYLD_BIND_AT_LAUNCH=1
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-k2n1D2/Listeners
__CF_USER_TEXT_ENCODING=0x1F6:0:3
DYLD_PRINT_LIBRARIES=1
DYLD_PRINT_LIBRARIES_POST_LAUNCH=1
PATH=/Users/skeeve/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/local/mysql/bin
DYLD_PRINT_DOFS=1
DYLD_DISABLE_DOFS=1
PWD=/Users/skeeve
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
DYLD_PRINT_APIS=1
LANG=de_DE.UTF-8
DYLD_INSERT_LIBRARIES=1
PS1=\033]0;\w\007\033[7m \u@\h:\w \033[0m\n$
DYLD_PRINT_STATISTICS=1
DYLD_FORCE_FLAT_NAMESPACE=1
DYLD_PRINT_OPTS=1
SHLVL=1
HOME=/Users/skeeve
DYLD_PRINT_INITIALIZERS=1
DYLD_PRINT_SEGMENTS=1
LOGNAME=skeeve
DYLD_PRINT_REBASINGS=1
DYLD_PRINT_ENV=1
DYLD_IMAGE_SUFFIX=1
DISPLAY=/tmp/launch-uRB6Hv/:0
SECURITYSESSIONID=bae5b0
_=/usr/bin/node
dyld: unknown required load command 0x80000022
Trace/BPT trap

@Skeeve

Some more info: Just calling "node" gives the same error. So it's not the example.js which makes it fail.

Running sudo dtruss node.js gives:

dyld: unknown required load command 0x80000022
SYSCALL(args) = return
issetugid(0x100000000, 0x7FFF5FBFFB60, 0x7FFF5FC311C8) = 0 0
sigprocmask(0x1, 0x0, 0x7FFF5FBFE360) = 0x0 0
write_nocancel(0x2, "dyld: unknown required load comm\0", 0x20) = 32 0
write_nocancel(0x2, "and 0x80000022\n\0", 0xF) = 15 0

@rtsuk

If you managed to get DYLD_PRINT_LIBRARIES set to 1 in your environment before running node you would see a lot of additional printing. For example, when I execute the following two commands from the shell:

export DYLD_PRINT_LIBRARIES=1
node

I see

dyld: loaded: /Users/robtsuk/local/bin/node
dyld: loaded: /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
dyld: loaded: /opt/local/lib/libssl.1.0.0.dylib
dyld: loaded: /opt/local/lib/libcrypto.1.0.0.dylib
dyld: loaded: /opt/local/lib/libz.1.dylib
dyld: loaded: /usr/lib/libSystem.B.dylib
dyld: loaded: /usr/lib/libutil.dylib
dyld: loaded: /usr/lib/libstdc++.6.dylib

and a lot more.

That said, the stack overflow discussion at http://stackoverflow.com/questions/1440456/static-libraries-in-version-cross-compiled-program might be helpful.

Are you running this instance of node on the same computer on which you built it?

@ry
ry commented

i suspect something strange happened: like you upgraded the libssl.so to a new version with incompatible ABI. Please recompile node from source and attempt again.

@Skeeve

$ export DYLD_PRINT_LIBRARIES=1

$ node

dyld: unknown required load command 0x80000022
Trace/BPT trap

I didn't want to compile. Compiling was - in most cases - a huge amount of time wasted for something which in the end didn't work at all :( So I was glad there was a compiled node.js.

@Skeeve

Wasted time again, I fear:

Undefined symbols:
"_BIO_test_flags", referenced from:
node::crypto::Connection::HandleBIOError(bio_st, char const, int)in node_crypto_4.o
node::crypto::Connection::HandleBIOError(bio_st, char const, int)in node_crypto_4.o
node::crypto::Connection::HandleBIOError(bio_st, char const, int)in node_crypto_4.o
"_EVP_CIPHER_CTX_block_size", referenced from:
node::crypto::Decipher::DecipherUpdate(v8::Arguments const&)in node_crypto_4.o
node::crypto::Decipher::DecipherFinal(v8::Arguments const&)in node_crypto_4.o
node::crypto::Decipher::DecipherFinalTolerate(v8::Arguments const&)in node_crypto_4.o
node::crypto::Cipher::CipherUpdate(v8::Arguments const&)in node_crypto_4.o
node::crypto::Cipher::CipherUpdate(v8::Arguments const&)in node_crypto_4.o
node::crypto::Cipher::CipherFinal(v8::Arguments const&)in node_crypto_4.o
"_BIO_set_flags", referenced from:
node::crypto::base64(unsigned char, int, char, int)in node_crypto_4.o
node::crypto::unbase64(unsigned char, int, char, int)in node_crypto_4.o
"_EVP_CIPHER_iv_length", referenced from:
node::crypto::Decipher::DecipherInitIv(v8::Arguments const&)in node_crypto_4.o
node::crypto::Cipher::CipherInitIv(v8::Arguments const&)in node_crypto_4.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

@Skeeve

$ otool -L /usr/bin/node
/usr/bin/node:

/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)

/usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)

/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)

/usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0)

/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)

/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.42.0)

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0)

Correct me if I'm wrong, but node seems to require libssl version 0.9.8. But OS X 10.5 just hast 0.9.7

Compiling also seems to fail because some features(?) of 0.9.8 seem to be required. Why didn't configure notice? :-(

@ry
ry commented

closing. we do not distribute binaries. i will not debug something you haven't compiled yourself.

@ry ry closed this
@Skeeve Skeeve reopened this
@Skeeve

WTF?

  1. When was the binary removed?

  2. Did you read what I wrote?

  3. If so what did this implay?

Undefined symbols:
"_BIO_test_flags", referenced from: node::crypto::Connection::HandleBIOError(bio_st, char const, int)in node_crypto_4.o node::crypto::Connection::HandleBIOError(bio_st, char const, int)in node_crypto_4.o node::crypto::Connection::HandleBIOError(bio_st, char const, int)in node_crypto_4.o "_EVP_CIPHER_CTX_block_size", referenced from: node::crypto::Decipher::DecipherUpdate(v8::Arguments const&)in node_crypto_4.o node::crypto::Decipher::DecipherFinal(v8::Arguments const&)in node_crypto_4.o node::crypto::Decipher::DecipherFinalTolerate(v8::Arguments const&)in node_crypto_4.o node::crypto::Cipher::CipherUpdate(v8::Arguments const&)in node_crypto_4.o node::crypto::Cipher::CipherUpdate(v8::Arguments const&)in node_crypto_4.o node::crypto::Cipher::CipherFinal(v8::Arguments const&)in node_crypto_4.o "_BIO_set_flags", referenced from: node::crypto::base64(unsigned char, int, char, int)in node_crypto_4.o node::crypto::unbase64(unsigned char, int, char, int)in node_crypto_4.o "_EVP_CIPHER_iv_length", referenced from: node::crypto::Decipher::DecipherInitIv(v8::Arguments const&)in node_crypto_4.o node::crypto::Cipher::CipherInitIv(v8::Arguments const&)in node_crypto_4.o ld: symbol(s) not found
collect2: ld returned 1 exit status

@Skeeve Skeeve closed this
@rvd

Compiling node without libssl on leopard still gave me the same error. ("dyld ... 0x80000022, Trace/BPT trap" )

Apparently node will compile, but not produce a working executable without setting some environment variables (found on http://canonical.org/~kragen/compiling-node-on-macos.html) :

[untar etc..]

ISYSROOT="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
export LINKFLAGS=$ISYSROOT CXXFLAGS=$ISYSROOT CFLAGS=$ISYSROOT

./configure --without-ssl
make

...
compiling succeeded and i was able to successfully run node on mac osx 10.5.8

@Christian-Achilli

Compiling succeded to me too on osx 10.5.8. Thanks

@giesse

Is the binary download from nodejs.org supposed to work on Leopard? I'm getting:

dyld: unknown required load command 0x80000022
Trace/BPT trap

node:
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)
/usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 44.0.0)
/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 44.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 53.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.19.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 41.0.0)

Do I need to compile from source? (If so it would be nice to update your download page to mention that 10.5 is not supported.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.