Try to move the #include for serialize.h before the #include for uint256.h in remotebitcoinheaders.h, and see if you get further.
New error after moving serialize.h:
$ make
[ 11%] Building CXX object cmake-bitcoinr/CMakeFiles/bitcoinr.dir/__/src/remoteminermain.cpp.o
In file included fromhome/denizzz/bitcoin-pooled/src/remote/remotebitcoinheaders.h:33,
fromhome/denizzz/bitcoin-pooled/src/remoteminermain.cpp:19:
/home/denizzz/bitcoin-pooled/src/remote/../serialize.h: In function void Unserialize_impl(Stream&, std::vector<T, A>&, int, int, const boost::true_type&):
/home/denizzz/bitcoin-pooled/src/remote/../serialize.h:475: error: there are no arguments to min that depend on a template parameter, so a declaration of min must be available
I wonder how it is builds under the windows
