Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many C++ warnings and errors #120

Open
yurivict opened this issue Jul 20, 2023 · 3 comments
Open

Many C++ warnings and errors #120

yurivict opened this issue Jul 20, 2023 · 3 comments

Comments

@yurivict
Copy link

FAILED: CMakeFiles/llfio_dl.dir/src/llfio.cpp.o 
/usr/local/libexec/ccache/c++ -DLLFIO_DYN_LINK=1 -DLLFIO_ENABLE_TEST_IO_MULTIPLEXERS=1 -DLLFIO_INCLUDE_STORAGE_PROFILE=1 -DLLFIO_SOURCE=1 -Dllfio_dl_EXPORTS  -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   -isystem /usr/local/include -std=c++17 -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   -isystem /usr/local/include -std=c++17  -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fexceptions -frtti -fstack-protector-strong -Wall -Wextra -Wdocumentation -fcomment-block-commands=raceguarantees,complexity,exceptionmodel -pthread -MD -MT CMakeFiles/llfio_dl.dir/src/llfio.cpp.o -MF CMakeFiles/llfio_dl.dir/src/llfio.cpp.o.d -o CMakeFiles/llfio_dl.dir/src/llfio.cpp.o -c /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp:7:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/llfio.hpp:18:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/llfio.hpp:63:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../utils.hpp:459:
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/utils.ipp:218:88: warning: unused parameter 'want' [-Wunused-parameter]
  result<process_memory_usage> current_process_memory_usage(process_memory_usage::want want) noexcept
                                                                                       ^
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp:7:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/llfio.hpp:18:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/llfio.hpp:65:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/directory_handle.hpp:28:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/path_discovery.hpp:28:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../fs_handle.hpp:579:
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/fs_handle.ipp:468:2: warning: "Implement this next time I am on FreeBSD" [-W#warnings]
#warning "Implement this next time I am on FreeBSD"
 ^
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/fs_handle.ipp:524:94: error: use of undeclared identifier 'tofill'
  auto written = extattr_set_fd(h.native_handle().fd, EXTATTR_NAMESPACE_USER, zname.c_str(), tofill.data(), tofill.size());
                                                                                             ^
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/fs_handle.ipp:524:109: error: use of undeclared identifier 'tofill'
  auto written = extattr_set_fd(h.native_handle().fd, EXTATTR_NAMESPACE_USER, zname.c_str(), tofill.data(), tofill.size());
                                                                                                            ^
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp:7:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/llfio.hpp:18:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/llfio.hpp:67:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/../../dynamic_thread_pool_group.hpp:528:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/dynamic_thread_pool_group.ipp:27:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/file_handle.hpp:570:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/path_discovery.ipp:320:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/path_discovery.ipp:29:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../mapped_file_handle.hpp:25:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../map_handle.hpp:1245:
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/map_handle.ipp:372:24: warning: unused variable 'pagesizes' [-Wunused-variable]
    static const auto &pagesizes = utils::page_sizes();  // can't throw, as guaranteed called before now
                       ^
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/map_handle.ipp:587:24: warning: unused variable 'addr' [-Wunused-variable]
    OUTCOME_TRY(auto &&addr, do_mmap(_v, addrafter, MAP_FIXED | MAP_EXCL, _section, _pagesize, bytes, offset, _flag));
                       ^
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp:7:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/llfio.hpp:18:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/llfio.hpp:67:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/../../dynamic_thread_pool_group.hpp:528:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/dynamic_thread_pool_group.ipp:27:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/file_handle.hpp:570:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/path_discovery.ipp:320:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/path_discovery.ipp:29:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../mapped_file_handle.hpp:25:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/../../map_handle.hpp:1248:
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/map_handle.ipp:101:13: error: variable 'p' with type 'auto *' has incompatible initializer of type 'llfio_v2_9677d08e::detail::map_handle_cache_item_t'
      auto *p = *it;
            ^   ~~~
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/map_handle.ipp:137:19: error: variable 'p' with type 'auto *' has incompatible initializer of type 'llfio_v2_9677d08e::detail::map_handle_cache_item_t'
            auto *p = *it;
                  ^   ~~~
4 warnings and 4 errors generated.
[ 50% 48/96] /usr/local/libexec/ccache/c++ -DLLFIO_ENABLE_TEST_IO_MULTIPLEXERS=1 -DLLFIO_INCLUDE_STORAGE_PROFILE=1 -DLLFIO_SOURCE=1 -DLLFIO_STATIC_LINK=1  -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   -isystem /usr/local/include -std=c++17 -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   -isystem /usr/local/include -std=c++17  -DNDEBUG -fPIC -fexceptions -frtti -fstack-protector-strong -Wall -Wextra -Wdocumentation -fcomment-block-commands=raceguarantees,complexity,exceptionmodel -pthread -MD -MT CMakeFiles/llfio_sl.dir/src/llfio.cpp.o -MF CMakeFiles/llfio_sl.dir/src/llfio.cpp.o.d -o CMakeFiles/llfio_sl.dir/src/llfio.cpp.o -c /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp
FAILED: CMakeFiles/llfio_sl.dir/src/llfio.cpp.o 
/usr/local/libexec/ccache/c++ -DLLFIO_ENABLE_TEST_IO_MULTIPLEXERS=1 -DLLFIO_INCLUDE_STORAGE_PROFILE=1 -DLLFIO_SOURCE=1 -DLLFIO_STATIC_LINK=1  -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   -isystem /usr/local/include -std=c++17 -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   -isystem /usr/local/include -std=c++17  -DNDEBUG -fPIC -fexceptions -frtti -fstack-protector-strong -Wall -Wextra -Wdocumentation -fcomment-block-commands=raceguarantees,complexity,exceptionmodel -pthread -MD -MT CMakeFiles/llfio_sl.dir/src/llfio.cpp.o -MF CMakeFiles/llfio_sl.dir/src/llfio.cpp.o.d -o CMakeFiles/llfio_sl.dir/src/llfio.cpp.o -c /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp:7:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/llfio.hpp:18:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/llfio.hpp:63:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../utils.hpp:459:
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/utils.ipp:218:88: warning: unused parameter 'want' [-Wunused-parameter]
  result<process_memory_usage> current_process_memory_usage(process_memory_usage::want want) noexcept
                                                                                       ^
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp:7:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/llfio.hpp:18:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/llfio.hpp:65:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/directory_handle.hpp:28:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/path_discovery.hpp:28:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../fs_handle.hpp:579:
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/fs_handle.ipp:468:2: warning: "Implement this next time I am on FreeBSD" [-W#warnings]
#warning "Implement this next time I am on FreeBSD"
 ^
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/fs_handle.ipp:524:94: error: use of undeclared identifier 'tofill'
  auto written = extattr_set_fd(h.native_handle().fd, EXTATTR_NAMESPACE_USER, zname.c_str(), tofill.data(), tofill.size());
                                                                                             ^
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/fs_handle.ipp:524:109: error: use of undeclared identifier 'tofill'
  auto written = extattr_set_fd(h.native_handle().fd, EXTATTR_NAMESPACE_USER, zname.c_str(), tofill.data(), tofill.size());
                                                                                                            ^
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp:7:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/llfio.hpp:18:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/llfio.hpp:67:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/../../dynamic_thread_pool_group.hpp:528:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/dynamic_thread_pool_group.ipp:27:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/file_handle.hpp:570:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/path_discovery.ipp:320:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/path_discovery.ipp:29:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../mapped_file_handle.hpp:25:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../map_handle.hpp:1245:
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/map_handle.ipp:372:24: warning: unused variable 'pagesizes' [-Wunused-variable]
    static const auto &pagesizes = utils::page_sizes();  // can't throw, as guaranteed called before now
                       ^
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/map_handle.ipp:587:24: warning: unused variable 'addr' [-Wunused-variable]
    OUTCOME_TRY(auto &&addr, do_mmap(_v, addrafter, MAP_FIXED | MAP_EXCL, _section, _pagesize, bytes, offset, _flag));
                       ^
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/llfio.cpp:7:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/llfio.hpp:18:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/llfio.hpp:67:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/../../dynamic_thread_pool_group.hpp:528:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/dynamic_thread_pool_group.ipp:27:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/file_handle.hpp:570:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/path_discovery.ipp:320:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/path_discovery.ipp:29:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/posix/../../../mapped_file_handle.hpp:25:
In file included from /usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/../../map_handle.hpp:1248:
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/map_handle.ipp:101:13: error: variable 'p' with type 'auto *' has incompatible initializer of type 'llfio_v2_9677d08e::detail::map_handle_cache_item_t'
      auto *p = *it;
            ^   ~~~
/usr/ports/devel/llfio/work/llfio-20230311/src/../include/llfio/v2.0/detail/impl/map_handle.ipp:137:19: error: variable 'p' with type 'auto *' has incompatible initializer of type 'llfio_v2_9677d08e::detail::map_handle_cache_item_t'
            auto *p = *it;
                  ^   ~~~
4 warnings and 4 errors generated.
ninja: build stopped: subcommand failed.

clang-15
FreeBSD 13.2

@ned14
Copy link
Owner

ned14 commented Jul 20, 2023

As the error messages suggest, I have work yet to do on FreeBSD. I'll set a VM installing there now.

@ned14
Copy link
Owner

ned14 commented Jul 21, 2023

I did a first round of FreeBSD build fixes at cbce19e. TBH most of this morning went on faffing around getting FreeBSD to expand storage within the qcow2 image they provide, turns out somebody forgot to enable the growfs service, so you need to manually poke that and bam, it "just works".

Build on FreeBSD is clean now except for the errors saying "Need to implement this on FreeBSD". I hope to get to those next week.

@ned14
Copy link
Owner

ned14 commented Jul 26, 2023

Did another round of FreeBSD build fixes at 77a96cf. Now everything compiles and links, but a lot of tests are failing. I'll try to get back to fixing most of these later this week.

Be aware I am unlikely to fix all the tests, but I'll get it "good enough" for most common usage of LLFIO on FreeBSD.

54% tests passed, 16 tests failed out of 35

The following tests FAILED:
1 - llfio_sl--byte_socket_handle (Subprocess aborted)
4 - llfio_sl--clone_extents (Failed)
7 - llfio_sl--current_path (Failed)
13 - llfio_sl--directory_handle_enumerate (Failed)
19 - llfio_sl--extended_attributes (Failed)
25 - llfio_sl--file_handle_create_close (Failed)
34 - llfio_sl--issue0009 (Failed)
37 - llfio_sl--issue0027 (Failed)
40 - llfio_sl--issue0028 (Failed)
52 - llfio_sl--large_pages (Failed)
79 - llfio_sl--reduce (Failed)
85 - llfio_sl--shared_fs_mutex (Timeout)
91 - llfio_sl--symlink_handle_create_close (Subprocess aborted)
94 - llfio_sl--tls_socket_handle (Subprocess aborted)
97 - llfio_sl--traverse (Failed)
103 - llfio_sl--utils (Subprocess aborted)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants