Author Topic: [solved] Compilation error: "error: stray ___ in program  (Read 1169 times)

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
[solved] Compilation error: "error: stray ___ in program
« on: 3 December 2010, 22:24:27 »
Rev 987 gives the following output for make:

http://pastebin.com/h6722g4Z

Mostly consists of the following, with differing numbers:
Code: [Select]
/home/mint/glestae_svn/source/game/prototypes/skill_type.cpp:251: error: stray ‘\375’ in program
I'm compiling with the same script that worked plenty of times before, with the exception of the PhysFS argument (and removing that produces the same result):
Code: [Select]
cd ~/ &&
svn co https://glestae.svn.sourceforge.net/svnroot/glestae/trunk glestae_svn &&
mkdir -p glestae_svn/build && cd glestae_svn/build &&
cmake -DGAE_CONFIG_DIR=~/.glestadv -DGAE_DATA_DIR=~/glestae_svn/data/game -DGAE_USE_PHYSFS=ON ~/Dropbox/glest_stuff/addons/ .. &&
make
« Last Edit: 4 December 2010, 07:03:31 by John.d.h »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Compilation error: "error: stray ___ in program
« Reply #1 on: 4 December 2010, 01:09:57 »
Wait up...

is

Code: [Select]
svn co https://glestae.svn.sourceforge.net/svnroot/glestae/trunk glestae_svn
in this script of yours ??

That is checking out the whole thing everytime, wasting lots of bandwidth and probably causing this problem besides.

You only need to 'update' glestae_svn once you have it checked out, as Yggdrasil explained earlier (make your 'update' script look like this),
https://forum.megaglest.org/index.php?topic=6213.msg63327#msg63327

In this particular case, because your working copy is a bit messed, try the following,

Code: [Select]
cd ~/glestae_svn
svn cleanup .
svn revert --recursive .
svn update
cd build
rm -rf *
cmake -DGAE_DATA_DIR=/some/path/ ..
make
Warning: rm -rf * Make sure you're in the right place!
Glest Advanced Engine - Code Monkey

Timeline | Downloads

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Compilation error: "error: stray ___ in program
« Reply #2 on: 4 December 2010, 01:56:03 »
That is checking out the whole thing everytime, wasting lots of bandwidth and probably causing this problem besides.

You only need to 'update' glestae_svn once you have it checked out, as Yggdrasil explained earlier (make your 'update' script look like this),
https://forum.megaglest.org/index.php?topic=6213.msg63327#msg63327
It's not downloading all of the files every time, if that's what you mean, just the ones that have changed or are missing. :look: But I'll do it your way.

Quote
In this particular case, because your working copy is a bit messed, try the following,

Code: [Select]
cd ~/glestae_svn
svn cleanup .
svn revert --recursive .
svn update
cd build
rm -rf *
cmake -DGAE_DATA_DIR=/some/path/ ..
make
Warning: rm -rf * Make sure you're in the right place!
Okay, here's what I've got now:
Code: [Select]
cd ~/glestae_svn &&
svn cleanup .
svn revert --recursive .
logsave ~/update_gae_output.txt svn update &&
cd build &&
rm -rf * &&
logsave -a ~/update_gae_output.txt cmake -DGAE_CONFIG_DIR=~/.glestadv -DGAE_DATA_DIR=~/glestae_svn/data/game -DGAE_USE_PHYSFS=ON ~/Dropbox/glest_stuff/addons/ .. &&
logsave -a ~/update_gae_output.txt make
... and I'm getting the same (or a similar) error output.

http://pastebin.com/ijnW7s1u
Code: [Select]
#
[ 69%] Building CXX object source/game/CMakeFiles/glestadv.dir/prototypes/skill_type.cpp.o
/home/mint/glestae_svn/source/game/prototypes/skill_type.cpp:232: error: stray ‘\220’ in program
/home/mint/glestae_svn/source/game/prototypes/skill_type.cpp:232: error: stray ‘\206’ in program
..
/home/mint/glestae_svn/source/game/prototypes/skill_type.cpp:232: error: stray ‘\251’ in program
/home/mint/glestae_svn/source/game/prototypes/skill_type.cpp:232:86: warning: null character(s) ignored
/home/mint/glestae_svn/source/game/prototypes/skill_type.cpp:232: error: stray ‘\362’ in program

Edit: Once again, my fault. ::)  Somehow skill_type.cpp got corrupted (maybe the result of booting from a five year old flash drive).  Deleting it and svn up got it to compile. 

However, now I'm getting a different sort of error when I try to run the game.
Code: [Select]
$ ./source/game/glestadv
terminate called after throwing an instance of 'std::runtime_error'
  what():  Failed to create directory ~/.glestadv:
Aborted (core dumped)
« Last Edit: 4 December 2010, 02:16:30 by John.d.h »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Compilation error: "error: stray ___ in program
« Reply #3 on: 4 December 2010, 04:29:45 »
Regarding co Vs up, SVN may be smart enough to realise when you co that there is already a working copy of that repo and just update it, but what you are telling it to do is check-out a new working copy, so I think I'd stick with svn up ;)

Not sure exactly what is going on, but skill_type.cpp appears to have been corrupted somehow, revert should have fixed it...  :look:

Try deleting it, the svn up should then replace it...
Code: [Select]
cd ~/glestae_svn
rm ./source/game/prototypes/skill_type.cpp
~/update_gae.sh

I should be on IRC most of the weekend, if this doesn't work, it might be easier to continue this in real-time ;)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Compilation error: "error: stray ___ in program
« Reply #4 on: 4 December 2010, 07:02:56 »
However, now I'm getting a different sort of error when I try to run the game.
Code: [Select]
$ ./source/game/glestadv
terminate called after throwing an instance of 'std::runtime_error'
  what():  Failed to create directory ~/.glestadv:
Aborted (core dumped)
Issue solved by replacing the ~ with the actual path (/home/john), as discussed on IRC.

Strange, as it seemed to not matter before. :look: