Unable to compile BFW anymore

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Guillaume
Posts: 103
Joined: August 25th, 2003, 12:11 pm
Location: France
Contact:

Unable to compile BFW anymore

Post by Guillaume »

Hi,

I updated my source code from CVS saturday evening, and I'm unable to compile it anymore. I did a "make clean", then "configure --enable-tools --enable-debug", but I've this error:

[gui@localhost wesnoth]$ make
make all-recursive
make[1]: Entre dans le répertoire `/home/gui/wesnoth/wesnoth'
Making all in src
make[2]: Entre dans le répertoire `/home/gui/wesnoth/wesnoth/src'
Making all in .
make[3]: Entre dans le répertoire `/home/gui/wesnoth/wesnoth/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/SDL -D_REENTRANT -DWESNOTH_PATH=\"/usr/local/share/wesnoth\" -g -O2 -DDEBUG -ggdb3 -MT theme.o -MD -MP -MF ".deps/theme.Tpo" \
-c -o theme.o `test -f 'theme.cpp' || echo './'`theme.cpp; \
then mv -f ".deps/theme.Tpo" ".deps/theme.Po"; \
else rm -f ".deps/theme.Tpo"; exit 1; \
fi
theme.cpp:333:1: warning: no newline at end of file
theme.cpp: In method `theme::object::object ()':
theme.cpp:36: cannot convert `int' to `theme::object::ANCHORING' in
assignment
theme.cpp:36: cannot convert `int' to `theme::object::ANCHORING' in
assignment
make[3]: *** [theme.o] Erreur 1
make[3]: Quitte le répertoire `/home/gui/wesnoth/wesnoth/src'
make[2]: *** [all-recursive] Erreur 1
make[2]: Quitte le répertoire `/home/gui/wesnoth/wesnoth/src'
make[1]: *** [all-recursive] Erreur 1
make[1]: Quitte le répertoire `/home/gui/wesnoth/wesnoth'
make: *** [all] Erreur 2


Regarding the make_translation tool, I have this error:


[gui@localhost tools]$ make make_translation
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include/SDL -D_REENTRANT -I../ -g -O2 -DDEBUG -ggdb3 -MT make_translation.o -MD -MP -MF ".deps/make_translation.Tpo" \
-c -o make_translation.o `test -f 'make_translation.cpp' || echo './'`make_translation.cpp; \
then mv -f ".deps/make_translation.Tpo" ".deps/make_translation.Po"; \
else rm -f ".deps/make_translation.Tpo"; exit 1; \
fi
make_translation.cpp: In function `void process_config (const string &,
const config &, map<string, string, less<string>, allocator<string> >
&)':
make_translation.cpp:28: request for member `begin' in
`cfg->config::all_children', which is of non-aggregate type `{unknown
type}'
make: *** [make_translation.o] Erreur 1


Any help would be appreciate (to be able to run configure, I also installed the last version of autoconf-2.59)

Thanks.
Guillaume
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Don't use --enable-tools and see if you can compile just the game.

- Miyo
Guillaume
Posts: 103
Joined: August 25th, 2003, 12:11 pm
Location: France
Contact:

Post by Guillaume »

I tried without --enable-tools, but I have the same error (I use gcc 2.96)
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

The error you reported should now be fixed now. (Although there may be more. Those kind of conversions work fine on my compiler.)

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Guillaume
Posts: 103
Joined: August 25th, 2003, 12:11 pm
Location: France
Contact:

Post by Guillaume »

Hi Dave,

Indeed, the compilation problem is now solved (even for make_translation tool), but now I have this error when I try to launch the game:

[gui@localhost src]$ ./wesnoth
Initialized true type fonts
BEGIN: reading file
END: reading file (took 1ms)
BEGIN: preprocessing file...
BEGIN: reading file
END: reading file (took 0ms)
END: preprocessing file... (took 1ms)
BEGIN: parsing config...
END: parsing config... (took 0ms)
Could not find units configuration
BEGIN: config::write
END: config::write (took 0ms)

BEGIN: config::write
END: config::write (took 0ms)
BEGIN: write_file
END: write_file (took 0ms)

Any idea?
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

You did not run 'make install' (by default it installs under /usr/local... I usually change it to install under /opt/wesnoth-VERSION...)

You can not run Wesnoth from src/ unless you --prefix it there (meaning it will install the game there when you run 'make install').

http://wesnoth.slack.it/?CompilingWesnoth

You might also want to check './configure --help'

- Miyo
Guillaume
Posts: 103
Joined: August 25th, 2003, 12:11 pm
Location: France
Contact:

Post by Guillaume »

I tried to run make install, with a prefix specified, but after having copied some files, it stop with an error. I don't have it here, but I will retry.
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Steps:

./configure --prefix=PATH
make
make install

If you are not running 'make install' as root you might want to add --disable-icons to configure (otherwise it tries to add icons and menu entries for GNOME and KDE, which will fail as normal user).

- Miyo
Guillaume
Posts: 103
Joined: August 25th, 2003, 12:11 pm
Location: France
Contact:

Post by Guillaume »

Thanks, now I remember, it's axectly the error I had
ziberpunk

Post by ziberpunk »

You can run wesnoth even without installing it if you pass the data directory as a comand line option, so the commands would be:

Code: Select all

./configure
make
cd src
./wesnoth ../
I'll change default behaviour of icons too so that there's no need of becoming root to install wesnoth.
Lysander
Posts: 56
Joined: December 6th, 2003, 4:31 pm
Location: Trondheim, Norway

Wesnoth CVS won't compile!

Post by Lysander »

Just updated Wesnoth from CVS. When I try to 'make clean' or make', make returns the error
'Makefile:1: *** missing separator. Stop.' once it enters the src/ dir. Anyone else gets this message? I've never had it before when compiling Wesnoth.
--Lysander--
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Re: Wesnoth CVS won't compile!

Post by miyo »

Lysander wrote:Just updated Wesnoth from CVS. When I try to 'make clean' or make', make returns the error
'Makefile:1: *** missing separator. Stop.' once it enters the src/ dir. Anyone else gets this message? I've never had it before when compiling Wesnoth.
rm Makefile then update your CVS checkout and try again. Ziberpunk will most likely sooner or later tell you to run ./autogen.sh

- Miyo
Lysander
Posts: 56
Joined: December 6th, 2003, 4:31 pm
Location: Trondheim, Norway

Wesnoth compiles now

Post by Lysander »

After I deleted all configuration and make files, updated from CVS, ran autogen.sh and then configure, it compiled. That is, after I merged some changes by hand. CVS seems pretty dumb when it comes to merging. Is there an option for downloading the whole file instead of messing around with the source when CVS can't handle the merge? This would take much less time (for me at least). I looked around (man CVS, cvshome.org), but didn't find anything helpful. Anybody knows?
--Lysander--
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

man cvs and search for -C or overwrite

- Miyo
ziberpunk

Post by ziberpunk »

CVS seems to handle badly merges to configure and Makefiles, so maybe they should be added to the respository as binnary files. I'll look into it.
Post Reply