Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failure #1237

Closed
deutschluz opened this issue Apr 27, 2018 · 18 comments
Closed

build failure #1237

deutschluz opened this issue Apr 27, 2018 · 18 comments

Comments

@deutschluz
Copy link

deutschluz commented Apr 27, 2018

  • Node.js Version: nightly build version
  • OS: i686-pc-linux
  • Scope (install, code, runtime, meta, other?): build fails; particularly, 'make' emits errors
  • Module (and version) (if relevant):
    • make version: GNU Make 4.2
      • gcc version: GNU c compiler 7.1
    • assembler version: GNU as 2.30
    • binutils version: 2.30
  • **output og uname -a: Linux deb 4.5.0-rc6+ Update README for help #1 SMP Mon Mar 14 16:03:27 PDT 2016 i686 GNU/Linux **

I tried to build nodejs as follows at prompt in git/node dir:

configure

output to gyp files

make -j2

many errors emitted here.

@gireeshpunathil
Copy link
Member

@deutschluz - are you building it for the first time, or been doing it for a while and start failing for a specific nightly?

  • can you run make V=1 and paste here the section in the output that starts showing the errors?
  • also can you paste the output of gcc -v
  • also uname -a

@deutschluz
Copy link
Author

heres output of gcc -v:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/7.1.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ./configure
Thread model: posix
gcc version 7.1.0 (GCC)

@deutschluz
Copy link
Author

here s edited output of make -V; i edited because its alot:

