pyston / pyston_v1

The previous version of Pyston, a faster implementation of the Python programming language. Please use this link for the new repository:
https://github.com/pyston/pyston/
4.89k stars 289 forks source link

clang: error: linker command failed with exit code 1 #102

Closed ealataur closed 9 years ago

ealataur commented 10 years ago

ilfiron@gentoo ~/pyston/src $ make check -j4 make lint make[1]: Вход в каталог /home/ilfiron/pyston/src' pyston: linting... Lint checks passed make[1]: Выход из каталога/home/ilfiron/pyston/src' make ext pyston_dbg make[1]: Вход в каталог /home/ilfiron/pyston/src' cc -O2 -fPIC -Wimplicit -I../include -c ../test/test_extension/test.c -o ../test/test_extension/test.o -g pyston: Compiling runtime/inline/xrange.o.bc pyston: Compiling ../tools/publicize.o pyston: Compiling runtime/inline/boxing.o.bc pyston: Compiling runtime/inline/link_forcer.o.bc pyston: Compiling runtime/inline/list.o.bc pyston: Compiling runtime/inline/dict.o.bc pyston: Compiling runtime/inline/tuple.o.bc pyston: Compiling runtime/inline/gc_runtime.o.bc pyston: Compiling codegen/irgen.h.pch pyston: Compiling asm_writing/assembler.o pyston: Compiling asm_writing/rewriter.o pyston: Compiling asm_writing/icinfo.o pyston: Compiling asm_writing/rewriter2.o pyston: Compiling asm_writing/mc_writer.o pyston: Compiling analysis/scoping_analysis.o pyston: Compiling analysis/type_analysis.o pyston: Compiling analysis/function_analysis.o pyston: Compiling core/stats.o pyston: Compiling core/cfg.o pyston: Compiling core/threading.o pyston: Compiling core/ast.o pyston: Compiling core/options.o pyston: Compiling core/util.o pyston: Compiling jit.o pyston: Compiling codegen/profiling/profiling.o pyston: Compiling codegen/profiling/dumprof.o pyston: Compiling runtime/set.o pyston: Compiling runtime/objmodel.o pyston: Compiling runtime/capi.o pyston: Compiling runtime/bool.o pyston: Compiling runtime/types.o pyston: Compiling runtime/str.o pyston: Compiling runtime/list.o pyston: Compiling runtime/dict.o pyston: Compiling runtime/float.o pyston: Compiling runtime/stacktrace.o pyston: Compiling runtime/int.o pyston: Compiling runtime/tuple.o pyston: Compiling runtime/util.o pyston: Compiling runtime/file.o pyston: Compiling runtime/builtin_modules/sys.o pyston: Compiling runtime/builtin_modules/thread.o pyston: Compiling runtime/builtin_modules/time.o pyston: Compiling runtime/builtin_modules/builtins.o pyston: Compiling runtime/builtin_modules/math.o pyston: Compiling gc/heap.o pyston: Compiling gc/root_finder.o pyston: Compiling gc/collector.o cc -shared ../test/test_extension/test.o -o ../test/test_extension/test.so -g pyston: Linking ../tools/publicize which: no gold in (/home/ilfiron/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2:/opt/android-ndk:/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin:/opt/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin:/opt/android-ndk/toolchains/llvm-3.3/prebuilt/linux-x86_64/bin:/opt/android-ndk/toolchains/llvm-3.4/prebuilt/linux-x86_64/bin:/opt/android-ndk/toolchains/mipsel-linux-android-4.6/prebuilt/linux-x86_64/bin:/opt/android-ndk/toolchains/mipsel-linux-android-4.8/prebuilt/linux-x86_64/bin:/opt/android-ndk/toolchains/renderscript/prebuilt/linux-x86_64/bin:/opt/android-ndk/toolchains/x86-4.6/prebuilt/linux-x86_64/bin:/opt/android-ndk/toolchains/x86-4.8/prebuilt/linux-x86_64/bin:/opt/android-sdk-update-manager/tools:/opt/android-sdk-update-manager/platform-tools:/usr/games/bin) gold not available ld: /home/ilfiron/pyston_deps/llvm-trunk-build/Release+Asserts/lib/libLLVMSupport.a(Process.o): undefined reference to symbol 'del_curterm' ld: note: 'del_curterm' is defined in DSO /lib64/libtinfo.so.5 so try adding it to the linker command line /lib64/libtinfo.so.5: could not read symbols: Invalid operation clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [../tools/publicize] Ошибка 1 make[1]: *** Ожидание завершения заданий... make[1]: Выход из каталога/home/ilfiron/pyston/src' make: *\ [check] Ошибка 2

What is a "gold" ?

kmod commented 10 years ago

gold is a faster linker; it's not necessary but it's much faster so if you see that message you should install it :) It's not related to the issue you're running into, though.

I'm not sure why you're running into difficulties with libtinfo -- I think the first thing to try is adding -ltinfo to the Makefile (add it to COMMON_LDFLAGS at line 144) as the linker suggests. The could not read symbols: Invalid operation line is worrying, but it might just be a red herring.

ealataur commented 10 years ago

Thank you for you answer.

Gold is optional dependency. but without gold my trying compile the source is failed..

From INSTALLING.md "gold is highly recommended as a faster linker, and Pyston contains build-system support for automatically using gold if available" **automatically using gold if available but my system dont have a gold and build-system using it automatically.. It is not critical but obviously not

ealataur commented 10 years ago

After installing gold to pyston_deps.. Build failed http://pastebin.com/yhVKj8LN

My system: ilfiron@gentoo ~/pyston/src $ uname -a Linux gentoo 3.14.0-pf2 #8 SMP PREEMPT Mon May 26 18:16:34 ICT 2014 x86_64 Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz GenuineIntel GNU/Linux

P.S. I'am python developer and I very intresting for using Pyston

kmod commented 10 years ago

Even though gold is optional, the build can still fail for other reasons :)

I'm not sure why you're running into these link errors -- can you add V=1 to your make invocation, ie something like make V=1 and post the output? By default the build system hides the full command lines of what it runs but the V=1 flag will display them.

ealataur commented 10 years ago

http://pastebin.com/UCqSxLuk

kmod commented 10 years ago

I can't view that paste :/

ealataur commented 10 years ago

http://pastebin.com/8PfZyeSP

kmod commented 10 years ago

(In the future turning off parallelism makes these outputs easier to read) Can you try adding -lncurses to COMMON_LDFLAGS on line 144 of the Makefile? Those functions seem to be from the ncurses library, and on my machine I get it by doing -lcurses, but some people also suggest -lncurses. I'm not sure what the difference is.