最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

【记录】Cygwin下把make从v3.82换成v3.81

Cygwin crifan 1782浏览 0评论

【背景】

折腾:

【未解决】Cygwin下配置Linux内核出错:Makefile:419: *** mixed implicit and normal rules. Stop.

期间,需要把Cygwin中的,新的版本的,3.82的make,换为旧的,3.81版本的。

【折腾过程】

1.目前能想到的,只能是重新运行setup,然后试试能否找到3.81的make,然后重新安装。

2.后来参考:

How to install new packages on Cygwin?

提到了,貌似可以通过apt-cyg去安装一个软件包的。

而此apt-cyg,之前就在别处的cygwin下安装过。

所以,此处,再去在此处的cygwin下安装一下:

找到:

https://code.google.com/p/apt-cyg/

然后去下载和安装:

CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
A    /bin
A    /bin/apt-cyg
Exported revision 18.

CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ chmod +x /bin/apt-cyg

CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ apt-cyg --version
apt-cyg version 0.57
Written by Stephen Jungels

Copyright (c) 2005-9 Stephen Jungels.  Released under the GPL.

CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ which apt-cyg
/usr/bin/apt-cyg

即可。

3.试试能否去安装make,结果连不上服务器:

CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ apt-cyg cache search make
apt-cyg: Installs and removes Cygwin packages.
  "apt-cyg install <package names>" to install packages
  "apt-cyg remove <package names>" to remove packages
  "apt-cyg update" to update setup.ini
  "apt-cyg show" to show installed packages
  "apt-cyg find <patterns>" to find packages matching patterns
  "apt-cyg describe <patterns>" to describe packages matching patterns
  "apt-cyg packageof <commands or files>" to locate parent packages
Options:
  --mirror, -m <url> : set mirror
  --cache, -c <dir>  : set cache
  --file, -f <file>  : read package names from file
  --noupdate, -u     : don't update setup.ini from mirror
  --help
  --version

CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ apt-cyg find make
Working directory is /setup
Mirror is ftp://mirror.mcs.anl.gov/pub/cygwin
--2013-08-22 14:03:25--  ftp://mirror.mcs.anl.gov/pub/cygwin/setup.bz2
           => `.listing'
Resolving mirror.mcs.anl.gov (mirror.mcs.anl.gov)... 146.137.96.7, 2620:0:dc0:1800:214:4fff:fe7d:1b9
Connecting to mirror.mcs.anl.gov (mirror.mcs.anl.gov)|146.137.96.7|:21... failed: Connection timed out.
Connecting to mirror.mcs.anl.gov (mirror.mcs.anl.gov)|2620:0:dc0:1800:214:4fff:fe7d:1b9|:21... failed: Connection timed out.
Retrying.

--2013-08-22 14:04:09--  ftp://mirror.mcs.anl.gov/pub/cygwin/setup.bz2
  (try: 2) => `.listing'
Connecting to mirror.mcs.anl.gov (mirror.mcs.anl.gov)|146.137.96.7|:21... failed: Connection timed out.
Connecting to mirror.mcs.anl.gov (mirror.mcs.anl.gov)|2620:0:dc0:1800:214:4fff:fe7d:1b9|:21... failed: Connection timed out.
Retrying.