cc '-DDSO_DLFCN' '-DHAVE_DLFCN_H' '-DNDEBUG' '-DOPENSSL_THREADS' '-DOPENSSL_NO_DYNAMIC_ENGINE' '-DOPENSSL_PIC' '-DOPENSSL_BN_ASM_PART_WORDS' '-DOPENSSL_IA32_SSE2' '-DOPENSSL_BN_ASM_MONT' '-DOPENSSL_BN_ASM_GF2m' '-DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DRC4_ASM' '-DMD5_ASM' '-DRMD160_ASM' '-DAES_ASM' '-DVPAES_ASM' '-DWHIRLPOOL_ASM' '-DGHASH_ASM' '-DECP_NISTZ256_ASM' '-DPADLOCK_ASM' '-DPOLY1305_ASM' '-DOPENSSLDIR="/etc/ssl"' '-DENGINESDIR="/dev/null"' '-DTERMIOS' -I../deps/openssl/openssl -I../deps/openssl/openssl/include -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/include -I../deps/openssl/openssl/crypto/modes -I../deps/openssl/config -I../deps/openssl/config/archs/linux-elf/asm/include -I../deps/openssl/openssl/include -pthread -Wall -Wextra -Wno-unused-parameter -m32 -Wall -O3 -pthread -DL_ENDIAN -fomit-frame-pointer -Wno-missing-field-initializers -Wno-old-style-declaration -O3 -fno-omit-frame-pointer -MMD -MF /home/user/Projects/git/node/out/Release/.deps//home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/x509.o.d.raw -c -o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/x509.o ../deps/openssl/openssl/apps/x509.c
g++ -pthread -rdynamic -m32 -o /home/user/Projects/git/node/out/Release/openssl-cli -Wl,--start-group /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/app_rand.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/apps.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/asn1pars.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ca.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ciphers.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/cms.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/crl.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/crl2p7.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/dgst.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/dhparam.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/dsa.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/dsaparam.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ec.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ecparam.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/enc.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/engine.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/errstr.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/gendsa.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/genpkey.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/genrsa.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/nseq.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ocsp.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/openssl.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/opt.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/passwd.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkcs12.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkcs7.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkcs8.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkey.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkeyparam.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkeyutl.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/prime.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/rand.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/rehash.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/req.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/rsa.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/rsautl.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_cb.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_client.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_server.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_socket.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_time.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/sess_id.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/smime.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/speed.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/spkac.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/srp.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ts.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/verify.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/version.o /home/user/Projects/git/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/x509.o /home/user/Projects/git/node/out/Release/obj.target/deps/openssl/libopenssl.a -ldl -pthread -Wl,--end-group
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/record/ssl3_record.o: In function ssl3_do_uncompress': ssl3_record.c:(.text+0xfa): undefined reference to COMP_expand_block'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/record/ssl3_record.o: In function ssl3_do_compress': ssl3_record.c:(.text+0x172): undefined reference to COMP_compress_block'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/record/ssl3_record.o: In function ssl3_get_record': ssl3_record.c:(.text+0x18b1): undefined reference to COMP_expand_block'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/record/ssl3_record.o: In function dtls1_process_record': ssl3_record.c:(.text+0x22f0): undefined reference to COMP_expand_block'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_ciph.o: In function do_load_builtin_compressions_ossl_': ssl_ciph.c:(.text+0x26): undefined reference to COMP_zlib'
ssl_ciph.c:(.text+0x4b): undefined reference to COMP_get_type' ssl_ciph.c:(.text+0x8b): undefined reference to COMP_get_name'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_ciph.o: In function SSL_COMP_add_compression_method': ssl_ciph.c:(.text+0x25d5): undefined reference to COMP_get_type'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_ciph.o: In function SSL_COMP_get_name': ssl_ciph.c:(.text+0x275c): undefined reference to COMP_get_name'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_lib.o: In function SSL_free.part.12': ssl_lib.c:(.text+0x6cf): undefined reference to COMP_CTX_free'
ssl_lib.c:(.text+0x6e5): undefined reference to COMP_CTX_free' /home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_lib.o: In function SSL_clear':
ssl_lib.c:(.text+0x9f9): undefined reference to COMP_CTX_free' ssl_lib.c:(.text+0xa0f): undefined reference to COMP_CTX_free'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_lib.o: In function SSL_accept': ssl_lib.c:(.text+0x2d3d): undefined reference to COMP_CTX_free'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_lib.o:ssl_lib.c:(.text+0x2d53): more undefined references to COMP_CTX_free' follow /home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_lib.o: In function SSL_get_current_compression':
ssl_lib.c:(.text+0x6b85): undefined reference to COMP_CTX_get_method' /home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_lib.o: In function SSL_get_current_expansion':
ssl_lib.c:(.text+0x6bb5): undefined reference to COMP_CTX_get_method' /home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/t1_enc.o: In function tls1_change_cipher_state':
t1_enc.c:(.text+0xc3): undefined reference to COMP_CTX_free' t1_enc.c:(.text+0xdf): undefined reference to COMP_CTX_new'
t1_enc.c:(.text+0x1c5): undefined reference to COMP_CTX_free' t1_enc.c:(.text+0x1e1): undefined reference to COMP_CTX_new'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/init.o: In function ossl_init_engine_afalg_ossl_': init.c:(.text+0x47): undefined reference to engine_load_afalg_int'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/init.o: In function OPENSSL_cleanup': init.c:(.text+0x339): undefined reference to comp_zlib_cleanup_int'
/home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/s3_enc.o: In function ssl3_change_cipher_state': s3_enc.c:(.text+0x81): undefined reference to COMP_CTX_free'
s3_enc.c:(.text+0x9b): undefined reference to COMP_CTX_new' s3_enc.c:(.text+0x126): undefined reference to COMP_CTX_free'
s3_enc.c:(.text+0x140): undefined reference to COMP_CTX_new' /home/user/Projects/git/node/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/err/err_all.o: In function err_load_crypto_strings_int':
err_all.c:(.text+0x85): undefined reference to `ERR_load_COMP_strings'
collect2: error: ld returned 1 exit status
make[1]: *** [deps/openssl/openssl-cli.target.mk:226: /home/user/Projects/git/node/out/Release/openssl-cli] Error 1
rm 65d46ee3d190480c83c2c78a74a02205e042912f.intermediate
make: *** [Makefile:85: node] Error 2

@deutschluz
Copy link
Author

3 comments:

first i didnt notice till i was cut n pasting, but the compiler used by make changes from gcc to g++;

second, all errors seem to come from openssl;

third, here is a termbin address with all output of make: http://termbin.com/3z04; its good for 1 month.

@deutschluz
Copy link
Author

my guess is i will have to change the openssl version to the more recent git repo and try to make again.

@gireeshpunathil
Copy link
Member

definitions of all the undefined symbols were wrapped in

# ifdef  __cplusplus
extern "C" {
# endif

that makes me to believe that the C and C++ compiler selection might have got cluttered.

Can you see if cc and c++ are linked to their intended targets? for example in my mac they point to clang and clang++ respectively.

#ls -lrt `which cc`
lrwxr-xr-x  1 root  wheel  5 Aug 14  2017 /usr/bin/cc -> clang
#ls -lrt `which c++`
lrwxr-xr-x  1 root  wheel  7 Aug 14  2017 /usr/bin/c++ -> clang++
#

@gireeshpunathil
Copy link
Member

my guess is i will have to change the openssl version to the more recent git repo

No, openssl source is bundled in the compatible node source, under default configurations. So that change is not necessary.

@deutschluz
Copy link
Author

deutschluz commented Apr 27, 2018

@gireeshpunathil oh thats interesting!

lrwxrwxrwx 1 root root 3 Apr 26 16:10 cc -> gcc

and the command c++ is NOT symlinked to g++. but output of g++ and c++ -v is equal. So I think they are
the same.

what should i do next then? symlink c++ to g++?

@deutschluz
Copy link
Author

No, openssl source is bundled in the compatible node source, under default configurations. So that change is not necessary.

Are you sure about that? I have built both the node version of openssl and the latest git version and i succeed in building both but the the node version does not pass 'make test' and the latest one does.

@gireeshpunathil
Copy link
Member

gireeshpunathil commented Apr 27, 2018

what should i do next then? symlink c++ to g++?

Yes. I assume (from your latest comment) you did it already, and made the build succeed?

  • how many failures?
  • are they related to ssl functions?
  • are there patterns?

@deutschluz
Copy link
Author

@gireeshpunathil after symlinking, its still failing. but i commented about having successfully built two different versions of openssl to suggest the possibility that this build failure might be due nodes build system.

@deutschluz
Copy link
Author

@gireeshpunathil the build finally got through building openssl but it still failed somewhere else. i used a different sequence of build commands. I did 'config' in the dir: /deps/openssl, which is NOT the actual openssl tarball. Then i went back to git/node and did: '/configure'; 'make -j2'.

here's the last make command and error output:

g++ -pthread -rdynamic -m32 -Wl,--whole-archive,/home/user/Projects/git/node/out/Release/obj.target/libnode.a -Wl,--no-whole-archive -Wl,--whole-archive,/home/user/Projects/git/node/out/Release/obj.target/deps/zlib/libzlib.a -Wl,--no-whole-archive -Wl,--whole-archive,/home/user/Projects/git/node/out/Release/obj.target/deps/uv/libuv.a -Wl,--no-whole-archive -Wl,-z,noexecstack -Wl,--whole-archive /home/user/Projects/git/node/out/Release/obj.target/deps/v8/gypfiles/libv8_base.a -Wl,--no-whole-archive -Wl,--whole-archive,/home/user/Projects/git/node/out/Release/obj.target/deps/openssl/libopenssl.a -Wl,--no-whole-archive -pthread -o /home/user/Projects/git/node/out/Release/node -Wl,--start-group /home/user/Projects/git/node/out/Release/obj.target/node/src/node_main.o /home/user/Projects/git/node/out/Release/obj.target/libnode.a /home/user/Projects/git/node/out/Release/obj.target/deps/v8/gypfiles/libv8_libplatform.a /home/user/Projects/git/node/out/Release/obj.target/tools/icu/libicui18n.a /home/user/Projects/git/node/out/Release/obj.target/deps/zlib/libzlib.a /home/user/Projects/git/node/out/Release/obj.target/deps/http_parser/libhttp_parser.a /home/user/Projects/git/node/out/Release/obj.target/deps/cares/libcares.a /home/user/Projects/git/node/out/Release/obj.target/deps/uv/libuv.a /home/user/Projects/git/node/out/Release/obj.target/deps/nghttp2/libnghttp2.a /home/user/Projects/git/node/out/Release/obj.target/deps/openssl/libopenssl.a /home/user/Projects/git/node/out/Release/obj.target/deps/v8/gypfiles/libv8_base.a /home/user/Projects/git/node/out/Release/obj.target/deps/v8/gypfiles/libv8_libbase.a /home/user/Projects/git/node/out/Release/obj.target/deps/v8/gypfiles/libv8_libsampler.a /home/user/Projects/git/node/out/Release/obj.target/tools/icu/libicuucx.a /home/user/Projects/git/node/out/Release/obj.target/tools/icu/libicudata.a /home/user/Projects/git/node/out/Release/obj.target/tools/icu/libicustubdata.a /home/user/Projects/git/node/out/Release/obj.target/deps/v8/gypfiles/libv8_snapshot.a -ldl -lrt -lm -Wl,--end-group
/home/user/Projects/git/node/out/Release/obj.target/node_lib/src/node_i18n.o: In function node::i18n::InitializeICUDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': node_i18n.cc:(.text+0x2dd8): undefined reference to icusmdt61_dat'
collect2: error: ld returned 1 exit status
make[1]: *** [node.target.mk:182: /home/user/Projects/git/node/out/Release/node] Error 1
rm 65d46ee3d190480c83c2c78a74a02205e042912f.intermediate
make: *** [Makefile:85: node] Error 2

@deutschluz
Copy link
Author

i m thinking of resetting and trying to rebuild with new sequence of build command from above and starting a new issue.

@gireeshpunathil
Copy link
Member

sure, this seems weird to me, so copying @srl295 to gather some insights.
[ quick summary - gcc 7 is used, symlinks for cc and c++ were messed up but fixed manually, openssl source seem to have been manually managed, lands up in undefined reference to icusmdt61_dat]

@srl295
Copy link
Member

srl295 commented Apr 28, 2018

@deutschluz shouldn't need a new issue, can you just add to this one?
Please include configure output, and even config.gypi (you can add it to termbin or attach here)

@deutschluz can you run:

nm /home/user/Projects/git/node/out/Release/obj.target/tools/icu/libicudata.a 

@gireeshpunathil
Copy link
Member

ping @deutschluz

@gireeshpunathil
Copy link
Member

closing due to inactivity, please re-open if it still an issue

@rethink-neil
Copy link

I just hit this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants