Tencent / yadcc

Yet Another Distributed C++ Compiler. yadcc是一套腾讯广告自研的分布式编译系统,用于支撑腾讯广告的日常开发及流水线。相对于已有的同类解决方案,我们针对实际的工业生产环境做了性能、可靠性、易用性等方面优化。
Other
371 stars 62 forks source link

some building problems on ubuntu #4

Closed XlousZ closed 3 years ago

XlousZ commented 3 years ago

1、error occurred under gcc8 when building python2.7. compiled successfully under gcc7

2、python: can't decompress data; zlib not available when building python2.7. solution

3、ubuntu 18.04.5(g++ 8.5)、ubuntu20.04(g++ 9.3) The same compilation error occurred when i tryed to build yadcc on my PC which installed with ubuntu 18.04.5(g++ 8.5) or ubuntu20.04(g++ 9.3), but pthread.a(/usr/lib/x86_64-linux-gnu/libpthread.a) and pthread.so(/usr/lib/x86_64-linux-gnu/libpthread.so) exist. Strangely enough, it can be compiled successfully in the company environment which installed with ubuntu 18.04.

[3/75] LINK SHARED build64_release/flare/rpc/protocol/http/builtin/librpc_form_handler.so
FAILED: build64_release/flare/rpc/protocol/http/builtin/librpc_form_handler.so
g++ -shared -o build64_release/flare/rpc/protocol/http/builtin/librpc_form_handler.so  -Lthirdparty/jdk/lib -Xlinker --no-undefined build64_release/flare/rpc/protocol/http/builtin/rpc_form_handler.objs/rpc_form_handler.cc.o build64_release/flare/rpc/protocol/http/builtin/libstatic_resources.so build64_release/flare/rpc/protocol/http/libhttp.so build64_release/flare/rpc/protocol/http/libbinlog_proto.so build64_release/flare/rpc/protocol/http/libbuffer_io.so build64_release/flare/rpc/protocol/http/libhttp_handler.so build64_release/flare/rpc/protocol/http/libmessage.so build64_release/flare/base/libcompression.so build64_release/flare/base/compression/libgzip.so build64_release/flare/base/compression/liblz4.so build64_release/thirdparty/lz4/lib64/liblz4.so build64_release/flare/base/compression/libsnappy.so build64_release/thirdparty/snappy/lib64/libsnappy.so build64_release/flare/base/compression/libzstd.so build64_release/thirdparty/zstd/lib64/libzstd.so build64_release/flare/base/buffer/libcompression_output_stream.so build64_release/flare/base/compression/libutil.so build64_release/flare/base/compression/libcompression.so build64_release/flare/net/http/libpacket_desc.so build64_release/flare/net/http/libhttp_request.so build64_release/flare/net/http/libhttp_response.so build64_release/flare/net/http/libhttp_message.so build64_release/flare/net/http/libhttp_headers.so build64_release/flare/net/http/libtypes.so build64_release/flare/rpc/internal/libsession_context.so build64_release/flare/rpc/binlog/liblog_reader.so build64_release/flare/rpc/binlog/libdry_runner.so build64_release/flare/base/libstatus.so build64_release/flare/fiber/liblogging.so build64_release/flare/fiber/libtimer.so build64_release/flare/fiber/libwork_queue.so build64_release/flare/rpc/binlog/liblog_writer.so build64_release/flare/rpc/binlog/libdumper.so build64_release/flare/rpc/binlog/libpacket_desc.so build64_release/flare/base/buffer/libzero_copy_stream.so build64_release/flare/rpc/tracing/libtracing_ops.so build64_release/flare/rpc/tracing/libtracing_ops_provider.so build64_release/thirdparty/opentracing-cpp/lib/libopentracing.so build64_release/flare/rpc/protocol/libstream_protocol.so build64_release/flare/base/libbuffer.so build64_release/flare/base/buffer/libbuiltin_buffer_block.so build64_release/flare/init/libon_init.so build64_release/flare/rpc/protocol/libcontroller.so build64_release/flare/rpc/protocol/libmessage.so build64_release/flare/base/experimental/libuuid.so build64_release/flare/base/net/libendpoint.so build64_release/flare/fiber/libfiber_basic.so build64_release/flare/base/internal/libindex_alloc.so build64_release/flare/fiber/detail/libscheduling_parameters.so build64_release/flare/fiber/detail/libfiber_impl.so build64_release/flare/fiber/detail/libcontext.so build64_release/flare/fiber/detail/librun_queue.so build64_release/flare/fiber/detail/libstack_allocator.so build64_release/flare/base/libmonitoring.so build64_release/flare/base/internal/libdpc.so build64_release/flare/base/monitoring/libinit.so build64_release/flare/base/monitoring/libdispatcher.so build64_release/flare/base/monitoring/libmonitoring_system.so build64_release/thirdparty/yaml-cpp/lib/libyaml-cpp.a build64_release/flare/base/libobject_pool.so build64_release/flare/base/object_pool/libdisabled.so build64_release/flare/base/object_pool/libglobal.so build64_release/flare/base/object_pool/libmemory_node_shared.so build64_release/flare/base/libexposed_var.so build64_release/flare/base/libtsc.so build64_release/flare/base/write_mostly/libmetrics.so build64_release/thirdparty/jsoncpp/lib/libjsoncpp.so build64_release/flare/base/internal/libtime_keeper.so build64_release/flare/base/internal/libbackground_task_host.so build64_release/flare/base/internal/libthread_pool.so build64_release/flare/base/internal/libcpu.so build64_release/flare/base/libstring.so build64_release/flare/base/object_pool/libthread_local.so build64_release/flare/base/libdemangle.so build64_release/flare/base/liberased_ptr.so build64_release/flare/base/thread/libattribute.so build64_release/flare/base/thread/liblatch.so build64_release/flare/base/thread/libout_of_duty_callback.so build64_release/flare/base/liblogging.so build64_release/flare/base/libchrono.so build64_release/flare/base/internal/libmemory_barrier.so build64_release/flare/base/internal/liblogging.so build64_release/thirdparty/fmt/lib64/libfmt.so build64_release/flare/base/thread/libspinlock.so build64_release/thirdparty/protobuf-3.4.1/libprotobuf.so build64_release/thirdparty/protobuf-3.4.1/libprotobuf_lite.so build64_release/thirdparty/glog/lib/libglog.so build64_release/thirdparty/gflags/lib/libgflags.so build64_release/thirdparty/zlib/lib/libz.so build64_release/thirdparty/ctemplate/lib/libctemplate.so -ldl -lrt -lz -lpthread -lm
/usr/bin/ld: build64_release/flare/rpc/protocol/http/builtin/rpc_form_handler.objs/rpc_form_handler.cc.o: in function `flare::object_pool::detail::memory_node_shared::GlobalPoolDescriptor* flare::object_pool::detail::memory_node_shared::GetGlobalPoolDescriptor<flare::PolymorphicBuffer>()':
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:700: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
0x804d8000 commented 3 years ago

5 should address all of the issues.

Some insights:

  1. It's a bug in Python, see https://bugzilla.redhat.com/show_bug.cgi?id=1540316 .
  2. lzma-dev was not found on your system.
  3. That's a subtle difference in linker, see Tencent/flare#9.

After merging #5: