kpeeters / cadabra2

A field-theory motivated approach to computer algebra.
https://cadabra.science/
GNU General Public License v3.0
228 stars 37 forks source link

Not compatible with boost 1.70 #139

Closed yurivict closed 5 years ago

yurivict commented 5 years ago
.../work/cadabra2-2.2.5-5-gf10cac6b9a/libs/websocketpp/websocketpp/transport/asio/security/none.hpp:171:25: note: in instantiation of function template specialization 'std::__1::make_shared<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>, std::__1::reference_wrapper<boost::asio::io_context> >' requested here
        m_socket = lib::make_shared<lib::asio::ip::tcp::socket>(
                        ^

Reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236589

kpeeters commented 5 years ago

Do you know if this has been fixed upstream in websocketpp?

yurivict commented 5 years ago

Do you know if this has been fixed upstream in websocketpp?

I don't know, in this case I only passed the message. But the FreeBSD port was supposed to use packaged (unbundled) websocketpp, but that part has eroded and it wasn't unbundled. I will fix this shortly, not sure if this will also fix the boost problem for the cadabra2 port.

yurivict commented 5 years ago

You should use packaged websocketpp. It is available virtually everywhere: https://repology.org/project/websocketpp/versions This would minimize the chance for such issues to arise.

Same with jsoncpp: https://repology.org/project/jsoncpp/versions

kpeeters commented 5 years ago

You can already build against system-provided jsoncpp by using

-DENABLE_SYSTEM_JSONCPP=ON

For websocketpp the only major platform missing seems to be Homebrew (macOS). So I'll probably keep dragging it around for a while longer (it is a lot easier to ship Cadabra with websocketpp than to deal with the support questions of people who are not able to build it from source on macOS themselves).

yurivict commented 5 years ago

people who are not able to build it from source on macOS themselves

This shouldn't normally happen, on all major platforms everything should be installed through packages. Even I personally wouldn't be building anything just to run it. I usually build things only with the purpose of creating the FreeBSD port, otherwise this is obviously a wasteful process.

FYI: MacPorts have a mailing list: MacPorts Users <macports-users@lists.macports.org>. I used it once to request the port for GAMESS quantum chemistry package, and they did create it. I recommend you should ask them to create missing ports that cadabra2 needs.

kpeeters commented 5 years ago

Macports already has cadabra2, it is Homebrew that is the problem. You can't mix the two very well, so I can't just give up on the latter. Many of my users build from source, mostly because they often want to have access to the very latest version. Whether that's good or not is debatable, but I can't really change it.

kpeeters commented 5 years ago

I just swapped out websocketpp for the latest version, but get an exception on wserver.start_accept(),

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  set_option: Bad file descriptor

(on Linux). Did you see this already?

yurivict commented 5 years ago

Did you see this already?

We have websocketpp-0.8.1 which is the latest version, and cadabra2 builds fine with it (rev.f10cac6b9a).

kpeeters commented 5 years ago

Building is fine, but does it run? (does cadabra-server start up and spit out a port number?).

yurivict commented 5 years ago

Yes, it doesn't run, Abort trap. Before unbundling it ran fine.

kpeeters commented 5 years ago

Do things work if I patch that file in your original report to have std:: instead of lib::? If so I'll just fix it temporarily that way; have very little time right now to hunt down the Abort trap origin.

kpeeters commented 5 years ago

Aargh, sorry, I should have read the bug report you linked to. Ok, this is more complicated, will have to wait for now.

yurivict commented 5 years ago

Relevant websocketpp PR: https://github.com/zaphoyd/websocketpp/pull/810

kpeeters commented 5 years ago

Thanks, I'll give that a shot.

kpeeters commented 5 years ago

I have isolated the problem and posted an issue on the websocketpp issue tracker; let's see if that helps.

yurivict commented 5 years ago

Thank you.

kpeeters commented 5 years ago

All works fine with TCP_NO_DELAY disabled, so I have now pushed an update to github master with websocketpp 0.8.1 and that option turned off. Can you give that a shot with boost 1.70 for me please?

yurivict commented 5 years ago

rev. 30bf554e3b fails with the same message as https://github.com/kpeeters/cadabra2/issues/144 :

In file included from /usr/ports/math/cadabra2/work/cadabra2-2.2.6-5-g30bf554e3b/client_server/cadabra-server.cc:4:
In file included from /usr/ports/math/cadabra2/work/cadabra2-2.2.6-5-g30bf554e3b/client_server/./Server.hh:5:
In file included from /usr/local/include/websocketpp/config/asio_no_tls.hpp:32:
In file included from /usr/local/include/websocketpp/transport/asio/endpoint.hpp:32:
In file included from /usr/local/include/websocketpp/transport/asio/connection.hpp:31:
In file included from /usr/local/include/websocketpp/transport/asio/base.hpp:31:
In file included from /usr/local/include/websocketpp/common/asio.hpp:61:
In file included from /usr/local/include/boost/asio/steady_timer.hpp:22:
In file included from /usr/local/include/boost/asio/basic_waitable_timer.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:179:22: error: no member named 'context' in 'std::__1::reference_wrapper<boost::asio::io_context>'
    return executor_.context();
           ~~~~~~~~~ ^
kpeeters commented 5 years ago

I applied those two commits in https://github.com/zaphoyd/websocketpp/pull/810 so those apparently do not yet fully resolve the issue in https://github.com/zaphoyd/websocketpp/issues/794. I'll wait for them to resolve that.

stefan-floeren commented 5 years ago

@kpeeters As the commits do not solve your error, could you give me some kind of error message what's going wrong? Or does it compile and you refer to the no-delay error which you reported separately?

kpeeters commented 5 years ago

@stefan-floeren According to @yurivict 's comment above https://github.com/kpeeters/cadabra2/issues/139#issuecomment-485146475 there is still a compilation error. I haven't had time yet to verify this myself.

stefan-floeren commented 5 years ago

I cannot reproduce this issue, that's why I'm asking for more information (system, compiler, ...).

kpeeters commented 5 years ago

I only know it's a FreeBSD box; @yurivict can you please send details to @stefan-floeren ?

yurivict commented 5 years ago

cadabra2 builds ok with the patches from zaphoyd/websocketpp#810

@stefan-floeren Could you please merge them and make a release of websocketpp?

stefan-floeren commented 5 years ago

I do not have write permissions, so unfortunately no.

kpeeters commented 5 years ago

Closing this as the websocketpp bundled with Cadabra has the patches applied anyway.