msys2 win32 configure error

Can you help improve your favourite game? Hardcore C mages, talented artists, and players with any level of experience are welcome!
jwrober
Posts: 35
Joined: Thu Jul 11, 2019 2:05 pm

msys2 win32 configure error

Post by jwrober »

I am trying to setup my own msys2 development environment on windows to help contribute to the project, but am getting an error when trying to compile a base S2_6 branch of the code. This is the error I am getting:

Code: Select all

checking for iconv... no, consider installing GNU libiconv
checking for libcharset... no
checking for nl_langinfo and CODESET... no
configure: error: Iconv is missing. You can get libiconv from http://gnu.org/, or try using --with-libiconv-prefix.
make[1]: *** [Makefile:71: build-freeciv-common] Error 1
make[1]: Leaving directory '/home/James/freeciv/win32/installer_msys2'
make: *** [Makefile:49: sdl2-installer] Error 2
iconv is installed as is the library. I added it to my personal $PATH variable to see if it could be found to no avail. Any ideas?
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: msys2 win32 configure error

Post by cazfi »

1) You could try with official msys2 environment snapshot from http://files.freeciv.org/packages/windows/msys2/ Especially if you want to build S2_6, you can't use latest msys2, but snapshot documented in doc/README.msys2 (170714 in case of S2_6) as that has library versions compatible with the freeciv source in question.

2) If you really don't want to use the snapshot, make sure you have installed all the packages listed in README.msys2


See also http://www.freeciv.org/wiki/Msys2_As_De ... nvironment if you haven't already.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: msys2 win32 configure error

Post by cazfi »

cazfi wrote:snapshot documented in doc/README.msys2 (170714 in case of S2_6)
Feature #853127 has a patch to use S2_6 with latest msys2 environment snapshot 200906.
jwrober
Posts: 35
Joined: Thu Jul 11, 2019 2:05 pm

Re: msys2 win32 configure error

Post by jwrober »

Thanks cazfi. I am using the snapshots you create and was using the latest build. Thanks for the patch and the dev environment page. Let me digest that and report back.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: msys2 win32 configure error

Post by cazfi »

jwrober wrote:Let me digest that and report back.
I'll be traveling next couple of days. You may reach me better via freeciv-dev mailing list than here. https://www.freelists.org/list/freeciv-dev
jwrober
Posts: 35
Joined: Thu Jul 11, 2019 2:05 pm

Re: msys2 win32 configure error

Post by jwrober »

I am making progress, getting stuck with SDL2 now.

Code: Select all

checking for sdl2-config... /mingw32/bin/sdl2-config
checking for SDL2 - version >= 2.0.0... no
*** Could not run SDL2 test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occurred. This usually means SDL2 was incorrectly installed
*** or that you have moved SDL2 since it was installed. In the latter case, you
*** may want to edit the sdl2-config script: /mingw32/bin/sdl2-config
configure: error: SDL mixer support requested, but cannot be compiled in
make[1]: *** [Makefile:73: build-freeciv-common] Error 1
make[1]: Leaving directory '/home/James/freeciv/S2_6/src/win32/installer_msys2'
make: *** [Makefile:51: sdl2-installer] Error 2
sdl2-config is at the proposed location and is a good version

Code: Select all

$ /mingw32/bin/sdl2-config --version
2.0.12
Ideas?
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: msys2 win32 configure error

Post by louis94 »

Set the OS triplet to something different than your host.
jwrober
Posts: 35
Joined: Thu Jul 11, 2019 2:05 pm

Re: msys2 win32 configure error

Post by jwrober »

I think I figured it out. Need to set two env variables

Code: Select all

> vim ~/.bash_profile # And add these lines to the bottom: 
	PATH=/mingw32/bin:/mingw64/bin:${PATH}
	PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/mingw32/lib/pkgconfig:/mingw64/lib/pkgconfig
Adding those lines gets me through configure and the base make process. Now I am getting compile error. On to the next problem!
jwrober
Posts: 35
Joined: Thu Jul 11, 2019 2:05 pm

Re: msys2 win32 configure error

Post by jwrober »

louis94 wrote:Set the OS triplet to something different than your host.
How do I do this?
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: msys2 win32 configure error

Post by cazfi »

jwrober wrote:I think I figured it out. Need to set two env variables

Code: Select all

> vim ~/.bash_profile # And add these lines to the bottom: 
	PATH=/mingw32/bin:/mingw64/bin:${PATH}
	PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/mingw32/lib/pkgconfig:/mingw64/lib/pkgconfig
That doesn't look good. Your are unconditionally referring to both win32 and win64 target files no matter what the actual target is. For example if you are trying to build for win64 target, pkg-config will first find and use win32 stuff from the /mingw32/lib/pkgconfig.
Post Reply