Author Topic: Linux Compile Error  (Read 2241 times)

0 Members and 1 Guest are viewing this topic.

Offline ni1s

  • 26
Hello there,

I'm getting these strange compile error on both current fs2_open_3_6_9 and HEAD,
Code: [Select]
missionui/missionshipchoice.cpp: In function ‘int create_wings()’:
missionui/missionshipchoice.cpp:3039: error: no match for ‘operator-’ in ‘p_objp - Parse_objects. std::vector<_Tp, _Alloc>::begin [with _Tp = p_object, _Alloc = std::allocator<p_object>]()’
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/stl_bvector.h:182: note: candidates are: ptrdiff_t std::operator-(const std::_Bit_iterator_base&, const std::_Bit_iterator_base&)
missionui/missionshipchoice.cpp: In function ‘void ss_init_wing_info(int, int)’:
missionui/missionshipchoice.cpp:3658: error: no match for ‘operator-’ in ‘p_objp - Parse_objects. std::vector<_Tp, _Alloc>::begin [with _Tp = p_object, _Alloc = std::allocator<p_object>]()’
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/stl_bvector.h:182: note: candidates are: ptrdiff_t std::operator-(const std::_Bit_iterator_base&, const std::_Bit_iterator_base&)
make[1]: *** [missionshipchoice.o] Error 1
make[1]: Leaving directory `/home/ni1s/src/fso/fs2_open_3_6_9/code'
make: *** [all-recursive] Error 1
I've never encountered such a gcc bailout before, anyone know what's going on here?

And on a smaller note, the object/ObjCollide.h includes in autopilot/autopilot.cpp and parse/sexp.cpp should be lowercase(#include " object/objcollide.h").

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
No idea, but it really seems to be broken. Got this from the 3.6.9 branch:
Code: [Select]
if g++ -DPACKAGE_NAME=\"fs2_open\" -DPACKAGE_TARNAME=\"fs2_open\" -DPACKAGE_VERSION=\"3.6.10\" -DPACKAGE_STRING=\"fs2_open\ 3.6.10\" -DPACKAGE_BUGREPORT=\"\" -DNO_CD_CHECK=1 -DNDEBUG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSCP_UNIX=1 -DNO_DIRECT3D=1 -DUSE_OPENAL=1 -I. -I.    -g -Os -Wall -funroll-loops -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fsigned-char -Wno-unknown-pragmas  -Wno-deprecated -Wno-char-subscripts -I../lua -march=athlon64 -O2 -pipe -fomit-frame-pointer -msse3 -MT autopilot.o -MD -MP -MF ".deps/autopilot.Tpo" -c -o autopilot.o `test -f 'autopilot/autopilot.cpp' || echo './'`autopilot/autopilot.cpp; \
        then mv -f ".deps/autopilot.Tpo" ".deps/autopilot.Po"; else rm -f ".deps/autopilot.Tpo"; exit 1; fi
autopilot/autopilot.cpp:134:31: error: object/ObjCollide.h: No such file or directory
autopilot/autopilot.cpp: In function 'void StartAutopilot()':
autopilot/autopilot.cpp:467: warning: operation on 'aip' may be undefined
autopilot/autopilot.cpp:400: warning: unused variable 'norm2'
autopilot/autopilot.cpp: In function 'void nav_warp(bool)':
autopilot/autopilot.cpp:795: error: 'obj_all_collisions_retime' was not declared in this scope
make[1]: *** [autopilot.o] Error 1
make[1]: Leaving directory `/home/cas/compile/fs2_open/code'
make: *** [all-recursive] Error 1

 

Offline ni1s

  • 26
And on a smaller note, the object/ObjCollide.h includes in autopilot/autopilot.cpp and parse/sexp.cpp should be lowercase(#include " object/objcollide.h").
That's a quick fix.  ;)

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Ah yeas, noticed that abit after posting. Then again, I'd probably bump on this other problem ..too lazy to try it out now :D

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
The ObjCollide and std::vector bugs should both be fixed in CVS.