Wiki: https://sourceforge.net/p/msys2/wiki/Home/html
Home: http://msys2.github.io/git
Sourcefore Home: https://sourceforge.net/projects/msys2/github
MSYS2-packages: https://github.com/Alexpux/MSYS2-packages网络
MINGW-packages: https://github.com/Alexpux/MINGW-packagescurl
使用MSYS2官方的源,在执行软件包的下载安装时一般很是的慢,常常连接被重置,若是有一个国内的安装镜像源的话,那么速度是很是快的.如今什么东西都有国内的镜像了,好比操做系统镜像,Eclipse镜像,就连Google的Andriod stdio IDE的更新都能找到国内的源....这说明咱们国内的技术愈来愈注重基础环境的构建,这是一种良性的软件开发生态,很是高兴.工具
在MSYS2的官方网站上,没有找到全部的镜像源的全部记录,只能经过搜索引擎慢慢的查找, 首先是MSYS2-packages中带的一个pacman-mirrors, 路径为https://github.com/Alexpux/MSYS2-packages/tree/master/pacman-mirrors 这个目录中指向的三个文件也就是咱们MSYS2默认使用的源.网站
在https://gist.github.com/elvisw/cc00088e9c8fd1c83aca 中有几个源,目前在网络上搜索类似度比较高的也就是这几个. mirrorlist.mingw32ui
## ## 32-bit Mingw-w64 repository mirrorlist ## Changed on 2014-11-15 ## ##中国科学技术大学开源软件镜像 Server = http://mirrors.ustc.edu.cn/msys2/REPOS/MINGW/i686 ##北京理工大学镜像 Server = http://mirror.bit.edu.cn/msys2/REPOS/MINGW/i686 ##日本北陆先端科学技术大学院大学 sourceforge 镜像 Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/i686 ##The UK Mirror Service Sourceforge mirror Server = http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/m/ms/msys2/REPOS/MINGW/i686 ## Primary Server = ftp://148.251.42.38/MINGW/i686 ## Sourceforge.net Server = http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686
mirrorlist.mingw64this
## ## 64-bit Mingw-w64 repository mirrorlist ## Changed on 2014-11-15 ## ##中国科学技术大学开源软件镜像 Server = http://mirrors.ustc.edu.cn/msys2/REPOS/MINGW/x86_64 ##北京理工大学镜像 Server = http://mirror.bit.edu.cn/msys2/REPOS/MINGW/x86_64 ##日本北陆先端科学技术大学院大学 sourceforge 镜像 Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/x86_64 ##The UK Mirror Service Sourceforge mirror Server = http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/m/ms/msys2/REPOS/MINGW/x86_64 ## Primary Server = ftp://148.251.42.38/MINGW/x86_64 ## Sourceforge.net Server = http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64
mirrorlist.msys搜索引擎
## ## MSYS2 repository mirrorlist ## Changed on 2014-11-15 ## ##中国科学技术大学开源软件镜像 Server = http://mirrors.ustc.edu.cn/msys2/REPOS/MSYS2/$arch ##北京理工大学镜像 Server = http://mirror.bit.edu.cn/msys2/REPOS/MSYS2/$arch ##日本北陆先端科学技术大学院大学 sourceforge 镜像 Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MSYS2/$arch ##The UK Mirror Service Sourceforge mirror Server = http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/m/ms/msys2/REPOS/MSYS2/$arch ## Primary Server = ftp://148.251.42.38/MSYS2/$arch ## Sourceforge.net Server = http://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/$arch
而中国科学技术大学的镜像源配置说明在https://lug.ustc.edu.cn/wiki/mirrors/help/msys2 可是按照文章中的指示:
pacman 的配置 编辑 /etc/pacman.d/mirrorlist.mingw32 ,在文件开头添加: Server = http://mirrors.ustc.edu.cn/msys2/REPOS/MINGW/i686 编辑 /etc/pacman.d/mirrorlist.mingw64 ,在文件开头添加: Server = http://mirrors.ustc.edu.cn/msys2/REPOS/MINGW/x86_64 编辑 /etc/pacman.d/mirrorlist.msys ,在文件开头添加: Server = http://mirrors.ustc.edu.cn/msys2/REPOS/MSYS2/$arch 而后执行 pacman -Sy 刷新软件包数据便可。
去配置镜像源,发现根本就不会起做用,一度让我认为这个源已经失效, 今天意外地发现,目前的镜像源应该配置为下面的内容才是合法有效的:
mingw32: Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686 mingw64: Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64 msys : Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch
在这篇文章中提到如何搭建MSYS2的镜像源,摘录以下:
Hi,
- Where do I download "the repository"?
From http://repo.msys2.org/mingw using curl or wget for example
- What do I need to do to configure pacman to use my mirror rather than the main repo?
Edit /etc/pacman.conf and define a new repository as explained in pacman.conf manpage. The new repository can be local or remote depending on your needs.
For a remote server, just setup an HTTP server serving the content of the directory where you downloaded packages (step. 1).
Packages must be indexed using the tool repo-add, see the manpage again.
That's all!
最近在MSYS2中的MINGW64环境中编译一个软件包的时候,遇到一个以下的错误:
$ ./autogen.sh Running autoreconf --verbose --install --force autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 configure.ac:337: warning: macro 'AM_PATH_LIBGCRYPT' not found in library autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' libtoolize: Remember to add 'LT_INIT' to configure.ac. configure.ac:337: warning: macro 'AM_PATH_LIBGCRYPT' not found in library autoreconf: running: /usr/bin/autoconf --force configure.ac:244: error: possibly undefined macro: AC_MSG_ERROR If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:337: error: possibly undefined macro: AM_PATH_LIBGCRYPT configure.ac:342: error: possibly undefined macro: AC_MSG_WARN autoreconf: /usr/bin/autoconf failed with exit status: 1
一直在解决AC_MSG_ERROR
这个问题,搜索了好多网站,都说是要安装pkg-config,网址记录有:
http://blog.csdn.net/kezhen/article/details/21727859
http://blog.csdn.net/w839687571/article/details/51810984
http://blog.csdn.net/yzyak47958/article/details/42002483
http://stackoverflow.com/questions/28570244/as-if-and-ac-msg-error-error-possibly-undefined-macro
https://github.com/j4tools/j4status-plugins/issues/3
http://flummox-engineering.blogspot.com/2014/04/configure-possibly-undefined-macro.html
https://bugs.freedesktop.org/show_bug.cgi?id=87297
https://github.com/jgarzik/cpuminer/issues/34
https://issues.mediagoblin.org/ticket/755
https://issues.mediagoblin.org/attachment/ticket/755/755.patch
https://github.com/ioerror/tlsdate/issues/97
还有好多,基本上提到的方法都没有解决这个问题, 既然解决不了"ERROR",我想先把"WARN"解决了吧,更换关键字,搜索到[Buildroot] [PATCH 1/1] systemd: fix AM_PATH_LIBGCRYPT not found
This patch installs a copy of libgcrypt.m4 from the libgcrypt source tarball to systemd m4 directory.
Libgcrypt uses a custom m4 macro and not pkg-config to check if the development files are available. Though libgcrypt support is optional in systemd, this macro should be available whenever autoreconf is used, otherwise the re-configuration will fail with:
configure.ac:616: warning: macro 'AM_PATH_LIBGCRYPT' not found in library
The call to autoreconf is required, as it is needed by the patch which solves the
ln --relative
issue.
提示要安装libgcrypt,搜索libgcrypt
库
$ pacman -Sl | grep libgcrypt mingw32 mingw-w64-i686-libgcrypt 1.7.3-1 mingw64 mingw-w64-x86_64-libgcrypt 1.7.3-1 msys libgcrypt 1.6.4-1 [已安装] msys libgcrypt-devel 1.6.4-1
这里使用的MINGW64,因此安装mingw-w64的库
$ pacman -S mingw-w64-x86_64-libgcrypt
安装完成后,再次执行./autogen.sh
$ ./autogen.sh Running autoreconf --verbose --install --force autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' libtoolize: Remember to add 'LT_INIT' to configure.ac. autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:36: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see: configure.ac:36: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation configure.ac:189: installing './compile' configure.ac:32: installing './config.guess' configure.ac:32: installing './config.sub' configure.ac:36: installing './install-sh' configure.ac:36: installing './missing' Makefile.am: installing './INSTALL' libfuse-lite/Makefile.am: installing './depcomp' autoreconf: Leaving directory `.'
顺利经过,困扰在心中的烦恼终于消失,可是感受对Linux的automake,autoconf,libtool,m4,autogen等工具了解还不是很是深刻,致使遇到问题老是搜索啊搜索.