How to build the environment of MSYS in the windows?

How to build the environment of MSYS in the windows?

 

How to build the environment of MSYS for the crossing compiler has demonstrated how to establish the environment of MSY, but there are some faults to compile other applications, such as FFMPEG. Herein, I will re-tidy these contents up to support multi-version compiler at the same time.

 

The whole procedure is separated into five steps: A -> B -> C -> D -> E. Reader should follow it when construct the environment.

 

StepA01: Create folder named DIY-msys .

StepA02: Download msysCORE-1.0.11-20080826.tar.gz and extract it into the DIY-msys .

StepA03: Download coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2  and extract it into the DIY-msys .

StepA04: Download bash-3.1-MSYS-1.0.11-1.tar.bz2 and extract it into the DIY-msys .

StepA05: Download perl-5.6.1-MSYS-1.0.11-1.tar.bz2   and extract into the DIY-msys .

StepA06: Downloadcrypt-1.1-1-MSYS-1.0.11-1.tar.bz2 and extract into the DIY-msys .

StepA07: Download flex-2.5.33-MSYS-1.0.11-1.tar.bz2 and extract it into the DIY-msys .

StepA08: Download zlib-1.2.3-MSYS-1.0.11-1.tar.bz2 and extract it into the DIY-msys , and delete /lib/libz.dll.a.

StepA09: Download autoconf-2.61-MSYS-1.0.11-1.tar.bz2 and extract it into the DIY-msys .

StepA10: Download mingw-install-20060210.tar.gz , and extract it into the DIY-msys .

StepA11: Extract automake-1.9.6-20050907-1.tar.gz into the DIY-msys in the mingw-install-20060210 folder.

StepA12: Download bison-2.3-MSYS-1.0.11-1.tar.bz2 and extract it into the DIY-msys .

StepA13: Extract gettext-0.14.5-20050907-2.tar.gz into the DIY-msys in the mingw-install-20060210 folder.

StepA14: Download libiconv-1.11-MSYS-1.0.11-1.tar.bz2 and extract it into the DIY-msys .

StepA15: Extract libiconv-2.dll at the bin folder of libiconv-1.9.2-20050907-1.tar.gz in the mingw-install-20060210 folder.

StepA16: Download libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma and extract it into the DIY-msys .

StepA17: Download regex-0.12-MSYS-1.0.11-1.tar.bz2 and extract it into the DIY-msys/bin .

StepA18: Download pkg-config_0.23-3_win32.zip and extract it into DIY-msys .

StepA19: Download glib_2.20.4-1_win32.zip and extract bin/libglib-2.0-0.dll into the   DIY-msys/bin .

StepA20: Download moztools-static.zip , and extract moztools/bin/nsinstall.exe into the DIY-msys/bin .

StepA21: Download pthread.h and copy it into “/include ”.

StepA22: Download sched.h and copy it into “/include ”.

StepA23: Download semaphore.h and copy it into “/include ”.

StepA24: Download pthreadGC2.dll and copy it into “/bin ”.

StepA25: Download libpthreadGC2.a and copy it into “/lib ”.

StepA26: Download mingw-utils-0.3.tar.gz and extract it into the DIY-msys .

 

StepA27: Download unzip-5.51-1-bin.zip and extract it into the DIY-msys .

StepA28: Download zip-3.0-bin.zip and extract it into the DIY-msys .

StepA29: Download bzip2-1.0.5-bin.zip and extract ‘bin/bzip2.dll ’ into ‘/bin ’.

 

 

 

StepB01: Create folder named ming-base

StepB02: Download mingwrt-3.15.2-mingw32-dev.tar.gz and extract it into the ming-base .

StepB03: Download w32api-3.13-mingw32-dev.tar.gz  and extract it into the ming-base .

StepB04: Download binutils-2.19.1-mingw32-bin.tar.gz  and extract it into the ming-base .

 

StepC01: Copy ming-base to gcc-4.2.1-mingw .

StepC02: Download gcc-core-4.2.1-sjlj-2.tar.gz and extract it into the gcc-4.2.1-mingw .

StepC03: Download gcc-g++-4.2.1-sjlj-2.tar.gz and extract it into the gcc-4.2.1-mingw .

StepC04: Download gcc-gfortran-4.2.1-sjlj-2.tar.gz and extract it into the gcc-4.2.1-mingw .

StepC05: Download gcc-objc-4.2.1-sjlj-2.tar.gz and extract it into the gcc-4.2.1-mingw .

StepC06: Download gcc-ada-4.2.1-sjlj-2.tar.gz and extract it into the gcc-4.2.1-mingw .

StepC07: Rename all *-sjlj.exe to *.exe in the gcc-4.2.1-mingw . For example, gcc-sjlj.exe to gcc.exe, etc.

 

StepD01: Copy /etc/fstab.sample into /etc/fstab and map XXX/DIY-msys/gcc-4.2.1-mingw to /mingw

StepD02: Edit /msys.bat and add call "XXX/VC/bin/vcvars32.bat" in the beginning position.

StepD03: Edit /etc/profile and add “export PKG_CONFIG_PATH=/lib/pkgconfig:/mingw/lib/pkgconfig:$PKG_CONFIG_PATH

StepD04: Edit /etc/profile and add "export PERLLIB=/usr/share/autoconf/Autom4te:/usr/share/automake-1.9:$PERLLIB

StepD05: Edit /bin/aclocal and /bin/aclocal-1.9

 

                The 32th line: /mingw/share/automake-1.9 to /usr/share/automake-1.9

                The 48th line: /mingw/share/aclocal            to /usr/share/aclocal

StepD06: Edit /bin/automake and /bin/automake-1.9

                The 34th line: /mingw/share/automake-1.9 to /usr/share/automake-1.9

StepD07: Edit /share/automake-1.9/Automake/Config.pm

                The 35th line: /mingw/share/automake-1.9  to /usr/share/automake-1.9

StepD08: Edit /bin/autopoint

                The 30th line: /mingw to /usr

StepD09: Edit /share/man/man1/gettext.1

                The 47th line: /mingw/share/locale to /usr/share/locale

StepD10: Edit /share/man/man1/ngettext.1

                 The 46th line: /mingw/share/locale to /usr/share/locale

 

 

 

StepE01: Download nasm-2.07rc7.tar.gz and install it.

StepE02: Download yasm-0.8.0.tar.gz and install it.

 

[Summarization]

 

1. When adding new compiler of GCC, reader copy ming-base into a new folder, such as gcc-4.3.0-mingw, and extract compiler’s components into this new folder. After that, re-map the new local path into the /mingw in the /etc/fstab file, and new compiler can be used in that time.

2. It has not utilized the latest tools in MING, but it is stable and enough to deal with the daily activities.

 

 

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值