containerd / overlaybd

Overlaybd: a block based remote image format. The storage backend of containerd/accelerated-container-image.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error: make -j

qi0523 opened this issue · comments

commented

Scanning dependencies of target lsmt_lib
Scanning dependencies of target cache_frontend_lib
Scanning dependencies of target photon_obj
Scanning dependencies of target easy_weak
Scanning dependencies of target crc32_lib
Scanning dependencies of target registryfs_lib
Scanning dependencies of target full_file_cache_lib
Scanning dependencies of target download_cache_lib
Scanning dependencies of target ocf_env_lib
Scanning dependencies of target tar_lib
[ 0%] Building CXX object src/overlaybd/lsmt/CMakeFiles/lsmt_lib.dir/file.cpp.o
Scanning dependencies of target baselayer
[ 1%] Building CXX object src/overlaybd/lsmt/CMakeFiles/lsmt_lib.dir/index.cpp.o
[ 1%] Building CXX object src/overlaybd/cache/frontend/CMakeFiles/cache_frontend_lib.dir/cached_file.cpp.o
[ 2%] Building CXX object _deps/photon-build/third_party/CMakeFiles/easy_weak.dir/easy_weak/easy_weak.cpp.o
[ 3%] Building CXX object src/overlaybd/cache/frontend/CMakeFiles/cache_frontend_lib.dir/cached_fs.cpp.o
[ 4%] Building CXX object src/overlaybd/zfile/CMakeFiles/crc32_lib.dir/crc32/crc32c.cpp.o
[ 4%] Building CXX object src/overlaybd/cache/full_file_cache/CMakeFiles/full_file_cache_lib.dir/cache_pool.cpp.o
[ 4%] Building CXX object src/overlaybd/cache/ocf_cache/CMakeFiles/ocf_env_lib.dir/ease_bindings/env/ocf_env.cpp.o
[ 5%] Building CXX object src/overlaybd/cache/full_file_cache/CMakeFiles/full_file_cache_lib.dir/cache_store.cpp.o
[ 6%] Building CXX object src/overlaybd/cache/ocf_cache/CMakeFiles/ocf_env_lib.dir/ease_bindings/env/utils_mpool.cpp.o
[ 7%] Building CXX object src/overlaybd/tar/CMakeFiles/tar_lib.dir/header.cpp.o
[ 7%] Building CXX object src/overlaybd/cache/download_cache/CMakeFiles/download_cache_lib.dir/download_cache.cpp.o
[ 8%] Building CXX object src/overlaybd/tar/CMakeFiles/tar_lib.dir/libtar.cpp.o
[ 9%] Building CXX object src/overlaybd/registryfs/CMakeFiles/registryfs_lib.dir/registryfs.cpp.o
[ 9%] Generating ../output/ext4_64
[ 9%] Building CXX object src/overlaybd/registryfs/CMakeFiles/registryfs_lib.dir/registryfs_v2.cpp.o
[ 9%] Building CXX object src/overlaybd/tar/CMakeFiles/tar_lib.dir/tar_file.cpp.o
[ 10%] Building CXX object src/overlaybd/tar/CMakeFiles/tar_lib.dir/whiteout.cpp.o
ext4_64
[ 11%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/alog.cpp.o
[ 12%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/executor/executor.cpp.o
[ 12%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/checksum/crc32c.cpp.o
[ 13%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/iovector.cpp.o
[ 13%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/estring.cpp.o
[ 13%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/expirecontainer.cpp.o
[ 14%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/identity-pool.cpp.o
[ 14%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/event-loop.cpp.o
[ 15%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/memory-stream/memory-stream.cpp.o
[ 15%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/stream-messenger/messenger.cpp.o
[ 15%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/perf_counter.cpp.o
[ 15%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/uuid4.cpp.o
[ 16%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/ring.cpp.o
[ 17%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/utility.cpp.o
[ 17%] Built target baselayer
[ 17%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/async_filesystem.cpp.o
[ 18%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/aligned-file.cpp.o
[ 18%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/httpfs/httpfs_v2.cpp.o
[ 18%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/filecopy.cpp.o
[ 18%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/path.cpp.o
[ 19%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/exportfs.cpp.o
[ 20%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/localfs.cpp.o
[ 20%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/subfs.cpp.o
[ 21%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/httpfs/httpfs.cpp.o
[ 22%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/throttled-file.cpp.o
[ 23%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/xfile.cpp.o
[ 23%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/io/signal.cpp.o
[ 23%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/virtual-file.cpp.o
[ 23%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/curl.cpp.o
[ 24%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/basic_socket.cpp.o
[ 25%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/body.cpp.o
[ 25%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/client.cpp.o
[ 25%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/headers.cpp.o
[ 25%] Linking CXX static library ../output/libeasy_weak.a
[ 26%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/cookie_jar.cpp.o
[ 27%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/message.cpp.o
[ 27%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/url.cpp.o
[ 28%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/status.cpp.o
[ 29%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/kernel_socket.cpp.o
[ 29%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/server.cpp.o
[ 29%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/rpc/out-of-order-execution.cpp.o
[ 30%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/rpc/rpc.cpp.o
[ 30%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/pooled_socket.cpp.o
[ 33%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/security-context/tls-stream.cpp.o
[ 33%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/utils.cpp.o
[ 31%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/thread-key.cpp.o
[ 32%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/photon.cpp.o
[ 33%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/workerpool.cpp.o
[ 33%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/std-compat.cpp.o
[ 33%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/thread-pool.cpp.o
[ 34%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/thread.cpp.o
[ 35%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/io/aio-wrapper.cpp.o
[ 35%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/io/epoll.cpp.o
[ 35%] Built target easy_weak

/overlaybd/build/_deps/photon-src/fs/filecopy.cpp: In function ‘ssize_t photon::fs::filecopy(photon::fs::IFile*, photon::fs::IFile*, size_t, int)’:
/overlaybd/build/_deps/photon-src/fs/filecopy.cpp:36:21: warning: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
36 | ::posix_memalign(&buff, ALIGNMENT, bs);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /overlaybd/build/_deps/photon-src/rpc/rpc.cpp:25:
/overlaybd/build/_deps/photon-src/rpc/rpc.cpp: In member function ‘virtual int photon::rpc::StubImpl::do_call(photon::rpc::FunctionID, photon::rpc::SerializerIOV&, photon::rpc::SerializerIOV&, uint64_t)’:
/overlaybd/build/_deps/photon-src/rpc/rpc.cpp:169:57: warning: ?: using integer constants in boolean context, the expression will always evaluate to true’ [-Wint-in-bool-context]
169 | LOG_ERRNO_RETURN((err.no == ECONNRESET) ? ECONNRESET : EFAULT, -1, "failed to send request");
/overlaybd/build/_deps/photon-src/include/photon/common/alog.h:552:14: note: in definition of macro ‘LOG_ERRNO_RETURN’
552 | errno = (new_errno) ? (new_errno) : eno.no;
| ^~~~~~~~~
/overlaybd/build/_deps/photon-src/rpc/rpc.cpp:174:57: warning: ?: using integer constants in boolean context, the expression will always evaluate to true’ [-Wint-in-bool-context]
174 | LOG_ERRNO_RETURN((err.no == ECONNRESET) ? ECONNRESET : EFAULT, -1, "failed to receive response ");
/overlaybd/build/_deps/photon-src/include/photon/common/alog.h:552:14: note: in definition of macro ‘LOG_ERRNO_RETURN’
552 | errno = (new_errno) ? (new_errno) : eno.no;
| ^~~~~~~~~
/overlaybd/build/_deps/photon-src/net/utils.cpp: In function ‘void photon::net::base64_translate_3to4(const char*, char*)’:
/overlaybd/build/_deps/photon-src/net/utils.cpp:97:12: note: offset of packed bit-field ‘photon::net::base64_translate_3to4(const char*, char*)::xlator::b’ has changed in GCC 4.4
97 | struct xlator {
| ^~~~~~
/overlaybd/build/_deps/photon-src/net/utils.cpp:97:12: note: offset of packed bit-field ‘photon::net::base64_translate_3to4(const char*, char*)::xlator::c’ has changed in GCC 4.4
/overlaybd/build/_deps/photon-src/net/utils.cpp:108:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasin]
108 | auto x = (xlator )(&v);
| ^~~~~~~~~~~~~~
/overlaybd/build/_deps/photon-src/net/utils.cpp:108:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasin]
/overlaybd/build/_deps/photon-src/net/utils.cpp: In function ‘bool photon::net::base64_translate_4to3(const char
, char
)’:
/overlaybd/build/_deps/photon-src/net/utils.cpp:188:12: note: offset of packed bit-field ‘photon::net::base64_translate_4to3(const char*, char*)::xlator::b’ has changed in GCC 4.4
188 | struct xlator {
| ^~~~~~
/overlaybd/build/_deps/photon-src/net/utils.cpp:188:12: note: offset of packed bit-field ‘photon::net::base64_translate_4to3(const char*, char*)::xlator::c’ has changed in GCC 4.4
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [_deps/photon-build/CMakeFiles/photon_obj.dir/build.make:622: _deps/photon-build/CMakeFiles/photon_obj.dir/rpc/rpc.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/overlaybd/cache/frontend/CMakeFiles/cache_frontend_lib.dir/build.make:63: src/overlaybd/cache/frontend/CMakeFiles/cache_frontend_lib.dir/cached_file.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/overlaybd/cache/full_file_cache/CMakeFiles/full_file_cache_lib.dir/build.make:63: src/overlaybd/cache/full_file_cache/CMakeFiles/full_file_cache_lib.dir/cache_pool.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

itseems gcc 4.4 is used from the error info. it is too low, 7+ is preferred

commented

itseems gcc 4.4 is used from the error info. it is too low, 7+ is preferred

$gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

I have no idea why gcc is changed to 4.4 version!

‘photon::net::base64_translate_4to3(const char*, char*)::xlator::c’ has changed in GCC 4.4

@liulanzheng I think it means something has already changed since GCC 4.4

commented

$cmake ..

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Populating photon
-- Configuring done
-- Generating done
-- Build files have been written to: /overlaybd/build/_deps/photon-subbuild
Scanning dependencies of target photon-populate
[ 11%] Creating directories for 'photon-populate'
[ 22%] Performing download step (git clone) for 'photon-populate'
Cloning into 'photon-src'...
Note: switching to 'v0.5.6'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 5cf4719 Update alog.cpp
[ 33%] No patch step for 'photon-populate'
[ 44%] Performing update step for 'photon-populate'
[ 55%] No configure step for 'photon-populate'
[ 66%] No build step for 'photon-populate'
[ 77%] No install step for 'photon-populate'
[ 88%] No test step for 'photon-populate'
[100%] Completed 'photon-populate'
[100%] Built target photon-populate
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Performing Test COMPILER_HAS_MCRC32_FLAG
-- Performing Test COMPILER_HAS_MCRC32_FLAG - Success
-- Found aio: /usr/lib/x86_64-linux-gnu/libaio.so
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1f")
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.68.0")
-- Populating tcmu
-- Configuring done
-- Generating done
-- Build files have been written to: /overlaybd/build/_deps/tcmu-subbuild
Scanning dependencies of target tcmu-populate
[ 11%] Creating directories for 'tcmu-populate'
[ 22%] Performing download step (git clone) for 'tcmu-populate'
Cloning into 'tcmu-src'...
Already on 'main'
Your branch is up to date with 'origin/main'.
[ 33%] No patch step for 'tcmu-populate'
[ 44%] Performing update step for 'tcmu-populate'
Current branch main is up to date.
[ 55%] No configure step for 'tcmu-populate'
[ 66%] No build step for 'tcmu-populate'
[ 77%] No install step for 'tcmu-populate'
[ 88%] No test step for 'tcmu-populate'
[100%] Completed 'tcmu-populate'
[100%] Built target tcmu-populate
-- Found nl: /usr/lib/x86_64-linux-gnu/libnl-3.so;/usr/lib/x86_64-linux-gnu/libnl-genl-3.so
-- Populating rapidjson
-- Configuring done
-- Generating done
-- Build files have been written to: /overlaybd/build/_deps/rapidjson-subbuild
Scanning dependencies of target rapidjson-populate
[ 11%] Creating directories for 'rapidjson-populate'
[ 22%] Performing download step (git clone) for 'rapidjson-populate'
Cloning into 'rapidjson-src'...
Note: switching to '80b6d1c83402a5785c486603c5611923159d0894'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 80b6d1c8 small corrections for schema.h
Submodule 'thirdparty/gtest' (https://github.com/google/googletest.git) registered for path 'thirdparty/gtest'
Cloning into '/overlaybd/build/_deps/rapidjson-src/thirdparty/gtest'...
Submodule path 'thirdparty/gtest': checked out 'ba96d0b1161f540656efdaed035b3c062b60e006'
[ 33%] No patch step for 'rapidjson-populate'
[ 44%] Performing update step for 'rapidjson-populate'
[ 55%] No configure step for 'rapidjson-populate'
[ 66%] No build step for 'rapidjson-populate'
[ 77%] No install step for 'rapidjson-populate'
[ 88%] No test step for 'rapidjson-populate'
[100%] Completed 'rapidjson-populate'
[100%] Built target rapidjson-populate
-- Populating ext2fs
-- Configuring done
-- Generating done
-- Build files have been written to: /overlaybd/build/_deps/ext2fs-subbuild
Scanning dependencies of target ext2fs-populate
[ 11%] Creating directories for 'ext2fs-populate'
[ 22%] Performing download step (download, verify and extract) for 'ext2fs-populate'
-- Downloading...
dst='/overlaybd/build/_deps/ext2fs-subbuild/ext2fs-populate-prefix/src/libext2fs.tar.gz'
timeout='none'
-- Using src='https://github.com/data-accelerator/e2fsprogs/releases/download/latest/libext2fs.tar.gz'
-- [download 2% complete]
-- [download 4% complete]
-- [download 5% complete]
-- [download 11% complete]
-- [download 17% complete]
-- [download 23% complete]
-- [download 28% complete]
-- [download 34% complete]
-- [download 40% complete]
-- [download 46% complete]
-- [download 51% complete]
-- [download 57% complete]
-- [download 63% complete]
-- [download 69% complete]
-- [download 74% complete]
-- [download 80% complete]
-- [download 86% complete]
-- [download 91% complete]
-- [download 97% complete]
-- [download 100% complete]
-- Downloading... done
-- extracting...
src='/overlaybd/build/_deps/ext2fs-subbuild/ext2fs-populate-prefix/src/libext2fs.tar.gz'
dst='/overlaybd/build/_deps/ext2fs-src'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 33%] No patch step for 'ext2fs-populate'
[ 44%] No update step for 'ext2fs-populate'
[ 55%] No configure step for 'ext2fs-populate'
[ 66%] No build step for 'ext2fs-populate'
[ 77%] No install step for 'ext2fs-populate'
[ 88%] No test step for 'ext2fs-populate'
[100%] Completed 'ext2fs-populate'
[100%] Built target ext2fs-populate
-- Configuring done
-- Generating done
-- Build files have been written to: /overlaybd/build

@qi0523 these info are warning, and i think these warnings should not lead to failure.

@qi0523 this line is suspicious: c++: fatal error: Killed signal terminated program cc1plus, it seems compilation was killed. did the memory full or other abnormal cases on the system during compiling?

commented

Details are as follows:

Firstly, when using

FetchContent_Declare(
  photon
  GIT_REPOSITORY https://github.com/alibaba/PhotonLibOS.git
  GIT_TAG v0.5.6
)

errors are as follows:

Scanning dependencies of target easy_weak
Scanning dependencies of target photon_obj
Scanning dependencies of target full_file_cache_lib
Scanning dependencies of target lsmt_lib
Scanning dependencies of target registryfs_lib
Scanning dependencies of target crc32_lib
Scanning dependencies of target cache_frontend_lib
Scanning dependencies of target ocf_env_lib
Scanning dependencies of target download_cache_lib
Scanning dependencies of target tar_lib
[ 1%] Building CXX object _deps/photon-build/third_party/CMakeFiles/easy_weak.dir/easy_weak/easy_weak.cpp.o
Scanning dependencies of target baselayer
[ 1%] Building CXX object src/overlaybd/lsmt/CMakeFiles/lsmt_lib.dir/file.cpp.o
[ 2%] Building CXX object src/overlaybd/lsmt/CMakeFiles/lsmt_lib.dir/index.cpp.o
[ 2%] Building CXX object src/overlaybd/cache/full_file_cache/CMakeFiles/full_file_cache_lib.dir/cache_pool.cpp.o
[ 3%] Building CXX object src/overlaybd/zfile/CMakeFiles/crc32_lib.dir/crc32/crc32c.cpp.o
[ 4%] Building CXX object src/overlaybd/cache/full_file_cache/CMakeFiles/full_file_cache_lib.dir/cache_store.cpp.o
[ 4%] Building CXX object src/overlaybd/cache/frontend/CMakeFiles/cache_frontend_lib.dir/cached_file.cpp.o
[ 5%] Building CXX object src/overlaybd/cache/ocf_cache/CMakeFiles/ocf_env_lib.dir/ease_bindings/env/utils_mpool.cpp.o
[ 5%] Generating ../output/ext4_64
[ 7%] Building CXX object src/overlaybd/cache/frontend/CMakeFiles/cache_frontend_lib.dir/cached_fs.cpp.o
[ 6%] Building CXX object src/overlaybd/tar/CMakeFiles/tar_lib.dir/libtar.cpp.o
[ 6%] Building CXX object src/overlaybd/cache/ocf_cache/CMakeFiles/ocf_env_lib.dir/ease_bindings/env/ocf_env.cpp.o
[ 7%] Building CXX object src/overlaybd/tar/CMakeFiles/tar_lib.dir/header.cpp.o
[ 7%] Building CXX object src/overlaybd/tar/CMakeFiles/tar_lib.dir/tar_file.cpp.o
[ 8%] Building CXX object src/overlaybd/tar/CMakeFiles/tar_lib.dir/whiteout.cpp.o
[ 9%] Building CXX object src/overlaybd/cache/download_cache/CMakeFiles/download_cache_lib.dir/download_cache.cpp.o
[ 9%] Building CXX object src/overlaybd/registryfs/CMakeFiles/registryfs_lib.dir/registryfs_v2.cpp.o
[ 10%] Building CXX object src/overlaybd/registryfs/CMakeFiles/registryfs_lib.dir/registryfs.cpp.o
ext4_64
[ 11%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/identity-pool.cpp.o
[ 13%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/alog.cpp.o
[ 15%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/executor/executor.cpp.o
[ 14%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/estring.cpp.o
[ 14%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/expirecontainer.cpp.o
[ 14%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/checksum/crc32c.cpp.o
[ 16%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/ring.cpp.o
[ 15%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/memory-stream/memory-stream.cpp.o
[ 15%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/event-loop.cpp.o
[ 16%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/iovector.cpp.o
[ 16%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/perf_counter.cpp.o
[ 16%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/stream-messenger/messenger.cpp.o
[ 17%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/utility.cpp.o
[ 18%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/aligned-file.cpp.o
[ 17%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/common/uuid4.cpp.o
[ 18%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/async_filesystem.cpp.o
[ 19%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/exportfs.cpp.o
[ 20%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/httpfs/httpfs.cpp.o
[ 20%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/filecopy.cpp.o
[ 20%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/httpfs/httpfs_v2.cpp.o
[ 20%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/path.cpp.o
[ 21%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/localfs.cpp.o
[ 21%] Built target baselayer
[ 21%] Linking CXX static library ../output/libeasy_weak.a
[ 21%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/subfs.cpp.o
[ 21%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/virtual-file.cpp.o
[ 22%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/throttled-file.cpp.o
[ 23%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/curl.cpp.o
[ 23%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/fs/xfile.cpp.o
[ 24%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/basic_socket.cpp.o
[ 24%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/io/signal.cpp.o
[ 25%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/body.cpp.o
[ 26%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/cookie_jar.cpp.o
[ 27%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/message.cpp.o
[ 27%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/headers.cpp.o
[ 27%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/server.cpp.o
[ 27%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/client.cpp.o
[ 28%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/status.cpp.o
[ 29%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/kernel_socket.cpp.o
[ 29%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/http/url.cpp.o
[ 29%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/utils.cpp.o
[ 30%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/security-context/tls-stream.cpp.o
[ 30%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/net/pooled_socket.cpp.o
[ 30%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/rpc/out-of-order-execution.cpp.o
[ 31%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/photon.cpp.o
[ 32%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/thread-key.cpp.o
[ 32%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/thread-pool.cpp.o
[ 32%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/workerpool.cpp.o
[ 33%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/io/aio-wrapper.cpp.o
[ 34%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/thread.cpp.o
[ 34%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/thread/std-compat.cpp.o
[ 34%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/io/epoll.cpp.o
[ 35%] Building CXX object _deps/photon-build/CMakeFiles/photon_obj.dir/rpc/rpc.cpp.o
[ 35%] Built target easy_weak
/overlaybd/build/_deps/photon-src/fs/filecopy.cpp: In function ‘ssize_t photon::fs::filecopy(photon::fs::IFile*, photon::fs::IFile*, size_t, int)’:
/overlaybd/build/_deps/photon-src/fs/filecopy.cpp:36:21: warning: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
36 | ::posix_memalign(&buff, ALIGNMENT, bs);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/overlaybd/build/_deps/photon-src/net/basic_socket.cpp: In lambda function:
/overlaybd/build/_deps/photon-src/net/basic_socket.cpp:240:54: error: expected ‘{’ before ‘->’ token
240 | auto func = [&]() __attribute__((always_inline)) -> ssize_t {
| ^~
/overlaybd/build/_deps/photon-src/net/basic_socket.cpp: In function ‘ssize_t photon::net::sendfile_fallback(photon::net::ISocketStream*, int, off_t, size_t, uint64_t)’:
/overlaybd/build/_deps/photon-src/net/basic_socket.cpp:240:54: error: base operand of ‘->’ has non-pointer type ‘photon::net::sendfile_fallback(photon::net::ISocketStream*, int, off_t, size_t, uint64_t)::<lambda()>’
/overlaybd/build/_deps/photon-src/net/basic_socket.cpp:238:10: warning: unused variable ‘buf’ [-Wunused-variable]
238 | char buf[64 * 1024];

It seems to be the problem of lambda function.

Then, using

FetchContent_Declare(
  photon
  GIT_REPOSITORY https://github.com/alibaba/PhotonLibOS.git
  GIT_TAG v0.5.1
)

errors are as above.

commented

@qi0523 this line is suspicious: c++: fatal error: Killed signal terminated program cc1plus, it seems compilation was killed. did the memory full or other abnormal cases on the system during compiling?

When saw the error message, I terminated it.

itseems gcc 4.4 is used from the error info. it is too low, 7+ is preferred

$gcc -v

Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Thread model: posix gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

I have no idea why gcc is changed to 4.4 version!

@qi0523
I just tried compiling on ubuntu 20.04 with gcc 9.4.0 and it worked well.

my gcc info is as below:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)

the main different other than version is at Configured with:, did you hide it or no content? Some users have encountered with similar issue before by using a misconfigured or not configured gcc.

commented

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1.20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

I have no idea
@lihuiba @Coldwings @beef9999 cc
the error is in photon basic_socket.cpp

image

commented

I have no idea @lihuiba @Coldwings @beef9999 cc the error is in photon basic_socket.cpp

image

Yes, gcc can not identify this lambda!

@qi0523 Can you modify this basic_socket.cpp at line 240, and try below methods?

  • Change __attribute__((always_inline)) to inline
  • Remove __attribute__((always_inline))
  • Remove -> ssize_t
commented

@qi0523 Can you modify this basic_socket.cpp at line 240, and try below methods?

  • Change __attribute__((always_inline)) to inline
  • Remove __attribute__((always_inline))
  • Remove -> ssize_t

Remove __attribute__((always_inline)) works. Thanks a lot!