Build fails on fresh Ubuntu 23.04, GCC-13
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 179
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 26
Description
Hi,
I'm trying to build the library after a fresh clone and system install according to the build guide from: [https://photonlibos.github.io/docs/introduction/how-to-build?os=Ubuntu](https://photonlibos.github.io/docs/introduction/how-to-build?os=Ubuntu), but get compiler errors.
```bash
dev@dev-1-2:~/Downloads$ git clone https://github.com/alibaba/PhotonLibOS.git
Cloning into 'PhotonLibOS'...
remote: Enumerating objects: 3001, done.
remote: Counting objects: 100% (1636/1636), done.
remote: Compressing objects: 100% (634/634), done.
remote: Total 3001 (delta 1191), reused 1104 (delta 991), pack-reused 1365
Receiving objects: 100% (3001/3001), 1.94 MiB | 15.51 MiB/s, done.
Resolving deltas: 100% (1853/1853), done.
```
```bash
dev@dev-1-2:~/Downloads/$ gcc --version
gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
```bash
dev@dev-1-2:~/Downloads/PhotonLibOS$ cmake -B build
-- Will find zlib
-- Found zlib: /usr/lib/x86_64-linux-gnu/libz.so
-- Will find openssl
-- Found openssl: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so
-- Will find curl
-- Found curl: /usr/lib/x86_64-linux-gnu/libcurl.so
-- Will find aio
-- Found aio: /usr/lib/x86_64-linux-gnu/libaio.so
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/dev/Downloads/PhotonLibOS/build
```
```bash
dev@dev-1-2:~/Downloads/PhotonLibOS$ cmake --build build -j
[ 1%] Building CXX object third_party/CMakeFiles/fstack_weak.dir/fstack_weak/fstack_weak.cpp.o
[ 3%] Building CXX object CMakeFiles/photon_obj.dir/common/alog.cpp.o
[ 4%] Building CXX object CMakeFiles/photon_obj.dir/common/checksum/crc32c.cpp.o
[ 6%] Building CXX object CMakeFiles/photon_obj.dir/common/estring.cpp.o
[ 7%] Building CXX object CMakeFiles/photon_obj.dir/common/executor/executor.cpp.o
[ 9%] Building CXX object third_party/CMakeFiles/easy_weak.dir/easy_weak/easy_weak.cpp.o
[ 11%] Building CXX object CMakeFiles/photon_obj.dir/common/expirecontainer.cpp.o
[ 12%] Building CXX object CMakeFiles/photon_obj.dir/common/identity-pool.cpp.o
[ 14%] Building CXX object CMakeFiles/photon_obj.dir/common/event-loop.cpp.o
[ 15%] Building CXX object CMakeFiles/photon_obj.dir/common/iovector.cpp.o
[ 17%] Building CXX object CMakeFiles/photon_obj.dir/common/memory-stream/memory-stream.cpp.o
[ 19%] Linking CXX static library ../output/libeasy_weak.a
[ 20%] Linking CXX static library ../output/libfstack_weak.a
[ 22%] Building CXX object CMakeFiles/photon_obj.dir/common/perf_counter.cpp.o
[ 23%] Building CXX object CMakeFiles/photon_obj.dir/common/ring.cpp.o
[ 25%] Building CXX object CMakeFiles/photon_obj.dir/common/simple_dom.cpp.o
[ 26%] Building CXX object CMakeFiles/photon_obj.dir/common/stream-messenger/messenger.cpp.o
[ 28%] Building CXX object CMakeFiles/photon_obj.dir/common/stream.cpp.o
[ 30%] Building CXX object CMakeFiles/photon_obj.dir/common/utility.cpp.o
[ 31%] Building CXX object CMakeFiles/photon_obj.dir/common/uuid4.cpp.o
[ 31%] Built target easy_weak
[ 31%] Built target fstack_weak
[ 33%] Building CXX object CMakeFiles/photon_obj.dir/fs/aligned-file.cpp.o
[ 34%] Building CXX object CMakeFiles/photon_obj.dir/fs/async_filesystem.cpp.o
[ 36%] Building CXX object CMakeFiles/photon_obj.dir/fs/exportfs.cpp.o
[ 38%] Building CXX object CMakeFiles/photon_obj.dir/fs/filecopy.cpp.o
[ 39%] Building CXX object CMakeFiles/photon_obj.dir/fs/httpfs/httpfs.cpp.o
[ 41%] Building CXX object CMakeFiles/photon_obj.dir/fs/httpfs/httpfs_v2.cpp.o
[ 42%] Building CXX object CMakeFiles/photon_obj.dir/fs/localfs.cpp.o
[ 44%] Building CXX object CMakeFiles/photon_obj.dir/fs/path.cpp.o
[ 46%] Building CXX object CMakeFiles/photon_obj.dir/fs/subfs.cpp.o
[ 47%] Building CXX object CMakeFiles/photon_obj.dir/fs/throttled-file.cpp.o
[ 49%] Building CXX object CMakeFiles/photon_obj.dir/fs/virtual-file.cpp.o
[ 50%] Building CXX object CMakeFiles/photon_obj.dir/fs/xfile.cpp.o
[ 52%] Building CXX object CMakeFiles/photon_obj.dir/io/reset_handle.cpp.o
[ 53%] Building CXX object CMakeFiles/photon_obj.dir/net/basic_socket.cpp.o
[ 55%] Building CXX object CMakeFiles/photon_obj.dir/io/signal.cpp.o
[ 57%] Building CXX object CMakeFiles/photon_obj.dir/net/curl.cpp.o
[ 58%] Building CXX object CMakeFiles/photon_obj.dir/net/datagram_socket.cpp.o
[ 60%] Building CXX object CMakeFiles/photon_obj.dir/net/http/body.cpp.o
[ 61%] Building CXX object CMakeFiles/photon_obj.dir/net/http/cookie_jar.cpp.o
[ 63%] Building CXX object CMakeFiles/photon_obj.dir/net/http/client.cpp.o
[ 65%] Building CXX object CMakeFiles/photon_obj.dir/net/http/headers.cpp.o
In file included from /home/dev/Downloads/PhotonLibOS/fs/httpfs/httpfs.cpp:27:
/home/dev/Downloads/PhotonLibOS/fs/httpfs/../../net/curl.h: In constructor ‘photon::net::cURL::cURL()’:
/home/dev/Downloads/PhotonLibOS/fs/httpfs/../../net/curl.h:243:16: error: ‘CURLOPT_DNS_USE_GLOBAL_CACHE’ is deprecated: since 7.11.1. Use CURLOPT_SHARE [-Werror=deprecated-declarations]
243 | setopt(CURLOPT_DNS_USE_GLOBAL_CACHE, 0L);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dev/Downloads/PhotonLibOS/fs/httpfs/../../net/curl.h:19:
/usr/include/x86_64-linux-gnu/curl/curl.h:1428:3: note: declared here
1428 | CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91,
| ^~~~~~~~~~~~~~~~~
/home/dev/Downloads/PhotonLibOS/fs/httpfs/../../net/curl.h: In member function ‘long int photon::net::cURL::PUT(const char*, R*, W*, uint64_t)’:
/home/dev/Downloads/PhotonLibOS/fs/httpfs/../../net/curl.h:416:16: error: ‘CURLOPT_PUT’ is deprecated: since 7.12.1. Use CURLOPT_UPLOAD [-Werror=deprecated-declarations]
416 | setopt(CURLOPT_PUT, 1L);
| ^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:1290:3: note: declared here
1290 | CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
| ^~~~~~~~~~~~~~~~~
[ 66%] Building CXX object CMakeFiles/photon_obj.dir/net/http/message.cpp.o
[ 68%] Building CXX object CMakeFiles/photon_obj.dir/net/http/server.cpp.o
[ 69%] Building CXX object CMakeFiles/photon_obj.dir/net/http/status.cpp.o
[ 71%] Building CXX object CMakeFiles/photon_obj.dir/net/http/url.cpp.o
[ 73%] Building CXX object CMakeFiles/photon_obj.dir/net/kernel_socket.cpp.o
[ 74%] Building CXX object CMakeFiles/photon_obj.dir/net/pooled_socket.cpp.o
[ 76%] Building CXX object CMakeFiles/photon_obj.dir/net/security-context/tls-stream.cpp.o
[ 77%] Building CXX object CMakeFiles/photon_obj.dir/net/utils.cpp.o
[ 79%] Building CXX object CMakeFiles/photon_obj.dir/photon.cpp.o
In file included from /home/dev/Downloads/PhotonLibOS/net/datagram_socket.h:20,
from /home/dev/Downloads/PhotonLibOS/net/datagram_socket.cpp:17:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
In file included from /home/dev/Downloads/PhotonLibOS/net/datagram_socket.h:19:
/home/dev/Downloads/PhotonLibOS/include/photon/common/message.h:45:21: error: ‘virtual ssize_t IMessage::recv(const iovec*, int, Addr*, size_t*, int)’ was hidden [-Werror=overloaded-virtual=]
45 | virtual ssize_t recv(const struct iovec* iov, int iovcnt,
| ^~~~
/home/dev/Downloads/PhotonLibOS/net/datagram_socket.h:50:13: note: by ‘photon::net::IDatagramSocket::recv(B*, S, int)’
50 | ssize_t recv(B* buf, S count, int flags = 0) {
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/common/message.h:35:21: error: ‘virtual ssize_t IMessage::send(const iovec*, int, const Addr*, size_t, int)’ was hidden [-Werror=overloaded-virtual=]
35 | virtual ssize_t send(const struct iovec* iov, int iovcnt,
| ^~~~
/home/dev/Downloads/PhotonLibOS/net/datagram_socket.h:46:13: note: by ‘photon::net::IDatagramSocket::send(B*, S, int)’
46 | ssize_t send(B* buf, S count, int flags = 0) {
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/common/message.h:45:21: error: ‘virtual ssize_t IMessage::recv(const iovec*, int, Addr*, size_t*, int)’ was hidden [-Werror=overloaded-virtual=]
45 | virtual ssize_t recv(const struct iovec* iov, int iovcnt,
| ^~~~
/home/dev/Downloads/PhotonLibOS/net/datagram_socket.h:50:13: note: by ‘photon::net::IDatagramSocket::recv(B*, S, int)’
50 | ssize_t recv(B* buf, S count, int flags = 0) {
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/common/message.h:35:21: error: ‘virtual ssize_t IMessage::send(const iovec*, int, const Addr*, size_t, int)’ was hidden [-Werror=overloaded-virtual=]
35 | virtual ssize_t send(const struct iovec* iov, int iovcnt,
| ^~~~
/home/dev/Downloads/PhotonLibOS/net/datagram_socket.h:46:13: note: by ‘photon::net::IDatagramSocket::send(B*, S, int)’
46 | ssize_t send(B* buf, S count, int flags = 0) {
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/common/message.h:45:21: error: ‘virtual ssize_t IMessage::recv(const iovec*, int, Addr*, size_t*, int)’ was hidden [-Werror=overloaded-virtual=]
45 | virtual ssize_t recv(const struct iovec* iov, int iovcnt,
| ^~~~
/home/dev/Downloads/PhotonLibOS/net/datagram_socket.h:50:13: note: by ‘photon::net::IDatagramSocket::recv(B*, S, int)’
50 | ssize_t recv(B* buf, S count, int flags = 0) {
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/common/message.h:35:21: error: ‘virtual ssize_t IMessage::send(const iovec*, int, const Addr*, size_t, int)’ was hidden [-Werror=overloaded-virtual=]
35 | virtual ssize_t send(const struct iovec* iov, int iovcnt,
| ^~~~
/home/dev/Downloads/PhotonLibOS/net/datagram_socket.h:46:13: note: by ‘photon::net::IDatagramSocket::send(B*, S, int)’
46 | ssize_t send(B* buf, S count, int flags = 0) {
| ^~~~
[ 80%] Building CXX object CMakeFiles/photon_obj.dir/rpc/out-of-order-execution.cpp.o
[ 82%] Building CXX object CMakeFiles/photon_obj.dir/rpc/rpc.cpp.o
In file included from /home/dev/Downloads/PhotonLibOS/net/basic_socket.cpp:31:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
[ 84%] Building CXX object CMakeFiles/photon_obj.dir/thread/stack-allocator.cpp.o
In file included from /home/dev/Downloads/PhotonLibOS/net/http/body.cpp:22:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
[ 85%] Building CXX object CMakeFiles/photon_obj.dir/thread/std-compat.cpp.o
[ 87%] Building CXX object CMakeFiles/photon_obj.dir/thread/thread-key.cpp.o
[ 88%] Building CXX object CMakeFiles/photon_obj.dir/thread/thread-pool.cpp.o
[ 90%] Building CXX object CMakeFiles/photon_obj.dir/thread/thread.cpp.o
[ 92%] Building CXX object CMakeFiles/photon_obj.dir/thread/workerpool.cpp.o
[ 93%] Building CXX object CMakeFiles/photon_obj.dir/io/aio-wrapper.cpp.o
[ 95%] Building CXX object CMakeFiles/photon_obj.dir/io/epoll.cpp.o
[ 96%] Building CXX object CMakeFiles/photon_obj.dir/io/epoll-ng.cpp.o
In file included from /home/dev/Downloads/PhotonLibOS/net/http/server.h:23,
from /home/dev/Downloads/PhotonLibOS/net/http/server.cpp:17:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:524: CMakeFiles/photon_obj.dir/net/datagram_socket.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from /home/dev/Downloads/PhotonLibOS/net/pooled_socket.cpp:17:
/home/dev/Downloads/PhotonLibOS/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
In file included from /home/dev/Downloads/PhotonLibOS/net/kernel_socket.cpp:17:
/home/dev/Downloads/PhotonLibOS/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:538: CMakeFiles/photon_obj.dir/net/http/body.cpp.o] Error 1
In file included from /home/dev/Downloads/PhotonLibOS/include/photon/net/http/client.h:27,
from /home/dev/Downloads/PhotonLibOS/fs/httpfs/httpfs_v2.cpp:26:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
In file included from /home/dev/Downloads/PhotonLibOS/rpc/rpc.h:23,
from /home/dev/Downloads/PhotonLibOS/rpc/rpc.cpp:17:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
In file included from /home/dev/Downloads/PhotonLibOS/net/utils.h:25,
from /home/dev/Downloads/PhotonLibOS/net/utils.cpp:17:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
In file included from /home/dev/Downloads/PhotonLibOS/net/security-context/tls-stream.cpp:25:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
In file included from /home/dev/Downloads/PhotonLibOS/photon.cpp:29:
/home/dev/Downloads/PhotonLibOS/net/curl.h: In constructor ‘photon::net::cURL::cURL()’:
/home/dev/Downloads/PhotonLibOS/net/curl.h:243:16: error: ‘CURLOPT_DNS_USE_GLOBAL_CACHE’ is deprecated: since 7.11.1. Use CURLOPT_SHARE [-Werror=deprecated-declarations]
243 | setopt(CURLOPT_DNS_USE_GLOBAL_CACHE, 0L);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dev/Downloads/PhotonLibOS/net/curl.h:19:
/usr/include/x86_64-linux-gnu/curl/curl.h:1428:3: note: declared here
1428 | CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91,
| ^~~~~~~~~~~~~~~~~
/home/dev/Downloads/PhotonLibOS/net/curl.h: In member function ‘long int photon::net::cURL::PUT(const char*, R*, W*, uint64_t)’:
/home/dev/Downloads/PhotonLibOS/net/curl.h:416:16: error: ‘CURLOPT_PUT’ is deprecated: since 7.12.1. Use CURLOPT_UPLOAD [-Werror=deprecated-declarations]
416 | setopt(CURLOPT_PUT, 1L);
| ^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:1290:3: note: declared here
1290 | CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
| ^~~~~~~~~~~~~~~~~
In file included from /home/dev/Downloads/PhotonLibOS/photon.cpp:30:
/home/dev/Downloads/PhotonLibOS/net/socket.h: At global scope:
/home/dev/Downloads/PhotonLibOS/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:496: CMakeFiles/photon_obj.dir/net/basic_socket.cpp.o] Error 1
In file included from /home/dev/Downloads/PhotonLibOS/net/http/client.h:27,
from /home/dev/Downloads/PhotonLibOS/net/http/client.cpp:17:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
/home/dev/Downloads/PhotonLibOS/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
In file included from /home/dev/Downloads/PhotonLibOS/net/http/client.h:27,
from /home/dev/Downloads/PhotonLibOS/net/http/cookie_jar.cpp:20:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
In file included from /home/dev/Downloads/PhotonLibOS/net/http/message.cpp:22:
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:47:9: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr:: photon::net::IPAddr::’ [-Werror]
47 | union {
| ^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:155:16: error: ignoring packed attribute because of unpacked non-POD field ‘photon::net::IPAddr photon::net::EndPoint::addr’ [-Werror]
155 | IPAddr addr;
| ^~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: error: static assertion failed: Endpoint size incorrect
175 | static_assert(sizeof(EndPoint) == 18, "Endpoint size incorrect");
| ~~~~~~~~~~~~~~~~~^~~~~
/home/dev/Downloads/PhotonLibOS/include/photon/net/socket.h:175:36: note: the comparison reduces to ‘(20 == 18)’
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:664: CMakeFiles/photon_obj.dir/net/pooled_socket.cpp.o] Error 1
/home/dev/Downloads/PhotonLibOS/net/utils.cpp:110:8: note: offset of packed bit-field ‘photon::net::xlator::b’ has changed in GCC 4.4
110 | struct xlator {
| ^~~~~~
cc1plus: all warnings being treated as errors
/home/dev/Downloads/PhotonLibOS/net/utils.cpp:110:8: note: offset of packed bit-field ‘photon::net::xlator::c’ has changed in GCC 4.4
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:706: CMakeFiles/photon_obj.dir/photon.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:566: CMakeFiles/photon_obj.dir/net/http/cookie_jar.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:370: CMakeFiles/photon_obj.dir/fs/httpfs/httpfs_v2.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:678: CMakeFiles/photon_obj.dir/net/security-context/tls-stream.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:356: CMakeFiles/photon_obj.dir/fs/httpfs/httpfs.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:692: CMakeFiles/photon_obj.dir/net/utils.cpp.o] Error 1
In file included from /home/dev/Downloads/PhotonLibOS/fs/aligned-file.cpp:22:
In member function ‘size_t iovector::push_back(iovec)’,
inlined from ‘size_t iovector::push_back(size_t)’ at /home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:385:22,
inlined from ‘virtual ssize_t photon::fs::AlignedFileAdaptor::preadv2_mutable(iovec*, int, off_t, int)’ at /home/dev/Downloads/PhotonLibOS/fs/aligned-file.cpp:165:38:
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:372:23: error: array subscript 65534 is outside the bounds of an interior zero-length array ‘iovec [0]’ [-Werror=zero-length-bounds]
372 | iovs[iov_end++] = iov;
| ~~~~~~~~~~~~~~^
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h: In member function ‘virtual ssize_t photon::fs::AlignedFileAdaptor::preadv2_mutable(iovec*, int, off_t, int)’:
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:830:18: note: while referencing ‘iovector::iovs’
830 | struct iovec iovs[0];
| ^~~~
In member function ‘size_t iovector::push_back(iovec)’,
inlined from ‘size_t iovector::push_back(size_t)’ at /home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:385:22,
inlined from ‘virtual ssize_t photon::fs::AlignedFileAdaptor::preadv2_mutable(iovec*, int, off_t, int)’ at /home/dev/Downloads/PhotonLibOS/fs/aligned-file.cpp:165:38:
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:372:23: error: array subscript 65534 is outside the bounds of an interior zero-length array ‘iovec [0]’ [-Werror=zero-length-bounds]
372 | iovs[iov_end++] = iov;
| ~~~~~~~~~~~~~~^
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h: In member function ‘virtual ssize_t photon::fs::AlignedFileAdaptor::preadv2_mutable(iovec*, int, off_t, int)’:
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:830:18: note: while referencing ‘iovector::iovs’
830 | struct iovec iovs[0];
| ^~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:594: CMakeFiles/photon_obj.dir/net/http/message.cpp.o] Error 1
In member function ‘size_t iovector::push_back(iovec)’,
inlined from ‘size_t iovector::push_back(size_t)’ at /home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:385:22,
inlined from ‘virtual ssize_t photon::fs::AlignedFileAdaptor::pwritev2_mutable(iovec*, int, off_t, int)’ at /home/dev/Downloads/PhotonLibOS/fs/aligned-file.cpp:207:38:
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:372:23: error: array subscript 65534 is outside the bounds of an interior zero-length array ‘iovec [0]’ [-Werror=zero-length-bounds]
372 | iovs[iov_end++] = iov;
| ~~~~~~~~~~~~~~^
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h: In member function ‘virtual ssize_t photon::fs::AlignedFileAdaptor::pwritev2_mutable(iovec*, int, off_t, int)’:
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:830:18: note: while referencing ‘iovector::iovs’
830 | struct iovec iovs[0];
| ^~~~
In member function ‘size_t iovector::push_back(iovec)’,
inlined from ‘size_t iovector::push_back(size_t)’ at /home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:385:22,
inlined from ‘virtual ssize_t photon::fs::AlignedFileAdaptor::pwritev2_mutable(iovec*, int, off_t, int)’ at /home/dev/Downloads/PhotonLibOS/fs/aligned-file.cpp:207:38:
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:372:23: error: array subscript 65534 is outside the bounds of an interior zero-length array ‘iovec [0]’ [-Werror=zero-length-bounds]
372 | iovs[iov_end++] = iov;
| ~~~~~~~~~~~~~~^
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h: In member function ‘virtual ssize_t photon::fs::AlignedFileAdaptor::pwritev2_mutable(iovec*, int, off_t, int)’:
/home/dev/Downloads/PhotonLibOS/include/photon/common/iovector.h:830:18: note: while referencing ‘iovector::iovs’
830 | struct iovec iovs[0];
| ^~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:734: CMakeFiles/photon_obj.dir/rpc/rpc.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:608: CMakeFiles/photon_obj.dir/net/http/server.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:300: CMakeFiles/photon_obj.dir/fs/aligned-file.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:650: CMakeFiles/photon_obj.dir/net/kernel_socket.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/photon_obj.dir/build.make:552: CMakeFiles/photon_obj.dir/net/http/client.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:108: CMakeFiles/photon_obj.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
```
Is GCC-13 supported? If not, what are the compiler requirements?
Also, would it work with newer C++ standards, e.g. C++20 or C++23?
Thank you.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the linked pull request #429, then inspect net/curl.h, include/photon/net/socket.h, net/datagram_socket.h, and include/photon/common/message.h against the GCC-13 diagnostics. Re-run cmake -B build and cmake --build build -j on Ubuntu 23.04; done means the fresh-clone build completes without these errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100