mamba icon indicating copy to clipboard operation
mamba copied to clipboard

Address warnings while building mamba/micromamba from source

Open anutosh491 opened this issue 4 months ago • 0 comments

Troubleshooting docs

  • [X] My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • [X] I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

Micromamba

Search tried in issue tracker

Not found

Latest version of Mamba

  • [X] My problem is not solved with the latest version

Tried in Conda?

I do not have this problem with Conda, just with Mamba

Describe your issue

I see lot of warnings while trying to build mamba/micromamba from source. This issue has been opened to keep track and address these.

/Users/anutosh491/work/mamba/libmamba/ext/solv-cpp/src/pool.cpp:96:14: warning: unused function 'is_reldep' [-Wunused-function]
   96 |         auto is_reldep(::Id id) -> bool
      |              ^~~~~~~~~
1 warning generated.

In file included from /Users/anutosh491/work/mamba/libmamba/src/util/parsers.cpp:10:
/Users/anutosh491/work/mamba/libmamba/include/mamba/util/parsers.hpp:284:56: warning: implicit conversion changes signedness: 'int' to 'std::size_t' (aka 'unsigned long') [-Wsign-conversion]
  284 |                 pos = static_cast<int>(found) * i + (1 - static_cast<int>(found)) * pos;
      |                                                      ~~^~~~~~~~~~~~~~~~~~~~~~~~~  ~
