dobyrch / termboy

A Game Boy emulator for your terminal
GNU General Public License v3.0
187 stars 12 forks source link

#error "Unknown endian. Please specify in nall/intrinsics.hpp" raspberry pi 2 b #3

Open benalb opened 9 years ago

benalb commented 9 years ago

foobar@gehena:~/tmp/termboy$ make g++ -x c++ -std=gnu++11 -I. -O3 -fomit-frame-pointer -march=native -c target-ethos/ethos.cpp -o obj/ui-ethos.o
In file included from ./nall/string.hpp:17:0, from ./nall/base64.hpp:5, from ./emulator/emulator.hpp:22, from target-ethos/ethos.hpp:2, from target-ethos/ethos.cpp:3: ./nall/intrinsics.hpp:62:4: warning: #warning "unable to detect endian" [-Wcpp]

warning "unable to detect endian"

^

In file included from ./emulator/emulator.hpp:25:0, from target-ethos/ethos.hpp:2, from target-ethos/ethos.cpp:3: ./nall/endian.hpp:39:4: error: #error "Unknown endian. Please specify in nall/intrinsics.hpp"

error "Unknown endian. Please specify in nall/intrinsics.hpp"

^

Makefile:64: recipe for target 'obj/ui-ethos.o' failed make: *\ [obj/ui-ethos.o] Error 1

foobar@gehena:~/tmp/termboy$ g++ --version g++ (Raspbian 4.9.2-10) 4.9.2

As I know nothing on c++, don't know how to specify in intrinsics.hpp

Adrinus commented 7 years ago

I've done some digging on my own, and while it's late I found this no-where else:

You have to edit nall/intrinsics.hpp

You then need to go to the endian section, and you can make the "else" statement set it to LSB (just copy from above as though it were an i386)

You will also require libasound2-dev from the apt-repository.

benalb commented 7 years ago

Thank you very much. Still having errors:

pi@tartaro:~/tmp/termboy$ grep -A 16 "Endian detec" nall/intrinsics.hpp
/* Endian detection */

if defined(i386) || defined(amd64) || defined(_M_IX86) || defined(_M_AMD64)

define ENDIAN_LSB

define ARCH_LSB

Intrinsics::Endian Intrinsics::endian() { return Intrinsics::Endian::LSB; }

elif defined(powerpc) || defined(_M_PPC) || defined(__BIG_ENDIAN__)

define ENDIAN_MSB

define ARCH_MSB

Intrinsics::Endian Intrinsics::endian() { return Intrinsics::Endian::MSB; }

else

define ENDIAN_LSB

define ARCH_LSB

Intrinsics::Endian Intrinsics::endian() { return Intrinsics::Endian::LSB; }

endif

}

pi@tartaro:~/tmp/termboy$ make g++ -x c++ -std=gnu++11 -I. -O3 -fomit-frame-pointer -march=native -c target-ethos/ethos.cpp -o obj/ui-ethos.o
g++ -x c++ -std=gnu++11 -I. -O3 -fomit-frame-pointer -march=native -c target-ethos/configuration/configuration.cpp -o obj/ui-configuration.o
g++ -x c++ -std=gnu++11 -I. -O3 -fomit-frame-pointer -march=native -c target-ethos/interface/interface.cpp -o obj/ui-interface.o
target-ethos/interface/interface.cpp: In member function ‘virtual void Interface::videoRefresh(const uint32t, unsigned int, unsigned int, unsigned int)’: target-ethos/interface/interface.cpp:116:36: error: ‘mvaddwstr’ was not declared in this scope mvaddwstr(yout, xout, block); ^ Makefile:64: recipe for target 'obj/ui-interface.o' failed make: _\ [obj/ui-interface.o] Error 1

I don't know if this is related. Should I open a new issue?

benalb commented 7 years ago

Well, it seems I misundestood the curses.h note in the README. In raspbian libncursesw5-dev (note the w) must be installed. Now it compiles clean. Time to try it.