allan-simon / linthesia

tentative to fix/rewrite linthesia , an open-source synthesia/ "piano-hero" like game
GNU General Public License v2.0
49 stars 19 forks source link

build issues on armhf debian wheezy raspian #82

Open eadmaster opened 9 years ago

eadmaster commented 9 years ago

I am running a raspian build meant for the banana pi board (based on Debian Wheezy). I should have all the dependencies installed, howerer the configure script fails like this:

./configure
checking for a BSD-compatible install... E: Syntax error conftest.one:2: Extra junk at end of file
E: Syntax error conftest.one:2: Extra junk at end of file
/usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
...
checking for set... no
checking exception usability... no
checking exception presence... no
checking for exception... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for SFML... no
configure: error: Package requirements (sfml-graphics) were not met:

No package 'sfml-graphics' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SFML_CFLAGS
and SFML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
allan-simon commented 9 years ago

hello thanks for the bug report, have you tried compiling from source an other software based on SFML to see if it's a problem from my config or if it's a problem in the package of that distribution ?

eadmaster commented 9 years ago

apperently the error is due to the fact that linthesia requires libsfml 2.x while Debian Wheezy provide the v1.6 which is not backward compatible...

eadmaster commented 9 years ago

update: i've compiled myself the latest sfml v2.2 and set the environment variables SFML_CFLAGS and SFML_LIBS as suggested. Now the configure script finishes successfully. But the compilation fails because the compiler (gcc v4.6.3) does not support the C++11 standard: i've tried replacing the flag "-std=c++11" as "-std=c++0x" but it fails due to unimplemented: non-static data member initializers in abstract_screen.h and context.h . Maybe this could be fixed with a test macro in the code?

allan-simon commented 9 years ago

I don't have my dev computer with me right now

can you try to add a static in front of the variable in src/context/context.h line 51 and same thing for the variable in src/screens/abstract_screen.h line 20, if it works i will patch the code .

eadmaster commented 9 years ago

Ok, I've done that, now it's complaining about the rtmidi library:

midi_io/midi_in.cpp: In member function ‘void linthesia::MidiIn::open()’:
midi_io/midi_in.cpp:62:12: error: expected type-specifier before ‘RtMidiError’
midi_io/midi_in.cpp:62:24: error: expected ‘)’ before ‘&’ token
midi_io/midi_in.cpp:62:24: error: expected ‘{’ before ‘&’ token
midi_io/midi_in.cpp:62:25: error: ‘error’ was not declared in this scope
midi_io/midi_in.cpp:62:30: error: expected ‘;’ before ‘)’ token
make[2]: *** [midi_io/linthesia-midi_in.o] Error 1
make[2]: Leaving directory `/home/pi/linthesia/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pi/linthesia'
make: *** [all] Error 2

I have librtmidi-dev 1.0.15 installed, need to update?

allan-simon commented 9 years ago

hmm certainly a error due to C++11 syntax and the support i would say. If i haven't answered you in 24 hours can you poke me again in this ticket ?

also can you try if you have clang package to compile with it as this compiler had an earlier better support of c++11

eadmaster commented 9 years ago

just tried with clang:

    $ export CC=/usr/bin/clang++
    $ export CXX=/usr/bin/clang++
    $ ./configure
    $ make
    make  all-recursive
    make[1]: Entering directory `/home/pi/linthesia'
    Making all in src
    make[2]: Entering directory `/home/pi/linthesia/src'
    /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I..  -DGRAPHDIR="\"../graphics\"" -D__LINUX_JACK__    -Wall -std=c++11 -iquote ../libmidi -g -O2 -std=c++0x -MT midi_io/linthesia-midi_in.o -MD -MP -MF midi_io/.deps/linthesia-midi_in.Tpo -c -o midi_io/linthesia-midi_in.o `test -f 'midi_io/midi_in.cpp' || echo './'`midi_io/midi_in.cpp
midi_io/midi_in.cpp:62:12: error: unknown type name 'RtMidiError'; did you mean
      'MidiError'?
    catch (RtMidiError &error) {
           ^~~~~~~~~~~
           MidiError
./libmidi/midi.h:21:7: note: 'MidiError' declared here
class MidiError;
      ^
midi_io/midi_in.cpp:63:15: error: no member named 'printMessage' in 'MidiError'
        error.printMessage();
        ~~~~~ ^
2 errors generated.
make[2]: *** [midi_io/linthesia-midi_in.o] Error 1
make[2]: Leaving directory `/home/pi/linthesia/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pi/linthesia'
make: *** [all] Error 2
allan-simon commented 9 years ago

interesting, which version of RtMidi do you have ?

allan-simon commented 9 years ago

for Rtmidi, it seems they have renamed stuff between 2.0 and 2.1 so your latest errors are maybe related to that, someone else has started to issue a Pull request on that.

Erudition commented 7 years ago

Same issue as above with rtmidi, on Trisquel 7 (Ubuntu derivative). Even when I manually download the latest rtmidi deb, plus its dependencies (like eventually c++6 which breaks libreoffice), I move on to this error: `midi_in.cpp: undefined reference to "RtMidiIn::RtMidiIn(RtMidi::Api, std::string, unsigned int)