sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.51k stars 582 forks source link

Fails to compile #415

Closed zilti closed 4 years ago

zilti commented 4 years ago

System: FreeBSD 12.1 Compile log:

root@:/usr/home/zilti # gem install mailcatcher
Building native extensions. This could take a while...
ERROR:  Error installing mailcatcher:
        ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/2.6/gems/eventmachine-1.0.9.1/ext
/usr/local/bin/ruby26 -I /usr/local/lib/ruby/site_ruby/2.6 -r ./siteconf20200319-2434-1gl9vke.rb extconf.rb
checking for -lcrypto... yes
checking for -lssl... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for pipe2() in unistd.h... yes
checking for accept4() in sys/socket.h... yes
checking for SOCK_CLOEXEC in sys/socket.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... yes
checking for CLOCK_MONOTONIC_RAW in time.h... no
checking for CLOCK_MONOTONIC in time.h... yes
CXXFLAGS=-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result -Wno-address
creating Makefile

current directory: /usr/local/lib/ruby/gems/2.6/gems/eventmachine-1.0.9.1/ext
make "DESTDIR=" clean

current directory: /usr/local/lib/ruby/gems/2.6/gems/eventmachine-1.0.9.1/ext
make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:
In file included from ./project.h:165:
In file included from ./em.h:24:
In file included from /usr/local/include/ruby-2.6/ruby.h:33:
In file included from /usr/local/include/ruby-2.6/ruby/ruby.h:2111:
/usr/local/include/ruby-2.6/ruby/intern.h:56:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                  ^~~~~~~~~
/usr/local/include/ruby-2.6/ruby/intern.h:56:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                                   ^~~~~~~~~
2 warnings generated.
compiling cmain.cpp
In file included from cmain.cpp:20:
In file included from ./project.h:165:
In file included from ./em.h:24:
In file included from /usr/local/include/ruby-2.6/ruby.h:33:
In file included from /usr/local/include/ruby-2.6/ruby/ruby.h:2111:
/usr/local/include/ruby-2.6/ruby/intern.h:56:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                  ^~~~~~~~~
/usr/local/include/ruby-2.6/ruby/intern.h:56:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                                   ^~~~~~~~~
2 warnings generated.
compiling ed.cpp
In file included from ed.cpp:20:
In file included from ./project.h:165:
In file included from ./em.h:24:
In file included from /usr/local/include/ruby-2.6/ruby.h:33:
In file included from /usr/local/include/ruby-2.6/ruby/ruby.h:2111:
/usr/local/include/ruby-2.6/ruby/intern.h:56:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                  ^~~~~~~~~
/usr/local/include/ruby-2.6/ruby/intern.h:56:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                                   ^~~~~~~~~
2 warnings generated.
compiling em.cpp
In file included from em.cpp:23:
In file included from ./project.h:165:
In file included from ./em.h:24:
In file included from /usr/local/include/ruby-2.6/ruby.h:33:
In file included from /usr/local/include/ruby-2.6/ruby/ruby.h:2111:
/usr/local/include/ruby-2.6/ruby/intern.h:56:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                  ^~~~~~~~~
/usr/local/include/ruby-2.6/ruby/intern.h:56:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                                   ^~~~~~~~~
em.cpp:1232:40: error: invalid operands to binary expression ('__bind<int &, sockaddr *&, int &>' and 'int')
                if (bind (sd, bind_to, bind_to_size) < 0) {
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/usr/include/c++/v1/system_error:306:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, int &>' to 'const std::__1::error_condition' for 1st argument
operator<(const error_condition& __x, const error_condition& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:383:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, int &>' to 'const std::__1::error_code' for 1st argument
operator<(const error_code& __x, const error_code& __y) _NOEXCEPT
^
/usr/include/c++/v1/utility:596:1: note: candidate template ignored: could not match 'pair' against '__bind'
operator< (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
^
/usr/include/c++/v1/iterator:720:1: note: candidate template ignored: could not match 'reverse_iterator' against '__bind'
operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
^
/usr/include/c++/v1/iterator:1161:1: note: candidate template ignored: could not match 'move_iterator' against '__bind'
operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
^
/usr/include/c++/v1/iterator:1533:1: note: candidate template ignored: could not match '__wrap_iter' against '__bind'
operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT_DEBUG
^
/usr/include/c++/v1/tuple:1165:1: note: candidate template ignored: could not match 'tuple' against '__bind'
operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
^
/usr/include/c++/v1/memory:2974:1: note: candidate template ignored: could not match 'unique_ptr' against '__bind'
operator< (const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y)
^
/usr/include/c++/v1/memory:3032:1: note: candidate template ignored: could not match 'unique_ptr' against '__bind'
operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t)
^
/usr/include/c++/v1/memory:3041:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'int'
operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x)
^
/usr/include/c++/v1/memory:4812:1: note: candidate template ignored: could not match 'shared_ptr' against '__bind'
operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
^
/usr/include/c++/v1/memory:4882:1: note: candidate template ignored: could not match 'shared_ptr' against '__bind'
operator<(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
^
/usr/include/c++/v1/memory:4890:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'int'
operator<(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
^
/usr/include/c++/v1/string_view:674:6: note: candidate template ignored: could not match 'basic_string_view' against '__bind'
bool operator<(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
     ^
/usr/include/c++/v1/string_view:681:6: note: candidate template ignored: could not match 'basic_string_view' against '__bind'
bool operator<(basic_string_view<_CharT, _Traits> __lhs,
     ^
/usr/include/c++/v1/string_view:689:6: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'int'
bool operator<(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs, 
     ^
/usr/include/c++/v1/string:3931:1: note: candidate template ignored: could not match 'basic_string' against '__bind'
operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
^
/usr/include/c++/v1/string:3940:1: note: candidate template ignored: could not match 'basic_string' against '__bind'
operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
^
/usr/include/c++/v1/string:3949:1: note: candidate template ignored: could not match 'const _CharT *' against '__bind<int &, sockaddr *&, int &>'
operator< (const _CharT* __lhs,
^
/usr/include/c++/v1/map:1572:1: note: candidate template ignored: could not match 'map' against '__bind'
operator< (const map<_Key, _Tp, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/map:2117:1: note: candidate template ignored: could not match 'multimap' against '__bind'
operator< (const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/set:868:1: note: candidate template ignored: could not match 'set' against '__bind'
operator< (const set<_Key, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/set:1356:1: note: candidate template ignored: could not match 'multiset' against '__bind'
operator< (const multiset<_Key, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/vector:3378:1: note: candidate template ignored: could not match 'vector' against '__bind'
operator< (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
^
/usr/include/c++/v1/deque:2898:1: note: candidate template ignored: could not match 'deque' against '__bind'
operator< (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
^
em.cpp:1654:6: error: value of type '__bind<int &, sockaddr *&, int &>' is not contextually convertible to 'bool'
        if (bind (sd_accept, bind_here, bind_size)) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
em.cpp:1714:53: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned long>' and 'int')
        if (bind (sd, (struct sockaddr*)&sin, sizeof(sin)) != 0)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~
/usr/include/c++/v1/system_error:420:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *, unsigned long>' to 'const std::__1::error_code' for 1st argument
operator!=(const error_code& __x, const error_code& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:425:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *, unsigned long>' to 'const std::__1::error_code' for 1st argument
operator!=(const error_code& __x, const error_condition& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:430:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *, unsigned long>' to 'const std::__1::error_condition' for 1st argument
operator!=(const error_condition& __x, const error_code& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:435:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *, unsigned long>' to 'const std::__1::error_condition' for 1st argument
operator!=(const error_condition& __x, const error_condition& __y) _NOEXCEPT
^
/usr/include/c++/v1/utility:588:1: note: candidate template ignored: could not match 'pair' against '__bind'
operator!=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
^
/usr/include/c++/v1/iterator:728:1: note: candidate template ignored: could not match 'reverse_iterator' against '__bind'
operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
^
/usr/include/c++/v1/iterator:950:1: note: candidate template ignored: could not match 'istream_iterator' against '__bind'
operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
^
/usr/include/c++/v1/iterator:1051:6: note: candidate template ignored: could not match 'istreambuf_iterator' against '__bind'
bool operator!=(const istreambuf_iterator<_CharT,_Traits>& __a,
     ^
/usr/include/c++/v1/iterator:1169:1: note: candidate template ignored: could not match 'move_iterator' against '__bind'
operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
^
/usr/include/c++/v1/iterator:1545:1: note: candidate template ignored: could not match '__wrap_iter' against '__bind'
operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT_DEBUG
^
/usr/include/c++/v1/iterator:1577:1: note: candidate template ignored: could not match '__wrap_iter' against '__bind'
operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT_DEBUG
^
/usr/include/c++/v1/tuple:1130:1: note: candidate template ignored: could not match 'tuple' against '__bind'
operator!=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
^
/usr/include/c++/v1/memory:1991:6: note: candidate template ignored: could not match 'allocator' against '__bind'
bool operator!=(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return false;}
     ^
/usr/include/c++/v1/memory:2969:1: note: candidate template ignored: could not match 'unique_ptr' against '__bind'
operator!=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x == __y);}
^
/usr/include/c++/v1/memory:3016:1: note: candidate template ignored: could not match 'unique_ptr' against '__bind'
operator!=(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
^
/usr/include/c++/v1/memory:3024:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'int'
operator!=(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
^
/usr/include/c++/v1/memory:4804:1: note: candidate template ignored: could not match 'shared_ptr' against '__bind'
operator!=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
^
/usr/include/c++/v1/memory:4866:1: note: candidate template ignored: could not match 'shared_ptr' against '__bind'
operator!=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
^
/usr/include/c++/v1/memory:4874:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'int'
operator!=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
^
/usr/include/c++/v1/functional:2390:1: note: candidate template ignored: could not match 'function' against '__bind'
operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return (bool)__f;}
^
/usr/include/c++/v1/functional:2395:1: note: candidate template ignored: could not match 'function<type-parameter-0-0 (type-parameter-0-1...)>' against 'int'
operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return (bool)__f;}
^
/usr/include/c++/v1/string_view:643:6: note: candidate template ignored: could not match 'basic_string_view' against '__bind'
bool operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
     ^
/usr/include/c++/v1/string_view:652:6: note: candidate template ignored: could not match 'basic_string_view' against '__bind'
bool operator!=(basic_string_view<_CharT, _Traits> __lhs,
     ^
/usr/include/c++/v1/string_view:662:6: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'int'
bool operator!=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs, 
     ^
/usr/include/c++/v1/string:569:6: note: candidate template ignored: could not match 'fpos' against '__bind'
bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y)
     ^
/usr/include/c++/v1/string:3902:1: note: candidate template ignored: could not match 'basic_string' against '__bind'
operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
^
/usr/include/c++/v1/string:3911:1: note: candidate template ignored: could not match 'const _CharT *' against '__bind<int &, sockaddr *, unsigned long>'
operator!=(const _CharT* __lhs,
^
/usr/include/c++/v1/string:3920:1: note: candidate template ignored: could not match 'basic_string' against '__bind'
operator!=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
^
/usr/include/c++/v1/map:1581:1: note: candidate template ignored: could not match 'map' against '__bind'
operator!=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/map:2126:1: note: candidate template ignored: could not match 'multimap' against '__bind'
operator!=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/set:877:1: note: candidate template ignored: could not match 'set' against '__bind'
operator!=(const set<_Key, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/set:1365:1: note: candidate template ignored: could not match 'multiset' against '__bind'
operator!=(const multiset<_Key, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/vector:3370:1: note: candidate template ignored: could not match 'vector' against '__bind'
operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
^
/usr/include/c++/v1/deque:2890:1: note: candidate template ignored: could not match 'deque' against '__bind'
operator!=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
^
em.cpp:1998:6: error: value of type '__bind<int &, sockaddr *, unsigned long>' is not contextually convertible to 'bool'
        if (bind (sd_accept, (struct sockaddr*)&s_sun, sizeof(s_sun))) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 4 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/local/lib/ruby/gems/2.6/gems/eventmachine-1.0.9.1/ext

make failed, exit code 1

Gem files will remain installed in /usr/local/lib/ruby/gems/2.6/gems/eventmachine-1.0.9.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.6/extensions/amd64-freebsd-12/2.6/eventmachine-1.0.9.1/gem_make.out
sj26 commented 4 years ago

Sorry @zilti, sounds like this might be a compile problem with eventmachine?

rsdsllc-com-dipenc commented 7 months ago

I have the same issue, how did you fix this @zilti ?