Author Topic: Error trying to compile source 2.0.0 on ubuntu  (Read 6098 times)

tweek888

  • Guest
Error trying to compile source 2.0.0 on ubuntu
« on: 11 April 2006, 04:42:28 »
Hi, I tried to run the autogen script and get

Code: [Select]
tweek@ubuntu:~/Desktop/glest_source_2.0.0/mk/linux$ ./autogen.sh
bash: ./autogen.sh: /bin/sh^M: bad interpreter: No such file or directory



I'm not sure how to fix that...

Any ideas?
« Last Edit: 1 January 1970, 00:00:00 by tweek888 »

giovabal

  • Guest
Re: Error trying to compile source 2.0.0 on ubuntu
« Reply #1 on: 11 April 2006, 12:58:52 »
Quote from: "tweek888"
Hi, I tried to run the autogen script and get

Code: [Select]
tweek@ubuntu:~/Desktop/glest_source_2.0.0/mk/linux$ ./autogen.sh
bash: ./autogen.sh: /bin/sh^M: bad interpreter: No such file or directory


I'm not sure how to fix that...

Any ideas?


It seems someone edited a linux script with a Windows editor, you must go back from this situation.

I did that:
- opened that file with emacs
- changed the charset to undecided-unix (ctrl-x RET f undecided-unix)
- saved the modified file (ctrl-x s)

Hoping it helps.

However after that I incur in the following error after doing ./configure:
configure: error: cannot run /bin/sh mk/autoconf/config.sub

Running a raw "sh mk/autoconf/config.sub" gives:
: command not foundsub: line 5:
: command not foundsub: line 7:
: command not foundsub: line 26:
: command not foundsub: line 31:
: command not foundsub: line 39:
: command not foundsub: line 47:
: command not foundsub: line 54:
: command not foundsub: line 56:
: command not foundsub: line 69:
: command not foundsub: line 78:
: command not foundsub: line 81:
'k/autoconf/config.sub: line 84: syntax error near unexpected token `in
'k/autoconf/config.sub: line 84: `  case $1 in

Hoping someone got a fix for that,
Giovanni.
« Last Edit: 11 April 2006, 20:27:02 by giovabal »

triplepoint217

  • Guest
(No subject)
« Reply #2 on: 11 April 2006, 17:54:44 »
A bunch of the files were in dos format rather than unix, I don't know which ones exactly, but that was causing a lot of problems, so I wrote a python script to make sure all of them are in unix format using dos2unix.  This lets me compile and run the game, but nothing except the centerpeice building has a picture (I can select units and other buildings, but they are invisible) Any one have any help with that?

If you have dos2unix installed, just run this python script in the top level directory of a fresh unzip of the source files (copy it from my post into a file named convert.py in the top level dir, then run: python convert.py)

#convert.py
import os
import os.path

def recurse():
  files = os.listdir(".")
  for f in files:
    if os.path.isdir(f):
      os.chdir(f)
      recurse()
      os.chdir("..")
    if os.path.isfile(f):
      os.system("dos2unix "+ f)

recurse()
« Last Edit: 1 January 1970, 00:00:00 by triplepoint217 »

giovabal

  • Guest
(No subject)
« Reply #3 on: 11 April 2006, 20:26:41 »
Quote from: "triplepoint217"
If you have dos2unix installed, just run this python script in the top level directory of a fresh unzip of the source files (copy it from my post into a file named convert.py in the top level dir, then run: python convert.py)
...


Thanks.
I rewrite your code as python strictly need proper indentation or it won't work.

Code: [Select]
#convert.py
import os
import os.path

def recurse():
  files = os.listdir(".")
  for f in files:
    if os.path.isdir(f):
      os.chdir(f)
      recurse()
      os.chdir("..")
    if os.path.isfile(f):
      os.system("dos2unix "+ f)

recurse()


I add that "dos2unix" is part of "sysutils" package on Ubuntu.
"sudo apt-get install sysutils" will do the job.

I'll experiment to see if I can reproduce your problem.

Giovanni.
« Last Edit: 1 January 1970, 00:00:00 by giovabal »

gborzi

  • Guest
(No subject)
« Reply #4 on: 12 April 2006, 12:00:16 »
You can try this command to unix-fy the files:
Code: [Select]
find . -type f -exec dos2unix {} \;I was able to compile the code only after deleting the line containing AM_OPTIONS_WXRC in mk/linux/mk/autoconf/wxwin.m4 .
The compilation of glest_map_editor fails because jam tries to build an executable only from libraries, i.e.
Code: [Select]
g++ -o glest_map_editor   ./build/i686-pc-linux-gnu/optimize/shared_lib/sources/libglestlib.a   -L/usr/lib -lSDL -lpthread -lGL -L/usr/X11R6/lib -lX11  -lm -lGLU -lGL -L/usr/X11R6/lib -lX11  -lm -lxerces-c -lpthread  -lvorbis -lm -lvorbisfile  -logg -lopenal -pthread -lwx_gtk-2.4
Maybe the glest_map_editor has not been ported to linux ?
« Last Edit: 1 January 1970, 00:00:00 by gborzi »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #5 on: 12 April 2006, 18:40:22 »
Quote
Maybe the glest_map_editor has not been ported to linux ?


The Glest map editor is in the CVS but not in the source package, because it's is nos cross platform at the moment, but we hope it will be soon.
« Last Edit: 1 January 1970, 00:00:00 by martiño »

bersace

  • Guest
(No subject)
« Reply #6 on: 16 April 2006, 18:13:14 »
Quote from: "gborzi"
You can try this command to unix-fy the files:
Code: [Select]
find . -type f -exec dos2unix {} \;I was able to compile the code only after deleting the line containing AM_OPTIONS_WXRC in mk/linux/mk/autoconf/wxwin.m4 .

use automake 1.7 :

Code: [Select]
sudo update-alternative --set automake /usr/bin/automake-1.7
« Last Edit: 1 January 1970, 00:00:00 by bersace »

zero0w

  • Guest
(No subject)
« Reply #7 on: 21 April 2006, 11:54:57 »
Here is a guide on how to build a deb package for glest 2.0:

http://www.masguadalinex.net/?q=glest
« Last Edit: 1 January 1970, 00:00:00 by zero0w »

 

anything