Menu

#80 Difficulty compiling lpairs from source on Linux (October 2018)

None
closed-fixed
nobody
None
5
2018-11-02
2018-10-21
shevy
No

dynlist.c:242:83: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
fprintf(stderr, "ERR: DL_GetE: list does not contain item 0x%x...\n", (int)item);
^
if ccache gcc -DHAVE_CONFIG_H -DSRC_DIR=\"/Programs/Lpairs/1.0.4//share/games/lpairs/\" -DSOUND -DLOCALEDIR=\"/Programs/Lpairs/1.0.4//share/locale\" -I. -I. -I.. -O2 -fPIC -fno-strict-overflow -Wno-error -I/Programs/Sdl/1.2.15//include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DSDL_1_1_5 -MT sdl.o -MD -MP -MF ".deps/sdl.Tpo" -c -o sdl.o sdl.c; \ then mv -f ".deps/sdl.Tpo" ".deps/sdl.Po"; else rm -f ".deps/sdl.Tpo"; exit 1; fi
if ccache gcc -DHAVE_CONFIG_H -DSRC_DIR=\"/Programs/Lpairs/1.0.4//share/games/lpairs/\" -DSOUND -DLOCALEDIR=\"/Programs/Lpairs/1.0.4//share/locale\" -I. -I. -I.. -O2 -fPIC -fno-strict-overflow -Wno-error -I/Programs/Sdl/1.2.15//include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DSDL_1_1_5 -MT cfg.o -MD -MP -MF ".deps/cfg.Tpo" -c -o cfg.o cfg.c; \ then mv -f ".deps/cfg.Tpo" ".deps/cfg.Po"; else rm -f ".deps/cfg.Tpo"; exit 1; fi
In file included from cfg.c:23:
sdl.h:128:13: warning: inline function 'flip_screen' declared but never defined
inline void flip_screen();
^~~~~~~~~~~
sdl.h:127:13: warning: inline function 'unlock_screen' declared but never defined
inline void unlock_screen();
^~~~~~~~~~~~~
sdl.h:126:13: warning: inline function 'lock_screen' declared but never defined
inline void lock_screen();
^~~~~~~~~~~
sdl.h:119:13: warning: inline function 'refresh_screen' declared but never defined
inline void refresh_screen( int x, int y, int w, int h );
^~~~~~~~~~~~~~
sdl.h:90:13: warning: inline function 'unlock_font' declared but never defined
inline void unlock_font(Font sfnt);
^~~~~~~~~~~
sdl.h:89:13: warning: inline function 'lock_font' declared but never defined
inline void lock_font(Font
sfnt);
^~~~~~~~~
sdl.h:44:13: warning: inline function 'unlock_surf' declared but never defined
inline void unlock_surf(SDL_Surface sur);
^~~~~~~~~~~
sdl.h:43:13: warning: inline function 'lock_surf' declared but never defined
inline void lock_surf(SDL_Surface
sur);
^~~~~~~~~
if ccache gcc -DHAVE_CONFIG_H -DSRC_DIR=\"/Programs/Lpairs/1.0.4//share/games/lpairs/\" -DSOUND -DLOCALEDIR=\"/Programs/Lpairs/1.0.4//share/locale\" -I. -I. -I.. -O2 -fPIC -fno-strict-overflow -Wno-error -I/Programs/Sdl/1.2.15//include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DSDL_1_1_5 -MT menu.o -MD -MP -MF ".deps/menu.Tpo" -c -o menu.o menu.c; \ then mv -f ".deps/menu.Tpo" ".deps/menu.Po"; else rm -f ".deps/menu.Tpo"; exit 1; fi
In file included from menu.c:21:
sdl.h:128:13: warning: inline function 'flip_screen' declared but never defined
inline void flip_screen();
^~~~~~~~~~~
sdl.h:127:13: warning: inline function 'unlock_screen' declared but never defined
inline void unlock_screen();
^~~~~~~~~~~~~
sdl.h:126:13: warning: inline function 'lock_screen' declared but never defined
inline void lock_screen();
^~~~~~~~~~~
sdl.h:119:13: warning: inline function 'refresh_screen' declared but never defined
inline void refresh_screen( int x, int y, int w, int h );
^~~~~~~~~~~~~~
sdl.h:90:13: warning: inline function 'unlock_font' declared but never defined
inline void unlock_font(Font sfnt);
^~~~~~~~~~~
sdl.h:89:13: warning: inline function 'lock_font' declared but never defined
inline void lock_font(Font
sfnt);
^~~~~~~~~
sdl.h:44:13: warning: inline function 'unlock_surf' declared but never defined
inline void unlock_surf(SDL_Surface sur);
^~~~~~~~~~~
sdl.h:43:13: warning: inline function 'lock_surf' declared but never defined
inline void lock_surf(SDL_Surface
sur);
^~~~~~~~~
if ccache gcc -DHAVE_CONFIG_H -DSRC_DIR=\"/Programs/Lpairs/1.0.4//share/games/lpairs/\" -DSOUND -DLOCALEDIR=\"/Programs/Lpairs/1.0.4//share/locale\" -I. -I. -I.. -O2 -fPIC -fno-strict-overflow -Wno-error -I/Programs/Sdl/1.2.15//include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DSDL_1_1_5 -MT sndsrv.o -MD -MP -MF ".deps/sndsrv.Tpo" -c -o sndsrv.o sndsrv.c; \ then mv -f ".deps/sndsrv.Tpo" ".deps/sndsrv.Po"; else rm -f ".deps/sndsrv.Tpo"; exit 1; fi
ccache gcc -O2 -fPIC -fno-strict-overflow -Wno-error -I/Programs/Sdl/1.2.15//include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DSDL_1_1_5 -o lpairs main.o pairs.o dynlist.o sdl.o cfg.o menu.o sndsrv.o -L/Programs/Sdl/1.2.15//lib -Wl,-rpath,/Programs/Sdl/1.2.15//lib -lSDL -lpthread
pairs.o:pairs.c:function open_game: error: undefined reference to 'refresh_screen'
pairs.o:pairs.c:function run_game: error: undefined reference to 'refresh_screen'
menu.o:menu.c:function MM_Shw: error: undefined reference to 'refresh_screen'
collect2: error: ld returned 1 exit status
make[2]: [Makefile:284: lpairs] Error 1
make[2]: Leaving directory '/Depot/Temp/rbt/lpairs-1.0.4/lpairs'
make[1]:
[Makefile:289: all-recursive] Error 1
make[1]: Leaving directory '/Depot/Temp/rbt/lpairs-1.0.4'
make: *** [Makefile:225: all] Error 2


Error is:

pairs.o:pairs.c:function open_game: error: undefined reference to 'refresh_screen'
pairs.o:pairs.c:function run_game: error: undefined reference to 'refresh_screen'
menu.o:menu.c:function MM_Shw: error: undefined reference to 'refresh_screen'

Not sure what the problem is. The other LGames compile fine by the way, lgeneral, lmarbles etc... so not sure why lpairs does not want to be installed.

My system is:

Operating System: GNU/Linux
Os Bit Type: x86_64
CPU Model: AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G, 2 cores
CFLAGS in use: -O2 -fPIC -fno-strict-overflow -Wno-error
RAM: 15305224 kB RAM (14946.5 MB) (14.6 Gig)
Screen Resolution: 1920x1080
Gcc Version: 8.2.0
Glibc Version: 2.26
Linux Kernel: 4.14.12
Binutils Version: 2.31.1

Discussion

  • Michael Speck

    Michael Speck - 2018-11-02

    thx for pointing out. the trouble is with inline functions causing problems with newer gcc. it's fixed in 1.0.5

     
  • Michael Speck

    Michael Speck - 2018-11-02
    • status: open --> closed-fixed
    • Group: -->