facebook / facebook/folly

ninja: build stopped: subcommand failed

Open
#1,474 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
30.5k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Description

I'm having very unpleasant experience over get starting with Folly. My first attempt with Folly is Windows but it failed miserably. Now, Today, I'm trying to build it with Ubuntu 20 LTS but it returns following error,

```
[636/741] Linking CXX executable thread_pool_executor_test
FAILED: thread_pool_executor_test
: && /usr/bin/c++ -O2 -g -DNDEBUG -rdynamic CMakeFiles/thread_pool_executor_test.dir/folly/executors/test/ThreadPoolExecutorTest.cpp.o -o thread_pool_executor_test -Wl,-rpath,/tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/gflags-ronK3RE8f4xIBpIfvM1hbcahE7zl86f1gu51ZEOG1MM/lib:/tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/zstd-G1k7r1AfnYkl5Uvw-NdfjZefxemUwaCiUxJRskWkLAY/lib:/tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/snappy-fyAMXWVuRRahD4MFwBhifPGVl0aZnevJWt02EfD43UY/lib:/tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/glog-I2nV4ItGi2bXRgOLqvWTBZQsOBSdr8YMpEYc3ZVjMUU/lib libfolly_test_support.a folly/libfollybenchmark.a libfolly.a /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/fmt-cq2LerVN-jiPa92QmnxjAfFz77k6lh4q4vWnFN9ospE/lib/libfmt.a /usr/lib/x86_64-linux-gnu/libboost_context.so.1.71.0 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.71.0 /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.71.0 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.71.0 /usr/lib/x86_64-linux-gnu/libboost_atomic.so.1.71.0 /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/double-conversion-FyS8sgsVc5C1u-7ETrowLudIZ-ry03288F0m9bFWDRc/lib/libdouble-conversion.a /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/gflags-ronK3RE8f4xIBpIfvM1hbcahE7zl86f1gu51ZEOG1MM/lib/libgflags.so.2.2.2 -lpthread /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/libevent-00m13MiK9LMsscwh3yHBTrNrXMGlKN9XeqAkL0IgSdg/lib/libevent.a -lz -lssl -lcrypto -lbz2 -llzma /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/lz4-thOqtyctW7LVJMMBClpZsDQN2KVUncKJjUy53KeWlZ4/lib/liblz4.a /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/zstd-G1k7r1AfnYkl5Uvw-NdfjZefxemUwaCiUxJRskWkLAY/lib/libzstd.so /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/snappy-fyAMXWVuRRahD4MFwBhifPGVl0aZnevJWt02EfD43UY/lib/libsnappy.so -Wl,-Bstatic -liberty -Wl,-Bdynamic -ldl -lunwind /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/googletest-MJvqDutNW3x6UJnkof7f1jS5M_DwyvcqGd5v53pS5Kk/lib/libgmock_main.a /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/googletest-MJvqDutNW3x6UJnkof7f1jS5M_DwyvcqGd5v53pS5Kk/lib/libgmock.a /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/googletest-MJvqDutNW3x6UJnkof7f1jS5M_DwyvcqGd5v53pS5Kk/lib/libgtest.a -pthread /tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/glog-I2nV4ItGi2bXRgOLqvWTBZQsOBSdr8YMpEYc3ZVjMUU/lib/libglog.so && :
collect2: error: ld returned 1 exit status
[637/741] Linking CXX executable core_test
ninja: build stopped: subcommand failed.
Command '['/tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/installed/cmake-foEU0NISr5hdI_HIN2oqiKR2awUvqFIDGR_4Njq8ac8/bin/cmake', '--build', '/tmp/fbcode_builder_getdeps-ZhomeZfollyZbuildZfbcode_builder-root/build/folly', '--target', 'install', '--config', 'Release', '-j', '2']' returned non-zero exit status 1.
!! Failed
```

G++ version 9.3.0
Ubuntu version 20.04

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the CMake build command on Ubuntu 20.04 with G++ 9.3.0 and capture the linker diagnostics preceding “ld returned 1 exit status.” Check the linking of thread_pool_executor_test and core_test, including the listed Boost, gflags, glog, and system libraries. Done means the Release install target completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.