Dosbox-staging: RPi can't compile latest master

Created on 22 Apr 2020  Â·  5Comments  Â·  Source: dosbox-staging/dosbox-staging

Hello @kcgen @dreamer! Hope you guys are doing ok. I'm looking closely on progress about Dosbox-Staging and this looks really impressive!

I was waiting for the latest commits to be merged before deciding to give a try to the latest master to see if everything would go well. Unfortunately I got a compile issue likely related to drmp3 lib as far as I can tell.

  • Environment:
    Raspbian Jessie (the one shipped with Retropie+all packages up-to-date)
    Retropie Version 4.5.19 (latest)
    Pi3B+
    SDL2 2.0.10 (no dispmanx)
$ git describe
v0.76.0-alpha-1-g2e9f0c67
$ ./configure --disable-screenshots --disable-network
[snip]
$ make -j2
[snip]
g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../../..  -I../../../include -I/usr/include/SDL2 -D_REENTRANT  -g -O2  -Wpedantic -Wall -I/usr/include/opus  -g -O2  -MT libdecoders_a-mp3_seek_table.o -MD -MP -MF .deps/libdecoders_a-mp3_seek_table.Tpo -c -o libdecoders_a-mp3_seek_table.o `test -f 'mp3_seek_table.cpp' || echo './'`mp3_seek_table.cpp
In file included from mp3.cpp:34:0:
dr_mp3.h:674:50: error: ‘drmp32_int32’ does not name a type
 static __inline__ __attribute__((always_inline)) drmp32_int32 drmp3_clip_int16_arm(int32_t a)
                                                  ^~~~~~~~~~~~
In file included from mp3.cpp:34:0:
dr_mp3.h: In function ‘drmp3_int16 drmp3d_scale_pcm(float)’:
dr_mp3.h:1905:46: error: ‘drmp3_clip_int16_arm’ was not declared in this scope
     s = (drmp3_int16)drmp3_clip_int16_arm(s32);
                                              ^
Makefile:472: recipe for target 'libdecoders_a-mp3.o' failed
make[4]: *** [libdecoders_a-mp3.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from /usr/include/c++/6/map:60:0,
                 from mp3_seek_table.cpp:84:
/usr/include/c++/6/bits/stl_tree.h: In member function ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, const key_type&) [with _Key = long long unsigned int; _Val = std::pair<const long long unsigned int, std::vector<drmp3_seek_point_serial> >; _KeyOfValue = std::_Select1st<std::pair<const long long unsigned int, std::vector<drmp3_seek_point_serial> > >; _Compare = std::less<long long unsigned int>; _Alloc = std::allocator<std::pair<const long long unsigned int, std::vector<drmp3_seek_point_serial> > >]’:
/usr/include/c++/6/bits/stl_tree.h:1928:5: note: parameter passing for argument of type ‘std::_Rb_tree<long long unsigned int, std::pair<const long long unsigned int, std::vector<drmp3_seek_point_serial> >, std::_Select1st<std::pair<const long long unsigned int, std::vector<drmp3_seek_point_serial> > >, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, std::vector<drmp3_seek_point_serial> > > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const long long unsigned int, std::vector<drmp3_seek_point_serial> > >}’ will change in GCC 7.1
     _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_tree.h: In member function ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, const key_type&) [with _Key = long long unsigned int; _Val = std::pair<const long long unsigned int, long long unsigned int>; _KeyOfValue = std::_Select1st<std::pair<const long long unsigned int, long long unsigned int> >; _Compare = std::less<long long unsigned int>; _Alloc = std::allocator<std::pair<const long long unsigned int, long long unsigned int> >]’:
/usr/include/c++/6/bits/stl_tree.h:1928:5: note: parameter passing for argument of type ‘std::_Rb_tree<long long unsigned int, std::pair<const long long unsigned int, long long unsigned int>, std::_Select1st<std::pair<const long long unsigned int, long long unsigned int> >, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, long long unsigned int> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const long long unsigned int, long long unsigned int> >}’ will change in GCC 7.1
In file included from /usr/include/c++/6/vector:69:0,
                 from mp3_seek_table.h:30,
                 from mp3_seek_table.cpp:92:
