matlo / GIMX

The GIMX software.
GNU General Public License v3.0
590 stars 105 forks source link

build: Add GIMXLOG to default linking for GIMXTIME #676

Closed brianredbeard closed 3 years ago

brianredbeard commented 3 years ago

Attempting to compile presently presents errors during make -C loader. The errors are not immediately obvious as they do not halt compilation:

...
deprecated-copy -Wno-ignored-qualifiers  -c -o gimx-fpsconfig.o gimx-fpsconfig.cpp
g++ -Wall -Wextra -Werror -O3 -I../shared `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wno-cast-function-type -Wno-deprecated-copy -Wno-ignored-qualifiers  -c -o background.png.o background.png.cpp
g++ -Wall -Wextra -Werror -O3 -I../shared `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wno-cast-function-type -Wno-deprecated-copy -Wno-ignored-qualifiers  -c -o fpsconfigApp.o fpsconfigApp.cpp
cc -L../shared/gimxconfigeditor -L../shared/gimxtime -L../shared/gimxlog -L../shared/gimxhid -L../shared/gimxinput -L../shared/gimxlog -L../shared/gimxuhid -L../shared/gimxlog -L../shared/gimxtime -L../shared/gimxtimer -L../shared/gimxlog -L../shared/gimxpoll -L../shared/gimxcontroller -L../shared/gimxfile -L../shared/gimxdownloader -L../shared/gimxupdater  gimx-fpsconfig.o background.png.o fpsconfigApp.o  `wx-config --libs` -lstdc++ -lm -lgimxconfigeditor -lgimxtime -lgimxlog -lgimxhid -lgimxinput -lgimxlog -lgimxuhid -lgimxlog -lgimxtime -lgimxtimer -lgimxlog -lgimxpoll -lgimxcontroller -lgimxfile -lgimxdownloader -lgimxupdater -o gimx-fpsconfig
make[1]: Leaving directory '/home/beatbox/Projects/GIMX/fpsconfig'
make -C loader
make[1]: Entering directory '/home/beatbox/Projects/GIMX/loader'
g++ -Wall -Wextra -Werror -O3 -I../shared `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wno-cast-function-type -Wno-deprecated-copy -Wno-ignored-qualifiers  -c -o gimx-loader.o gimx-loader.cpp
g++ -Wall -Wextra -Werror -O3 -I../shared `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wno-cast-function-type -Wno-deprecated-copy -Wno-ignored-qualifiers  -c -o loaderApp.o loaderApp.cpp
cc -L../shared/gimxtime  gimx-loader.o loaderApp.o  `wx-config --libs` -lstdc++ -lgimxtime -o gimx-loader
/usr/bin/ld: warning: libgimxlog.so, needed by ../shared/gimxtime/libgimxtime.so, not found (try using -rpath or -rpath-link)
make[1]: Leaving directory '/home/beatbox/Projects/GIMX/loader'
make -C po
make[1]: Entering directory '/home/beatbox/Projects/GIMX/po'
make[1]: 'all' is up to date.
make[1]: Leaving directory '/home/beatbox/Projects/GIMX/po'

Towards the end we see that there was a problem linking libgimxlog.so.

Adding proper references to GIMXLOG in the LDFLAGS and LDLIBS of GIMXTIME in Makedefs ensures proper compilation.

It has been verified that the project compiles correctly when the static definitions are removed from https://github.com/matlo/gimxtime/blob/98841baa730719a9b4c3581f6440a0ca27697292/Makefile#L11-L12

matlo commented 3 years ago

This should be fixed on master branch. The gimxlog dependency was useless, so I removed it. Thanks for reporting!