--2013-08-22 14:04:53--  ftp://mirror.mcs.anl.gov/pub/cygwin/setup.bz2
  (try: 3) => `.listing'
Connecting to mirror.mcs.anl.gov (mirror.mcs.anl.gov)|146.137.96.7|:21... failed: Connection timed out.
Connecting to mirror.mcs.anl.gov (mirror.mcs.anl.gov)|2620:0:dc0:1800:214:4fff:fe7d:1b9|:21...

4.所以,貌似,此处,只能放弃apt-cyg了。

那就想办法,通过setup去安装3.81的make。

看到cygwin主页:

http://www.cygwin.com/install.html

的说明,貌似现在又出现一个for x64的:setup-x86_64.exe

当前此处win7是x64的,所以,不知道要不要用这个for x64的setup。

因为担心,会不会运行此x64的setup,和之前已经(用x86的setup)安装的cygwin,会有冲突。

 

所以还是先去看看,能否找到原先已有的那个setup.exe了。

找到了之前用的setup.exe:

find previous setupt exe for cygwin

所以,就可以重新去运行了:

setup exe version 2.769 for cygwin

暂时还是先从本地看看再说:

install from local directory for this

cygwin install root dir

local package directory for cygwin

结果,本地只有3.82的make:

local only 3.82 make

所以,放弃从本地安装。

重新运行setup.exe,选择在线安装:

install from internet to find make

直接连接:

use direct connection

选择163的源:

choose 163 mirror

然后结果竟然出错了“Unable to get setup.ini from <http://mirrors.163.com/cygwin/>:

【已解决】Cygwin安装时,选择163的源后出错:Unable to get setup.ini from <http://mirrors.163.com/cygwin/>

 

5.然后还是看到只有3.82的make,但是注意到,当前是选择了“Hide obsolete packages”的:

hide obsolete then only see 3.82 make_thumb

6.所以,取消选择“Hide obsolete packages”,看看能否有其他版本的make,结果还是没有:

unselect obsolete still no other version make_thumb

7.然后尝试切换到Exp试试:

from curr change to exp _thumb

看看能否有其他版本的make,结果还是没有:

hide obsolete exp still no 3.81 make_thumb

8.貌似163的cygwin的mirror中,没有3.81的make?

所以去看了看:

http://mirrors.163.com/cygwin/x86_64/setup.ini

结果真的没有搜到3.81的make。

不过倒是在:

http://mirrors.163.com/cygwin/x86/setup.ini

中搜到了3.81的make:

@ make
sdesc: "The GNU version of the 'make' utility"
ldesc: "A GNU tool for controlling the generation of executables and other
non-source files of a program from the program's source files. Make
allows users to build and install packages without any significant
knowledge about the details of the build process. The details about
how the program should be built are provided for make in the program's
makefile."
category: Devel
requires: cygwin coreutils bash libintl8 libiconv2
version: 3.82.90-1
install: x86/release/make/make-3.82.90-1.tar.bz2 452564 5f7a3fa41811b2309b735862a291615b
source: x86/release/make/make-3.82.90-1-src.tar.bz2 1312867 6758bbbd3315c37d9e8df888a276cef6
[prev]
version: 3.81-2
install: x86/release/make/make-3.81-2.tar.bz2 358213 8c54e2611401c435cec0a9a95fd0e9dc
source: x86/release/make/make-3.81-2-src.tar.bz2 1114196 615bc53f9c86f365974caeb41006975e

9.所以,接下来,就是去:

重新用cygwin官网的最新的setup.exe,去加载163的x86的mirror:

http://mirrors.163.com/cygwin/x86/

然后应该就可以找到对应的3.81的make了。

去下载

http://www.cygwin.com/setup-x86.exe

然后去安装:

setup exe version is new 2.819 32bit_thumb

然后同样设置x86的163的mirror:

also add x86 163 mirror_thumb

此处,好像是,第二个:

seems is the second item_thumb

结果是地址搞错了,弄了两个x86:

x86 twice is wrong_thumb

换成正确的:

choose first 163 mirror_thumb

then is ok is the x86 link_thumb

然后正确解析了,再去找3.81的make,结果如上,也是找不到。

10.然后,再次去确认一下,本地的setup.in:

D:\tmp\dev_tools\cygwin\http%3a%2f%2fmirrors.163.com%2fcygwin%2fx86%2f\setup.ini

其中是包含了3.81的make的:

@ make

sdesc: "The GNU version of the ‘make’ utility"

ldesc: "A GNU tool for controlling the generation of executables and other

non-source files of a program from the program’s source files. Make

allows users to build and install packages without any significant

knowledge about the details of the build process. The details about

how the program should be built are provided for make in the program’s

makefile."

category: Devel

requires: cygwin coreutils bash libintl8 libiconv2

version: 3.82.90-1

install: x86/release/make/make-3.82.90-1.tar.bz2 452564 5f7a3fa41811b2309b735862a291615b

source: x86/release/make/make-3.82.90-1-src.tar.bz2 1312867 6758bbbd3315c37d9e8df888a276cef6

[prev]

version: 3.81-2

install: x86/release/make/make-3.81-2.tar.bz2 358213 8c54e2611401c435cec0a9a95fd0e9dc

source: x86/release/make/make-3.81-2-src.tar.bz2 1114196 615bc53f9c86f365974caeb41006975e

但是还是找不到。

11.后来的后来,无意间发现,原来,make的那个keep,是可以点击切换的,除了之前的uninstall等选项之外,还可以切换到,之前的3.81的版本的:

click keep till change to 3.81-2 version make_thumb

如此,就可以实现了:

卸载旧的3.82的make,重新安装旧的3.81的make了。

 

然后,另外也顺带,把src选上:

also check src for make_thumb

 

12.继续去安装:

choose 3.81 version make then next_thumb

由于默认的选择了其他的一些软件包,结果会去另外下载和安装这些包:

will download and install many others_thumb

downloading xmhtml_thumb

然后就是漫长的等待了。。。

13.其中,此处,发现:

原先下载的位置是:

D:\tmp\dev_tools\cygwin\http%3a%2f%2fmirrors.163.com%2fcygwin%2f\release

而此处,没有下载到:

D:\tmp\dev_tools\cygwin\http%3a%2f%2fmirrors.163.com%2fcygwin%2fx86%2f

而是下载到了:

D:\tmp\dev_tools\cygwin\http%3a%2f%2fmirrors.163.com%2fcygwin%2f\x86

下面的release了,即:

D:\tmp\dev_tools\cygwin\http%3a%2f%2fmirrors.163.com%2fcygwin%2f\x86\release

所以,为了加速,减少部分内容的下载,就把

D:\tmp\dev_tools\cygwin\http%3a%2f%2fmirrors.163.com%2fcygwin%2f\release

下面所有的包,全部都拷贝到

D:\tmp\dev_tools\cygwin\http%3a%2f%2fmirrors.163.com%2fcygwin%2f\x86\release

下面去了,这样,就可以减少N多内容的下载,加快速度了。

14.经过漫长的等待,下载完毕后,就是去安装了:

after download all then installing

然后就是运行一些脚本:

after install then running for cygwin

15.最后,终于安装完成了:

add icon to start menu for cygwin

然后再去启动Cygwin,确认一下make的版本,果然是3.81了:

CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-cygwin

 

【总结】

本来只是把cygwin中的make从3.82换成3.81的,结果却是重新完整的安装了一遍cygwin,太耗时间了。。。

转载请注明:在路上 » 【记录】Cygwin下把make从v3.82换成v3.81

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
60 queries in 0.142 seconds, using 19.08MB memory