amule-project / amule

'All-platform' P2P client based on eMule
993 stars 219 forks source link

latest compile issues on Ubuntu 21.10 #304

Open Stoatwblr opened 2 years ago

Stoatwblr commented 2 years ago

NB: Clang 13 fails to compile entirely because the wrong ar and ranlib are being called (usr/bin/ar and /usr/bin/ranlib instead of llvm-ar and llvm-ranlib)

Under GCC, the following is noted:

(most of this stuff is lint-level but the number overflow is more serious and may explain some issues)

-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
amule-master/src/utils/aLinkCreator/src/md4.cpp: In member function ‘void MD4::MD4Update(MD4::MD4Context*, const unsigned char*, size_t)’:
amule-master/src/utils/aLinkCreator/src/md4.cpp:81:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
    81 |   register uint32_t t;

also

  196 |   register uint32_t a, b, c, d;
IPFilterScanner.cpp: In function ‘int yyiplex(uint32&, uint32&, uint32&, char*&)’:
IPFilterScanner.cpp:854:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
IPFilterScanner.cpp: In function ‘int yy_get_next_buffer()’:
IPFilterScanner.cpp:1157:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]

(lots more along the same lines about -Wregister)

In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from /usr/include/boost/asio/time_traits.hpp:23,
                 from /usr/include/boost/asio/detail/timer_queue_ptime.hpp:22,
                 from /usr/include/boost/asio/detail/deadline_timer_service.hpp:29,
                 from /usr/include/boost/asio/basic_deadline_timer.hpp:25,
                 from /usr/include/boost/asio.hpp:25,
                 from amule-master/src/LibSocketAsio.cpp:45,
                 from amule-master/src/LibSocket.cpp:29:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
./src/RLE.cpp: In member function ‘Encode’:
./src/RLE.cpp:184:46: warning: argument 1 range [18446744072635809793, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/11/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
amule-master/src/RLE.cpp: In member function ‘RLE_Data::Encode(unsigned char const*, int, int&, bool&)’:
amule/amule-master/src/RLE.cpp:184:53: warning: argument 1 range [18446744072635809793, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
  184 |         uint8 * enc_buff = new uint8[m_len * 3/2 + 1];
      |                                                     ^
In file included from /usr/include/c++/11/ext/new_allocator.h:33,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h:33,
                 from /usr/include/c++/11/bits/allocator.h:46,
                 from /usr/include/c++/11/string:41,
                 from /usr/include/wx-3.0/wx/stringimpl.h:66,
                 from /usr/include/wx-3.0/wx/unichar.h:15,
                 from /usr/include/wx-3.0/wx/strvararg.h:22,
                 from /usr/include/wx-3.0/wx/string.h:46,
                 from amule-master/src/Types.h:30,
                 from amule-master/src/RLE.h:29,
                 from amule-master/src/RLE.cpp:25:
/usr/include/c++/11/new:128:26: note: in a call to allocation function ‘operator new[](unsigned long)’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
Stoatwblr commented 2 years ago

This was using 0d3e85e and pulls 043, 168, 191, 212, 218, 249, 244, 294

minnyres commented 2 years ago

I have to say it is really difficult to compile aMule on Linux distributions other than Debian. If there is no special reason, I suggest to install with sudo apt install amule but not build from source。

Stoatwblr commented 2 years ago

*buntu distros ARE debian distros. It's almost all about the desktop with these