News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Automated Tests r12082

Started by Andarix, July 16, 2026, 06:36:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andarix

Quote2026-07-16T18:21:33.8191075Z ===> HOSTCXX src/simutrans/sys/simsys_posix.cc
2026-07-16T18:21:34.0555938Z src/squirrel/squirrel/sqstate.cc:479:20: warning: variable 'nfound' set but not used [-Wunused-but-set-variable]
2026-07-16T18:21:34.0580789Z   479 |         SQUnsignedInteger nfound = 0;
2026-07-16T18:21:34.0600410Z       |                           ^
2026-07-16T18:21:34.0601047Z 1 warning generated.
2026-07-16T18:21:34.0601485Z ===> HOSTCXX src/simutrans/music/no_midi.cc
2026-07-16T18:21:34.1350914Z ===> HOSTCXX src/simutrans/sound/no_sound.cc
2026-07-16T18:21:34.1981320Z src/simutrans/sys/simsys_posix.cc:173:36: warning: unused parameter 'pos' [-Wunused-parameter]
2026-07-16T18:21:34.1982130Z   173 | void dr_notify_input_pos(scr_coord pos)
2026-07-16T18:21:34.1982765Z       |                                    ^
2026-07-16T18:21:34.1983204Z 1 warning generated.
2026-07-16T18:21:38.7800843Z ===> LD  /home/runner/work/simutrans/simutrans/sim
2026-07-16T18:21:39.6477482Z /usr/bin/ld: build/default/src/simutrans/display/simgraph0.o:(.data.g_simgraph0[g_simgraph0]+0x50): undefined reference to `simgraph0_get_pixval_rgb(unsigned short)'
2026-07-16T18:21:39.7961524Z clang++: error: linker command failed with exit code 1 (use -v to see invocation)
2026-07-16T18:21:39.7977817Z make: *** [common.mk:29: /home/runner/work/simutrans/simutrans/sim] Error 1
2026-07-16T18:21:39.7996673Z ##[error]Process completed with exit code 2.

victor_18993

#1
I found the cause.
This regression was introduced by my previous factory/minimap patch: I added
simgraph0_get_pixval_rgb with the wrong parameter type.
It is declared as:
static rgb888_t simgraph0_get_pixval_rgb(PIXVAL c);

but defined as:
static rgb888_t simgraph0_get_pixval_rgb(palette_index_t)

Since
PIXVAL and
palette_index_t are different types, these become two different functions.
g_simgraph0 references the
PIXVAL version, which was never defined, causing the headless build to fail at link time.
The fix is one line:
-static rgb888_t simgraph0_get_pixval_rgb(palette_index_t)
+static rgb888_t simgraph0_get_pixval_rgb(PIXVAL)

After this change, a clean
SIMUTRANS_BACKEND=none build links and the binary starts correctly on MinGW/GCC.
I could not run the automated test suite on Windows because the scenario fails to compile in this environment, so I can only confirm the build and linking fix.
Sorry for introducing the regression. Patch attached.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)

ceeac