/Users/anutosh491/work/mamba/libmamba/include/mamba/util/parsers.hpp:364:61: note: in instantiation of function template specialization 'mamba::util::detail_parsers::find<char, 1UL>' requested here
  364 |                 const auto open_depth_idx = detail_parsers::find(open, text[pos]);
      |                                                             ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/util/parsers.hpp:473:32: note: in instantiation of function template specialization 'mamba::util::detail_parsers::find_matching_parentheses_impl<1UL, mamba::util::detail_parsers::FindParenthesesSearcher>' requested here
  473 |         return detail_parsers::find_matching_parentheses_impl(
      |                                ^
/Users/anutosh491/work/mamba/libmamba/src/util/parsers.cpp:27:16: note: in instantiation of function template specialization 'mamba::util::find_matching_parentheses<1UL>' requested here
   27 |         return find_matching_parentheses(text, err, std::array{ open }, std::array{ close });
      |                ^
In file included from /Users/anutosh491/work/mamba/libmamba/src/util/parsers.cpp:10:
/Users/anutosh491/work/mamba/libmamba/include/mamba/util/parsers.hpp:284:23: warning: implicit conversion changes signedness: 'int' to 'std::size_t' (aka 'unsigned long') [-Wsign-conversion]
  284 |                 pos = static_cast<int>(found) * i + (1 - static_cast<int>(found)) * pos;
      |                       ^~~~~~~~~~~~~~~~~~~~~~~ ~
2 warnings generated.

In file included from /Users/anutosh491/work/mamba/libmamba/src/specs/match_spec.cpp:17:
/Users/anutosh491/work/mamba/libmamba/include/mamba/util/parsers.hpp:284:56: warning: implicit conversion changes signedness: 'int' to 'std::size_t' (aka 'unsigned long') [-Wsign-conversion]
  284 |                 pos = static_cast<int>(found) * i + (1 - static_cast<int>(found)) * pos;
      |                                                      ~~^~~~~~~~~~~~~~~~~~~~~~~~~  ~
/Users/anutosh491/work/mamba/libmamba/include/mamba/util/parsers.hpp:428:55: note: in instantiation of function template specialization 'mamba::util::detail_parsers::find<char, 4UL>' requested here
  428 |                 const auto open_pos = detail_parsers::find(open, text[pos]);
      |                                                       ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/util/parsers.hpp:625:32: note: in instantiation of function template specialization 'mamba::util::detail_parsers::find_not_in_parentheses_impl<4UL, char, mamba::util::detail_parsers::RFindParenthesesSearcher>' requested here
  625 |         return detail_parsers::find_not_in_parentheses_impl(
      |                                ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/util/parsers.hpp:644:26: note: in instantiation of function template specialization 'mamba::util::rfind_not_in_parentheses<4UL>' requested here
  644 |         const auto pos = rfind_not_in_parentheses(text, c, err, open, close);
      |                          ^
/Users/anutosh491/work/mamba/libmamba/src/specs/match_spec.cpp:117:26: note: in instantiation of function template specialization 'mamba::util::rfind_not_in_parentheses<4UL>' requested here
  117 |             return util::rfind_not_in_parentheses(
      |                          ^
In file included from /Users/anutosh491/work/mamba/libmamba/src/specs/match_spec.cpp:17:
/Users/anutosh491/work/mamba/libmamba/include/mamba/util/parsers.hpp:284:23: warning: implicit conversion changes signedness: 'int' to 'std::size_t' (aka 'unsigned long') [-Wsign-conversion]
  284 |                 pos = static_cast<int>(found) * i + (1 - static_cast<int>(found)) * pos;
      |                       ^~~~~~~~~~~~~~~~~~~~~~~ ~
      
      In file included from /Users/anutosh491/work/mamba/libmamba/src/solver/libsolv/unsolvable.cpp:18:
/Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/unsolvable.hpp:24:5: warning: class 'Palette' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
   24 |     class Palette;
      |     ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/core/palette.hpp:14:12: note: previous use is here
   14 |     struct Palette
      |            ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/unsolvable.hpp:24:5: note: did you mean struct here?
   24 |     class Palette;
      |     ^~~~~
      |     struct
      
      /Users/anutosh491/work/mamba/libmamba/src/download/downloader.cpp:965:18: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
  965 |                 [this, iteration](const auto& mirror) {
      |                  ^~~~~
      
      /Users/anutosh491/work/mamba/libmamba/src/download/mirror_impl.cpp:184:38: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]
  184 |             req_gen.push_back([this, split_path](const Request& dl_request, const Content*)
      |                                      ^
/Users/anutosh491/work/mamba/libmamba/src/download/mirror_impl.cpp:164:15: note: 'split_path' declared here
  164 |         auto [split_path, split_tag] = utils::split_path_tag(url_path);
      |               ^
/Users/anutosh491/work/mamba/libmamba/src/download/mirror_impl.cpp:201:28: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]
  201 |                     [this, split_path, split_tag](const Request& dl_request, const Content*)
      |                            ^
/Users/anutosh491/work/mamba/libmamba/src/download/mirror_impl.cpp:164:15: note: 'split_path' declared here
  164 |         auto [split_path, split_tag] = utils::split_path_tag(url_path);
      |               ^
/Users/anutosh491/work/mamba/libmamba/src/download/mirror_impl.cpp:201:40: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]
  201 |                     [this, split_path, split_tag](const Request& dl_request, const Content*)
      |                                        ^
/Users/anutosh491/work/mamba/libmamba/src/download/mirror_impl.cpp:164:27: note: 'split_tag' declared here
  164 |         auto [split_path, split_tag] = utils::split_path_tag(url_path);
      |                           ^
/Users/anutosh491/work/mamba/libmamba/src/download/mirror_impl.cpp:208:34: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]
  208 |         req_gen.push_back([this, split_path](const Request& dl_request, const Content*)
      |                                  ^
/Users/anutosh491/work/mamba/libmamba/src/download/mirror_impl.cpp:164:15: note: 'split_path' declared here
  164 |         auto [split_path, split_tag] = utils::split_path_tag(url_path);
      |               ^
      
      /Users/anutosh491/work/mamba/libmamba/src/core/activation.cpp:574:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
  574 |         std::remove_if(
      |         ^~~~~~~~~~~~~~
  575 |             conda_environment_env_vars.begin(),
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  576 |             conda_environment_env_vars.end(),
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  577 |             [](auto& el) { return el.second == CONDA_ENV_VARS_UNSET_VAR; }
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      /Users/anutosh491/work/mamba/libmamba/include/mamba/core/output.hpp:185:13: warning: private field 'm_line' is not used [-Wunused-private-field]
  185 |         int m_line;
      |             ^
      
      /Users/anutosh491/work/mamba/libmamba/src/core/progress_bar_impl.cpp:1401:50: warning: implicit conversion loses integer precision: 'std::size_t' (aka 'unsigned long') to 'result_type' (aka 'unsigned int') [-Wshorten-64-to-32]
 1401 |             std::default_random_engine generator(seed);
      |                                        ~~~~~~~~~ ^~~~
/Users/anutosh491/work/mamba/libmamba/src/core/progress_bar_impl.cpp:1905:77: warning: variable 'active_count' set but not used [-Wunused-but-set-variable]
 1905 |             std::size_t current = 0, total = 0, in_progress = 0, speed = 0, active_count = 0,
      |                                                                             ^
/Users/anutosh491/work/mamba/libmamba/src/core/progress_bar_impl.cpp:1906:25: warning: variable 'total_count' set but not used [-Wunused-but-set-variable]
 1906 |                         total_count = 0;
      |                         ^
      
      /Users/anutosh491/work/mamba/libmamba/src/core/run.cpp:193:18: warning: unused parameter 'proc_dir_lock' [-Wunused-parameter]
  193 |         LockFile proc_dir_lock
      |                  ^
1 warning generated.

/Users/anutosh491/work/mamba/libmamba/src/core/util.cpp:965:14: warning: unused function 'is_lockfile_locked' [-Wunused-function]
  965 |         bool is_lockfile_locked(const LockFileOwner& lockfile)
      |              ^~~~~~~~~~~~~~~~~~
/Users/anutosh491/work/mamba/libmamba/src/core/transaction.cpp:365:15: warning: unused type alias 'Solution' [-Wunused-local-typedef]
  365 |         using Solution = solver::Solution;
      |               ^
1 warning generated.

In file included from /Users/anutosh491/work/mamba/libmamba/src/api/install.cpp:25:
In file included from /Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/solver.hpp:11:
/Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/unsolvable.hpp:24:5: warning: class 'Palette' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
   24 |     class Palette;
      |     ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/core/palette.hpp:14:12: note: previous use is here
   14 |     struct Palette
      |            ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/unsolvable.hpp:24:5: note: did you mean struct here?
   24 |     class Palette;
      |     ^~~~~
      |     struct

In file included from /Users/anutosh491/work/mamba/libmamba/src/api/remove.cpp:16:
In file included from /Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/solver.hpp:11:
/Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/unsolvable.hpp:24:5: warning: class 'Palette' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
   24 |     class Palette;
      |     ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/core/palette.hpp:14:12: note: previous use is here
   14 |     struct Palette
      |            ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/unsolvable.hpp:24:5: note: did you mean struct here?
   24 |     class Palette;
      |     ^~~~~
      |     struct

In file included from /Users/anutosh491/work/mamba/libmamba/src/api/update.cpp:18:
In file included from /Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/solver.hpp:11:
/Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/unsolvable.hpp:24:5: warning: class 'Palette' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
   24 |     class Palette;
      |     ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/core/palette.hpp:14:12: note: previous use is here
   14 |     struct Palette
      |            ^
/Users/anutosh491/work/mamba/libmamba/include/mamba/solver/libsolv/unsolvable.hpp:24:5: note: did you mean struct here?
   24 |     class Palette;
      |     ^~~~~
      |     struct
      

mamba info / micromamba info

No response

Logs

No response

environment.yml

No response

~/.condarc

No response

anutosh491 avatar Oct 16 '24 07:10 anutosh491