Page 1 of 2
msys2 win32 configure error
Posted: Mon Oct 12, 2020 3:19 pm
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?
Re: msys2 win32 configure error
Posted: Mon Oct 12, 2020 3:41 pm
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.
Re: msys2 win32 configure error
Posted: Mon Oct 12, 2020 3:46 pm
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.
Re: msys2 win32 configure error
Posted: Mon Oct 12, 2020 4:11 pm
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.
Re: msys2 win32 configure error
Posted: Mon Oct 12, 2020 4:27 pm
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
Re: msys2 win32 configure error
Posted: Mon Oct 12, 2020 7:09 pm
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?
Re: msys2 win32 configure error
Posted: Mon Oct 12, 2020 8:35 pm
by louis94
Set the OS triplet to something different than your host.
Re: msys2 win32 configure error
Posted: Mon Oct 12, 2020 10:55 pm
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!
Re: msys2 win32 configure error
Posted: Tue Oct 13, 2020 11:43 pm
by jwrober
louis94 wrote:Set the OS triplet to something different than your host.
How do I do this?
Re: msys2 win32 configure error
Posted: Thu Oct 15, 2020 6:10 pm
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.