CVS problems

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:
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Post by Loriel »

Sorry, I'm not an IRC user.

I'm currently attempting a rebuild with a quickly hacked makefile.

If this fails, I'm going to give up on the project - wasting an hour on each unsuccessful attempt to recompile it is not much fun.
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Re: Compilation problem

Post by miyo »

Loriel wrote:Based on CVS of approximately an hour ago :
Looks like a Makefile problem, failing to link map_label.o:
g++ -I/usr/local/include/SDL -D_REENTRANT -DWESNOTH_PATH="/usr/local/share/wesnoth" -g -O2 -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread -lm -ldl -lasound -L/usr/X11R6/lib -lX11 -lXext -lSDL_image -lSDL_mixer -lSDL_net -lSDL_ttf -o wesnoth_editor editor.o actions.o ai.o ai_attack.o ai_move.o cavegen.o config.o cursor.o dialogs.o display.o events.o filesystem.o font.o game_config.o game_events.o gamestatus.o hotkeys.o image.o intro.o key.o language.o log.o map.o mapgen.o mapgen_dialog.o mouse.o network.o pathfind.o playlevel.o playturn.o preferences.o race.o replay.o reports.o sdl_utils.o show_dialog.o sound.o statistics.o team.o terrain.o theme.o tooltips.o unit.o unit_types.o video.o button.o menu.o textbox.o scrollbar.o slider.o widget.o
display.o(.text+0x378): In function `display::display[not-in-charge](std::map<gamemap::location, unit, std::less<gamemap::location>, std::allocator<std::pair<gamemap::location const, unit> > >&, CVideo&, gamemap const&, gamestatus const&, std::vector<team, std::allocator<team> > const&, config const&)':
/usr/include/g++/bits/stl_tree.h:296: undefined reference to `map_labels::map_labels[in-charge](display const&)'
and a string of similar error messages
That was wesnoth_editor failing (you can catch that from -o wesnoth_editor): map_label.[ch]pp were missing from Editor section in src/Automake.am. Fix has been committed to CVS. You were using --enable-editor with configure, right?

- Miyo
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Post by Loriel »

Miyo: That was wesnoth_editor failing (you can catch that from -o wesnoth_editor): map_label.[ch]pp were missing from Editor section in src/Automake.am. Fix has been committed to CVS. You were using --enable-editor with configure, right?
Correct. I realised after my previous post that I could effectively ignore this error.

I rebuilt Wesnoth again, using the CVS of about an hour ago,

Compilation failed again at the same point.

I therefore copied the wesnoth executable by hand, and it still gives the same errors.

It hangs after the console messages :
BEGIN: doing ai move
combat...
BEGIN: analyzing targets...
END: analyzing targets... (took 78ms)
took 91 ticks for 5 positions. Analyzing...
simulations: 40
attack option rated at 0.431393 (0.5)
attack option rated at 0.311377 (0.5)
attack option rated at 0.325801 (0.5)
attack option rated at 0.49129 (0.5)
attack option rated at 0.304474 (0.5)
analysis took 194 ticks
BEGIN: move_unit
regetting minimap
generating minimap
creating minimap 192,328
created minimap: 140508448,143737840
scaling minimap...140508448.143737840
done generating minimap
done regetting minimap
END: move_unit (took 4019ms)
BEGIN: unit_attack
END: unit_attack (took 331ms)
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Loriel wrote:I rebuilt Wesnoth again, using the CVS of about an hour ago,
If you used 1 hour old CVS it did not contain the fix (to editor not compiling)... after fix had been committed I "immidiately" replied to your msg.

You can also skip that by not using --enable-editor with ./configure

- Miyo
Last edited by miyo on April 3rd, 2004, 12:50 am, edited 1 time in total.
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Just to make sure: after updating cvs you run 'make clean', right?

- Miyo
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Post by Loriel »

Just to make sure: after updating cvs you run 'make clean', right?

- Miyo
Yes.

To avoid any possibility of corrupt code, I've removed the entire wesnoth directory and downloaded again from CVS, and compiled from scratch. In about half an hour the result will be available for testing.
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Post by Loriel »

The problem compiling the editor is now fixed.

However the "hanging" problem in the game continues apparently unchanged.
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Dave,

would any of following provide any useful information? (prerequisite is to compile with --enable-debug)

* run wesnoth under strace?
* run wesnoth under gdb?
* run wesnoth under valgrind?

I think you know the best which of those might provide useful information.
loriel wrote:Only other possible clues I can give you are that I rebuilt SD_Mixer to support ogg before compiling the CVS version, and that sound (both music and sound effects) is often missing from wesnoth, but I suspect these are red herrings.
Just an idea: should/could we add extra debug information for sounds/music?

- Miyo
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

loriel wrote:SuSE linux 9.0 on intel, gcc 3.3.1-29.
I compile on Debian GNU/Linux (Sid) on intel, gcc 3.3.3 (Debian 20040401),

libsdl-mixer1.2 1.2.5-5
libsdl-image1.2 1.2.3-2
libsdl1.2 1.2.7-4.1
libsdl-net1.2 1.2.5-3
libsdl-ttf2.0-0 2.0.6-5
libsdl-sound1.2 1.0.1-3

and corresponding dev packages. I have it running just nice, no hanging.

- Miyo
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Post by Loriel »

Miyo: I compile on Debian GNU/Linux (Sid) on intel, gcc 3.3.3 (Debian 20040401),

libsdl-mixer1.2 1.2.5-5
libsdl-image1.2 1.2.3-2
libsdl1.2 1.2.7-4.1
libsdl-net1.2 1.2.5-3
libsdl-ttf2.0-0 2.0.6-5
libsdl-sound1.2 1.0.1-3

and corresponding dev packages. I have it running just nice, no hanging.
My versions appear to be similar, except for SDL_sound which appears to be 0.1.5-521

The problem continues - ie "hanging" after first attack round - the only change being that the "hanging" on starting a new campaign has now disappeared.

I have therefore reverted to the normal download (version 0.7), which runs with no problems.
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Your gcc is different version. http://gcc.gnu.org: "Current release series: GCC 3.3.3 (released 2004-02-14)"

Maybe you could try updating your gcc and then trying if compiled product behaves any different?

- Miyo
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Loriel,

A couple of questions,

- does the game still crash if you use a ranged attack rather than a melee attack?
- does the game still crash if you attack a unit that has no counter-attack (e.g. a dark adept).

You shouldn't need to recompile CVS to answer these questions as there have been no changs.

Thanks for your patience,

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Post by Loriel »

Thanks for the efforts to solve the problem, but I do not wish to spend any more time on it. If nobody else can reproduce the problem, let's just write it off as an unfortunate experience for me, and I'll continue to use the 0.7 release.

The problem arises with both ranged and non-ranged attacks. I've not tried it against a unit that can't counter-attack.

And the game doesn't crash, it merely hangs. If it crashed, I could use gdb and provide you with better information on precisely where it occurs.
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Success (at last)

Post by Loriel »

Problem appears to be fixed, by upgrading gcc to 3.3.3.

Also appears to avoid the intermittent sound problems, though proving that an intermittent problem is fixed is more difficult.

I also upgraded to more recent version of SDL_sound, but that seemed to have no effect.

Thanks for the help and advice.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

I'm glad the problem is fixed for you, although I really hate issues like this where we never really know if it's a problem in Wesnoth or the compiler :(

Anyhow, thanks for reporting the problem, and trying different solutions; we appreciate it.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Post Reply