You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CI builds need custom variables set in the environment for Mingw and MacOS builds. Maybe we can incorporate more support directly into the makefile.
Additionally, for the OPHD Mingw build, the WARN_EXTRA flag also includes -Wno-dangling-reference. Though that's also used for the GCC build, and seems to be tied to a new warning flag that may be a bit buggy.
The makefile has a TARGET_OS variable, which when set to Windows could be an indication that we expect to use the Mingw specific libraries for linking. I don't know of a good way to query for an appropriate library search path. Potentially we could scan the output of sdl2-config --libs for just the -L flag. Or we could assume it's in some standard location, such as is used by the Dockerfile. Currently the Dockerfile sets the path using a basic install prefix combined with a target architecture component:
ARCH64=x86_64-w64-mingw32
ARCH32=i686-w64-mingw32
INSTALL_PREFIX=/usr/local/
INSTALL64=${INSTALL_PREFIX}${ARCH64}/
INSTALL32=${INSTALL_PREFIX}${ARCH32}/
Edit: It is possible to use a Mingw specific version of pkg-config to find the needed folder.
sudo apt install mingw-w64-tools
x86_64-w64-mingw32-pkg-config --libs-only-L sdl2
-L/usr/local/x86_64-w64-mingw32/lib
This matches with the path constructed above.
Edit 2:
A bug was discovered with the pkg-config file for the SDL2_image library, which was reported and quickly fixed: libsdl-org/SDL_image#527 (comment)
Edit 3:
An update to use the Mingw version of pkg-config can result in harmless warnings when the tool is not installed and TARGET_OS is set to Windows:
make: x86_64-w64-mingw32-pkg-config: No such file or directory
make: x86_64-w64-mingw32-pkg-config: No such file or directory
This can be handled the same way the warning was removed for the sdl2-config tool when it wasn't found.
It seems the Mingw version of pkg-config also has issues with the glew library:
x86_64-w64-mingw32-pkg-config --libs glew
Package glu was not found in the pkg-config search path.
Perhaps you should add the directory containing `glu.pc'
to the PKG_CONFIG_PATH environment variable
Package 'glu', required by 'glew', not found
The preprocessor flag -DGLEW_STATIC is used to disable the need for a glu library install. Hence that dependency is optional. Perhaps that package configuration file could be updated to reflect the optional nature of the dependency. Currently it's not possible to use pkg-config for the glew package without the glu dependency also installed.
The makefile has a CURRENT_OS variable, which when set to Darwin could be an indication that we expect to use brew for dependencies. That could enable us to set flags for the include search path and library search path to add the brew specific folders.
The CI builds need custom variables set in the environment for Mingw and MacOS builds. Maybe we can incorporate more support directly into the
makefile
.Mingw:
MacOS:
Additionally, for the OPHD Mingw build, the
WARN_EXTRA
flag also includes-Wno-dangling-reference
. Though that's also used for the GCC build, and seems to be tied to a new warning flag that may be a bit buggy.The
makefile
has aTARGET_OS
variable, which when set toWindows
could be an indication that we expect to use the Mingw specific libraries for linking. I don't know of a good way to query for an appropriate library search path. Potentially we could scan the output ofsdl2-config --libs
for just the-L
flag. Or we could assume it's in some standard location, such as is used by theDockerfile
. Currently theDockerfile
sets the path using a basic install prefix combined with a target architecture component:ARCH64=x86_64-w64-mingw32
ARCH32=i686-w64-mingw32
INSTALL_PREFIX=/usr/local/
INSTALL64=${INSTALL_PREFIX}${ARCH64}/
INSTALL32=${INSTALL_PREFIX}${ARCH32}/
Edit: It is possible to use a Mingw specific version of
pkg-config
to find the needed folder.This matches with the path constructed above.
Edit 2:
A bug was discovered with the
pkg-config
file for theSDL2_image
library, which was reported and quickly fixed:libsdl-org/SDL_image#527 (comment)
Edit 3:
An update to use the Mingw version of
pkg-config
can result in harmless warnings when the tool is not installed andTARGET_OS
is set toWindows
:This can be handled the same way the warning was removed for the
sdl2-config
tool when it wasn't found.Edit 4:
It seems the Mingw version of
pkg-config
also has issues with theglew
library:The preprocessor flag
-DGLEW_STATIC
is used to disable the need for aglu
library install. Hence that dependency is optional. Perhaps that package configuration file could be updated to reflect the optional nature of the dependency. Currently it's not possible to usepkg-config
for theglew
package without theglu
dependency also installed.Guide to
pkg-config
:https://people.freedesktop.org/~dbn/pkg-config-guide.html
The
makefile
has aCURRENT_OS
variable, which when set toDarwin
could be an indication that we expect to usebrew
for dependencies. That could enable us to set flags for the include search path and library search path to add thebrew
specific folders.Related:
makefile
to not usesdl2-config
#1237makefile
flag-Umain
fortest-graphics
project #1240The text was updated successfully, but these errors were encountered: