I've been attempting to build lsnes on Debian squeeze. Squeeze only has gcc 4.4, and the manual indicates that >=4.6 is required, so I started by installing 4.7. It looks like this actually doesn't work, though: I ran into
bsnes/nall/string/core.hpp:10:3: error: ‘make_string’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /home/jake/bsnes/nall/string.hpp:29:0,
from /home/jake/bsnes/nall/dl.hpp:8,
from /home/jake/bsnes/snes/snes.hpp:24,
from ../../include/core/bsnes.hpp:5,
from lsnes-dumpavi.cpp:1:
/home/jake/bsnes/nall/string/cast.hpp:179:35: note: ‘template<class>
nall::stringify<T> nall::make_string(T)’ declared here, later
in the translation unit
Which is mentioned
here as an incompatibility between 4.6 and 4.7. It also indicates that 4.7 has a compatibility mode that can be invoked with -fpermissive, and turning that on changes all the previous errors to warnings, but now I'm hitting
loadlib.cpp: In function ‘void load_library(const string&)’:
loadlib.cpp:25:22: error: ‘getcwd’ was not declared in this scope
and now I'm not sure how to proceed.
A patch to the code to fix the out of order function thing for 4.7 would be nice; failing that a mention in the manual that it will be necessary is probably in order. And of course, I would welcome any advice on how to overcome this latest obstacle :)
EDIT: Adding "#include <unistd>" to include/core/loadlib.hpp resolved that particular part of it, but now I'm running into some odd trouble inside boost:
misc.cpp:255:31: required from here
/usr/include/boost/exception/exception.hpp:399:44: error: use of deleted function \
‘boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector\
<boost::filesystem::basic_filesystem_error<boost::filesystem::basic_path\
<std::basic_string<char>, boost::filesystem::path_traits> > > >\
::clone_impl(const boost::exception_detail::clone_impl<boost::exception_detail::\
error_info_injector<boost::filesystem::basic_filesystem_error<boost::filesystem::\
basic_path<std::basic_string<char>, boost::filesystem::path_traits> > > >&)’
/usr/include/boost/exception/exception.hpp: In instantiation of ‘void boost::exception_detail::clone_impl<T>::rethrow() const [with T = boost::exception_detail::error_info_injector<boost::filesystem::\
basic_filesystem_error<boost::filesystem::basic_path<std::\
basic_string<char>, boost::filesystem::path_traits> > >]’:
This seems less likely to be lsnes's fault, but I'm pretty confused about why that "include <unistd>" was missing. And if anyone happens to know what's up with boost here, that would be great.