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

aMule 2.3.3 fails to build with musl C-Library #341

Open
ernsteiswuerfel opened this issue Sep 21, 2022 · 3 comments
Open

aMule 2.3.3 fails to build with musl C-Library #341

ernsteiswuerfel opened this issue Sep 21, 2022 · 3 comments

Comments

@ernsteiswuerfel
Copy link

Trying to build aMule 2.3.3 on my Gentoo musl box it errors out with MuleDebug.cpp:70:14: error: 'set_terminate' is not a member of 'std'

[...]
/usr/include/wx-3.0-gtk3/wx/string.h:4055:86: warning: implicitly-declared 'constexpr wxUniCharRef::wxUniCharRef(const wxUniCharRef&)' is deprecated [-Wdeprecated-copy]
 4055 | inline bool operator!=(const wxString& s, const wxUniCharRef& c) { return !s.IsSameAs(c); }
      |                                                                            ~~~~~~~~~~^~~
/usr/include/wx-3.0-gtk3/wx/unichar.h:224:19: note: because 'wxUniCharRef' has user-provided 'wxUniCharRef& wxUniCharRef::operator=(const wxUniCharRef&)'
  224 |     wxUniCharRef& operator=(const wxUniCharRef& c)
      |                   ^~~~~~~~
/usr/include/wx-3.0-gtk3/wx/string.h:2146:30: note:   initializing argument 1 of 'bool wxString::IsSameAs(wxUniCharRef, bool) const'
 2146 |   bool IsSameAs(wxUniCharRef c, bool compareWithCase = true) const
      |                 ~~~~~~~~~~~~~^
MuleDebug.cpp: In function 'void OnUnhandledException()':
MuleDebug.cpp:70:14: error: 'set_terminate' is not a member of 'std'
   70 |         std::set_terminate(std::abort);
      |              ^~~~~~~~~~~~~
MuleDebug.cpp: In function 'void InstallMuleExceptionHandler()':
MuleDebug.cpp:113:14: error: 'set_terminate' is not a member of 'std'
  113 |         std::set_terminate(OnUnhandledException);
      |              ^~~~~~~~~~~~~
MuleDebug.cpp: In function 'wxString get_backtrace(unsigned int)':
MuleDebug.cpp:313:33: warning: unused parameter 'n' [-Wunused-parameter]
  313 | wxString get_backtrace(unsigned n)
      |                        ~~~~~~~~~^
MuleDebug.cpp: At global scope:
MuleDebug.cpp:287:17: warning: 'wxString demangle(const wxString&)' defined but not used [-Wunused-function]
  287 | static wxString demangle(const wxString& function)
      |                 ^~~~~~~~
make[4]: *** [Makefile:536: MuleDebug.o] Error 1

Same with git HEAD. But it builds fine on my other Gentoo box with glibc C-Library.

Here is the Gentoo downstream bug report: https://bugs.gentoo.org/872263

amule-2.3.3:20220921-215952.log
config.log

@minnyres
Copy link

This will happen for GCC 11 or later. Try this patch: https://github.com/minnyres/amule-win32/blob/main/patches/amule-fix-exception.patch

@ernsteiswuerfel
Copy link
Author

ernsteiswuerfel commented Sep 23, 2022

This will happen for GCC 11 or later. Try this patch: https://github.com/minnyres/amule-win32/blob/main/patches/amule-fix-exception.patch

Thanks! With this patch 2.3.3 and HEAD build fine.

If it's a general GCC>=11 problem I guess the patch will be merged in git-master?

@minnyres
Copy link

If it's a general GCC>=11 problem I guess the patch will be merged in git-master?

Yes I think it will be merged in git-master one day, but this project is not under active development recently since the maintainers have their own life.

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

No branches or pull requests

2 participants