daminetreg / lib-tftp-server

TFTP server implemetation in C++ : Boost.ASIO + Boost.Spirit Based, header only and trivial.
Boost Software License 1.0
18 stars 4 forks source link

Fails to compile against recent boost libraries #3

Closed lundmar closed 6 years ago

lundmar commented 6 years ago

Hi,

I wanted to try out lib-tftp-server on Ubuntu 17.10 which comes with more recent boost libraries (boost v1.62) and (of course) it fails to compile:

In file included from /home/malu/test/git/lib-tftp-server/src/tftp/server.hpp:27:0,                                                           
                 from /home/malu/test/git/lib-tftp-server/src/main.cpp:4:                                                                     
/home/malu/test/git/lib-tftp-server/src/tftp/detail/tftp_packet_grammar.hpp:152:5: error: reference to ‘rule’ is ambiguous                    
     rule<Iterator, possible_request()> request;                                                                              

This type of error can be fixed by explicitly defining the namespace via "qi::rule". However, after that the code runs in to some nasty boost assertions related to qi/karama stuff, which seems less trivial to fix:

/home/malu/test/git/lib-tftp-server/src/tftp/server.hpp:80:63:   required from here                                                                                                                                                                                                         
/usr/include/boost/spirit/home/qi/nonterminal/rule.hpp:177:13: error: static assertion failed: error_invalid_expression                                                                                                                                                                     
             BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr);            

Would be nice with a small update to make it compile against more recent boost libs. Thanks.

daminetreg commented 6 years ago

As of commit 62740b26926fdf96bdd8082df151181d9c7f7d65 from @dan-42 this is fixed.