/usr/include/c++/6/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const drmp3_seek_point_serial&}; _Tp = drmp3_seek_point_serial; _Alloc = std::allocator<drmp3_seek_point_serial>]’:
/usr/include/c++/6/bits/vector.tcc:321:7: note: parameter passing for argument of type ‘std::vector<drmp3_seek_point_serial>::iterator {aka __gnu_cxx::__normal_iterator<drmp3_seek_point_serial*, std::vector<drmp3_seek_point_serial> >}’ will change in GCC 7.1
       vector<_Tp, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/vector.tcc:321:7: note: parameter passing for argument of type ‘std::vector<drmp3_seek_point_serial>::iterator {aka __gnu_cxx::__normal_iterator<drmp3_seek_point_serial*, std::vector<drmp3_seek_point_serial> >}’ will change in GCC 7.1
/usr/include/c++/6/bits/vector.tcc: In function ‘Uint64 load_existing_seek_points(const char*, const Uint64&, std::map<long long unsigned int, std::vector<drmp3_seek_point_serial> >&, std::map<long long unsigned int, long long unsigned int>&, std::vector<drmp3_seek_point_serial>&)’:
/usr/include/c++/6/bits/vector.tcc:131:6: note: parameter passing for argument of type ‘const __gnu_cxx::__normal_iterator<drmp3_seek_point_serial*, std::vector<drmp3_seek_point_serial> >’ will change in GCC 7.1
      _M_insert_aux(__pos, __x);
      ^~~~~~~~~~~~~
mv -f .deps/libdecoders_a-mp3_seek_table.Tpo .deps/libdecoders_a-mp3_seek_table.Po
mv -f .deps/libdecoders_a-flac.Tpo .deps/libdecoders_a-flac.Po
make[4]: Leaving directory '/home/pi/dosbox/dosbox-staging/src/libs/decoders'
Makefile:347: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/pi/dosbox/dosbox-staging/src/libs'
Makefile:458: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/pi/dosbox/dosbox-staging/src'
Makefile:392: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/dosbox/dosbox-staging'
Makefile:333: recipe for target 'all' failed
make: *** [all] Error 2
Raspberry Pi external

Most helpful comment

Yeah, it was in ARM-ifdefed code, that's how it slipped by us… Time to finally setup ARM-based build job (GitHub does not offer this, but I think there are community Actions to do that easily).

The broken commit was merged only to master (not on release branch).

@nemo93 thank you!
@kcgen thanks for flagging it upstream

In the meantime I applied a fix for the typo: 333a771a632fbcfd65f727069f6c5d178aa5a9f1

All 5 comments

Thanks @nemo93 ; and for testing!

Looks like this typo slipped into the last commit; I've flagged it upstream.

In the meantime, you can fix it too on your Pi:

nano src/libs/decoders/dr_mp3.h
alt + g (jump to line 674)

Change drmp32_int32 to drmp3_int32, save, and your build should carry on. I've confirmed the build completes once this is done.

Hmm, how did it get past our CI? Was it under some ifdef for ARM architecture?

Yeah, it was in ARM-ifdefed code, that's how it slipped by us… Time to finally setup ARM-based build job (GitHub does not offer this, but I think there are community Actions to do that easily).

The broken commit was merged only to master (not on release branch).

@nemo93 thank you!
@kcgen thanks for flagging it upstream

In the meantime I applied a fix for the typo: 333a771a632fbcfd65f727069f6c5d178aa5a9f1

Thanks @kcgen @dreamer. It's all good now. I'm always keen to close ticket quickly hence this time I'll wait for your go-ahead before hitting the "close" button.

Glad you're up and runnning @nemo93; drop a note if you hit any other issues on your Pi!

Was this page helpful?
0 / 5 - 0 ratings