Skip to content
Permalink
Browse files
trimmimg the build chain
  • Loading branch information
dch committed Aug 19, 2011
1 parent 3e5267a commit 3dd36dab5515a0e6d1810d8ce15c1c1e55779735
Show file tree
Hide file tree
Showing 12 changed files with 113 additions and 115 deletions.
@@ -6,3 +6,5 @@ bits/*.bz2
bits/setup.log*
bits/http*
bits/*.iso

ftp%3a%2f%2f*
@@ -47,17 +47,17 @@ Glazier requires 6 things to run successfully
cd /relax
CYGWIN="nontsec nodosfilewarning"
CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1
tar xzf /relax/bits/apache-couchdb-1.0.2.tar.gz &
tar xzf /relax/bits/curl-7.21.3.tar.gz &
tar xzf /relax/bits/otp_src_R14B02.tar.gz &
cd /relax/otp_src_R14B02 && tar xzf /relax/bits/tcltk85_win32_bin.tar.gz &
tar xzf /relax/bits/apache-couchdb-1.1.0.tar.gz &
tar xzf /relax/bits/curl-7.21.7.tar.gz &
tar xzf /relax/bits/otp_src_R14B03.tar.gz &
cd /relax/otp_src_R14B03 && tar xzf /relax/bits/tcltk85_win32_bin.tar.gz &

* then run the following 4 scripts in order

erl_build.sh
erl_config.sh
couchdb_build.sh
erl_build.sh
couchdb_config.sh
couchdb_build.sh

* each of these scripts leaves logfiles in the root folder. If you have issues
during compilation phase, load these onto <http://friendpaste.com/>
@@ -229,7 +229,7 @@ or using mklink.exe

* in a cygwin shell, using these new junction points:

cd /relax && tar xzf /relax/bits/otp_src_R14B02.tar.gz &
cd /relax && tar xzf /relax/bits/otp_src_R14B03.tar.gz &

* then run from explorer, `%GLAZIER%\bin\relax.cmd`

@@ -249,20 +249,6 @@ or using mklink.exe
[relax.cmd](http://github.com/dch/glazier/bin/relax.cmd) and
[relax.sh](http://github.com/dch/glazier/bin/relax.sh)

Getting OTP to find vcredist_x86.exe is not easy. A simple solution is to hack `$ERL_TOP/erts/etc/win32/nsis/find_redist.sh` to look in `$ERL_TOP/..` first.

# shortcut for locating vcredist_x86.exe is to put it into $ERL_TOP
if [ -f $ERL_TOP/vcredist_x86.exe ]; then
echo $ERL_TOP/vcredist_x86.exe
exit 0
fi

# or $ERL_TOP/.. to share across multiple builds
if [ -f $ERL_TOP/../vcredist_x86.exe ]; then
echo $ERL_TOP/../vcredist_x86.exe
exit 0
fi

* Build Erlang using `/relax/glazier/bin/erl_config.sh`
and `/relax/glazier/bin/erl_build.sh`, or manually as follows

@@ -287,11 +273,11 @@ Getting OTP to find vcredist_x86.exe is not easy. A simple solution is to hack `

CouchDB has been built & tested against the following components successfully

* Erlang OTP R14B02 including source
* ICU 4.2.1
* Win32 OpenSSL 1.0.0d
* Erlang OTP R14B03 including source
* ICU 4.4.2
* OpenSSL 1.0.0d
* Mozilla SpiderMonkey 1.8.5 or Firefox 4.0 release
* libcurl 7.21.5
* libcurl 7.21.7

## Javascript #################################################################

@@ -303,10 +289,11 @@ below is also used on the Mac OS X homebrew build of CouchDB.
* run `c:\mozilla-build\start-msvc9.bat` even if you are on a 64-bit platform.

cd $RELAX
tar xzf bits/tracemonkey-57a6ad20eae9.tar.gz
tar xzf bits/57a6ad20eae9.tar.gz
cd ./tracemonkey-57a6ad20eae9/js/src
autoconf-2.13
./configure --enable-static
export CXXFLAGS='-D_BIND_TO_CURRENT_VCLIBS_VERSION=1'
./configure --enable-static --enable-shared-js
make

## Inno Installer #############################################################
@@ -373,8 +360,8 @@ below is also used on the Mac OS X homebrew build of CouchDB.
--with-win32-curl=/relax/curl-7.21.5 \
--with-openssl-bin-dir=/relax/openssl/bin \
--with-msvc-redist-dir=/relax \
--with-js-lib=/relax/tracemonkey-57a6ad20eae9/js/src/dist/lib \
--with-js-include=/relax/tracemonkey-57a6ad20eae9/js/src/dist/include \
--with-js-lib=/relax/57a6ad20eae9/js/src/dist/lib \
--with-js-include=/relax/57a6ad20eae9/js/src/dist/include \
2>&1 | tee $COUCH_TOP/build_configure.txt


@@ -399,13 +386,12 @@ below is also used on the Mac OS X homebrew build of CouchDB.
[cygwin]: http://www.cygwin.com/setup.exe
[DEP]: http://support.microsoft.com/kb/875352
[erlang_R14B01]: http://www.erlang.org/download/otp_src_R14B01.tar.gz
[erlang_R14B02]: http://www.erlang.org/download/otp_src_R14B02.tar.gz
[erlang_R14B03]: http://www.erlang.org/download/otp_src_R14B03.tar.gz
[icu_bits_curr]: http://download.icu-project.org/files/icu4c/4.2/icu4c-4_2-Win32-msvc9.zip
[icu_bits_latest]: http://download.icu-project.org/files/icu4c/4.6/icu4c-4_6-Win32-msvc10.zip
[inno_bits]: http://www.jrsoftware.org/download.php/is-unicode.exe
[inno_help]: http://www.jrsoftware.org/ishelp/
[libcurl_bits]: http://curl.haxx.se/download/libcurl-7.19.3-win32-ssl-msvc.zip
[libcurl_src]: http://curl.haxx.se/download/curl-7.21.3.tar.gz
[libcurl_src]: http://curl.haxx.se/download/curl-7.21.7.tar.gz
[msvc++]: http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso
[mozbuild]: http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe
[notepadplus_bits]: http://sourceforge.net/projects/notepad-plus/files/notepad%2B%2B%20releases%20binary/npp%205.8.7%20bin/npp.5.8.7.Installer.exe/download
@@ -8,15 +8,13 @@ set CURL_PATH=%RELAX%\%curl_ver%

set OPENSSL_PATH=%RELAX%\openssl

::set ICU_PATH=%RELAX%\icu
set ZLIB_PATH=%RELAX%\%ZLIB_VER%
set USE_SSLEAY=1
set USE_OPENSSL=1

:: set path for curl & couch compilation later on
set INCLUDE=%INCLUDE%;%OPENSSL_PATH%\include\openssl;%CURL_PATH%\include\curl;%ICU_PATH%\include;%ZLIB_PATH%
set LIBPATH=%LIBPATH%;%OPENSSL_PATH%\lib;%CURL_PATH%\lib;%ICU_PATH%\lib;%ZLIB_PATH%
set LIB=%LIB%;%OPENSSL_PATH%\lib;%CURL_PATH%\lib;%ICU_PATH%\lib;%ZLIB_PATH%
set INCLUDE=%INCLUDE%;%OPENSSL_PATH%\include\openssl;%OPENSSL_PATH%\include;%CURL_PATH%\include\curl;%ICU_PATH%\include;
set LIBPATH=%LIBPATH%;%OPENSSL_PATH%\lib;%CURL_PATH%\lib;%ICU_PATH%\lib;
set LIB=%LIB%;%OPENSSL_PATH%\lib;%CURL_PATH%\lib;%ICU_PATH%\lib

:: set LINK & CL to resolve manifest binding issues & virtualisation hack in ld.sh#171
set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1
@@ -31,11 +29,11 @@ popd

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
pushd %relax%\%curl_ver%\winbuild
nmake /f makefile.vc mode=static use_sspi=no with_ssl=static with_zlib=static
nmake /f makefile.vc mode=static use_sspi=no with_ssl=static
::with_zlib=static
copy ..\builds\libcurl-release-static-ssl-dll-ipv6\bin\curl.exe %glazier%\bits;
cmd.exe /k

popd
endlocal
::endlocal
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -1 +1,30 @@
::setlocal
call "%vs90comntools%\..\..\vc\vcvarsall.bat" x86
path=%path%;%relax%\7zip;%glazier%\bin;%glazier%\bits;

pushd %glazier%\bits
set ICU_PATH=%RELAX%\icu

:: set path for ICU compilation later on
set INCLUDE=%INCLUDE%;%ICU_PATH%\include;
set LIBPATH=%LIBPATH%;%ICU_PATH%\lib;
set LIB=%LIB%;%ICU_PATH%\lib

:: set LINK & CL to resolve manifest binding issues & virtualisation hack in ld.sh#171
set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: clean up existing installs
rd /s/q %icu_path%
.\setenv -u icu_path %icu_path%
7z x icu4c-*src.zip -o%RELAX% -y
popd

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
pushd %icu_path%\source\allinone
vcbuild /useenv /platform:Win32 /M8 allinone.sln "Release|Win32"
::copy ..\builds\libcurl-release-static-ssl-dll-ipv6\bin\curl.exe %glazier%\bits;

::endlocal
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
popd
@@ -0,0 +1,28 @@
setlocal
call "%vs90comntools%\..\..\vc\vcvarsall.bat" x86
path=%path%;%relax%\7zip;%relax%\nasm;%relax%\strawberry\perl\bin;%glazier%\bin;%glazier%\bits;

set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: clean up existing installs
:: extract bundle and name
:: stash SSL version
pushd %glazier%\bits
del /f/q zlib*.tar
7z x zlib-*.tar.gz -y
for %%i in (zlib-*tar) do set zlib_ver=%%~ni
if defined zlib_ver rd /s/q %relax%\%zlib_ver%
.\setenv -u zlib_ver %zlib_ver%
7z x zlib-*.tar -o%relax%\ -y
popd

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
pushd %relax%\%zlib_ver%
:: enable-static-engine is now required for Erlang R14B03 to link against
pushd contrib\masmx86 && call bld_ml32.bat && popd
vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32"
copy contrib\vstudio\vc9\x86\ZlibStatRelease\zlibstat.lib .
popd
endlocal
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -21,7 +21,7 @@ echo DONE retrieving packages

:: md5 checksums
echo START md5 checksums...
::md5sum.exe --check md5sums.txt || echo FAILED: please check any missing or failed files && goto eof
md5sum.exe --check md5sums.txt || echo FAILED: please check any missing or failed files && goto eof
echo DONE md5 checksums

:: unpack stuff
@@ -41,18 +41,17 @@ mkdir %RELAX%\ISOs > NUL: 2>&1
7z.exe x %GLAZIER%\bits\*.iso -aoa -o%RELAX%\ISOs\*
xcopy %relax%\ISOs\VS2008ExpressWithSP1ENUX1504728\VCExpress\WCU\vcredist_x86.exe %glazier%\bits\ /y
echo DONE unpacking ISOs in [%RELAX%\ISOs]

:: start installing stuff
echo START installing compilers...
echo START MS VS2008 Express...
:: TODO remove hackage that prevents installing MSSQL burning CPU and space
mkdir dist
pushd %RELAX%\ISOs\VS2008ExpressWithSP1ENUX1504728\VCExpress\WCU\ && rd /s/q dist > NUL: 2>&1
for %%i in (Silverlight SMO SSE) do @move %%i dist\
mkdir dist && for %%i in (Silverlight SMO SSE) do @move %%i dist\
cd .. && start /wait setup.exe /q /norestart
popd
echo DONE MS VS2008 Express

echo START installing Windows 7 SDK...
:: if we merge the 32 and 64 bit SDK folders first, Windows installs the right one
:: automatically whether we are on 64 or 32 bit platform
@@ -95,7 +94,6 @@ echo START install ICU...
start /wait %RELAX%\7zip\7z.exe x %GLAZIER%\bits\icu* -aoa -o%RELAX%\
echo DONE install ICU


echo START install vcredist...
xcopy %GLAZIER%\bits\vcredist_x86.exe %RELAX%\ /y /f
echo DONE install vcredist
@@ -121,7 +119,7 @@ echo DONE install NSIS


echo START install Inno...
start /wait %GLAZIER%\bits\isetup-5.4.0-unicode.exe /silent /dir="%RELAX%\inno5"
start /wait %GLAZIER%\bits\isetup-5.4.2-unicode.exe /silent /dir="%RELAX%\inno5"
echo DONE install Inno

echo START install NotepadPlus...
Empty file.

This file was deleted.

Empty file.
@@ -1,41 +1,23 @@
################################################################################
# bits required to build erlang
#erlang_R14B01 otp_src_R14B01.tar.gz http://www.erlang.org/download/otp_src_R14B01.tar.gz
erlang_R14B02 otp_src_R14B02.tar.gz http://www.erlang.org/download/otp_src_R14B02.tar.gz
erlang_R14B03 otp_src_R14B03.tar.gz http://www.erlang.org/download/otp_src_R14B03.tar.gz
nsis nsis-2.46-setup.exe http://download.sourceforge.net/project/nsis/NSIS%202/2.46/nsis-2.46-setup.exe
inno isetup-5.4.0-unicode.exe http://www.jrsoftware.org/download.php/is-unicode.exe
inno isetup-5.4.2-unicode.exe http://www.jrsoftware.org/download.php/is-unicode.exe
wxwidgets wxMSW-2.8.11.zip http://sourceforge.net/projects/wxwindows/files/2.8.11/wxMSW-2.8.11.zip
erlang_tcl tcltk85_win32_bin.tar.gz http://www.erlang.org/download/tcltk85_win32_bin.tar.gz
################################################################################
# bits required to build couch
libicu icu4c-4_2_1-Win32-msvc9.zip http://download.icu-project.org/files/icu4c/4.2.1/icu4c-4_2_1-Win32-msvc9.zip
###libicu icu4c-4_6-Win32-msvc10.zip http://download.icu-project.org/files/icu4c/4.6/icu4c-4_6-Win32-msvc10.zip
libcurl curl-7.21.3.tar.gz http://curl.haxx.se/download/curl-7.21.3.tar.gz
libicu icu4c-4_4_2-src.zip http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-src.zip
nsis nsis-2.46-setup.exe http://download.sourceforge.net/project/nsis/NSIS%202/2.46/nsis-2.46-setup.exe
#spidermonkey 57a6ad20eae9.tar.gz http://hg.mozilla.org/tracemonkey/archive/57a6ad20eae9.tar.gz
spidermonkey 57a6ad20eae9.tar.gz http://hg.mozilla.org/tracemonkey/archive/57a6ad20eae9.tar.gz
spidermonkey js185-1.0.0.tar.gz http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
#seamonkey seamonkey-2.0.11.source.tar.bz2 http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0.11/source/seamonkey-2.0.11.source.tar.bz2
################################################################################
# bits required for both builds
#vcredist is provided within VC++ bundle. here are a number of links for different versions ... go figure
##vcredist vcredist_x86.exe http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe
## older vcredist - there are many to choose from ...
## the reference site http://support.microsoft.com/kb/2019667
## vs2008sp1_secfix: http://download.microsoft.com/download/9/7/7/977B481A-7BA6-4E30-AC40-ED51EB2028F2/vcredist_x64.exe
## vs2008sp1_secfix: http://download.microsoft.com/download/9/7/7/977B481A-7BA6-4E30-AC40-ED51EB2028F2/vcredist_x86.exe
## vs2008sp1: http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe
## http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF
## http://download.microsoft.com/download/d/1/0/d10d210e-e0ad-4010-b547-bc5e395ef691/vcredist_x86.exe
## the original: http://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe
## vs2005sp1: http://download.microsoft.com/download/e/1/c/e1c773de-73ba-494a-a5ba-f24906ecf088/vcredist_x86.exe
## vs2005sp1_secfix: http://download.microsoft.com/download/6/B/B/6BB661D6-A8AE-4819-B79F-236472F6070C/vcredist_x86.exe
## vs2005sp1_secfix: http://download.microsoft.com/download/6/B/B/6BB661D6-A8AE-4819-B79F-236472F6070C/vcredist_x64.exe
#openssl Win32OpenSSL-1_0_0d.exe http://www.slproweb.com/download/Win32OpenSSL-1_0_0d.exe
# vcredist needs to match the build chain - www.microsoft.com/download/en/details.aspx?id=26368
vcredist vcredist_x86.exe http://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe
openssl openssl-1.0.0d.tar.gz http://www.openssl.org/source/openssl-1.0.0d.tar.gz
zlib zlib-1.2.5.tar.gz http://zlib.net/zlib-1.2.5.tar.gz
curl curl-7.21.5.zip http://curl.haxx.se/download/curl-7.21.5.zip
## not auto redirect but original link is from http://www.apache.org/dyn/closer.cgi?path=/couchdb/1.0.1/apache-couchdb-1.0.1.tar.gz
apache-couchdb-1.0.2 apache-couchdb-1.0.2.tar.gz http://people.apache.org/~davisp/dist/1.0.2/apache-couchdb-1.0.2.tar.gz
#apache-couchdb-1.0.3 apache-couchdb-1.0.3.tar.gz http://people.apache.org/~davisp/dist/1.0.3/apache-couchdb-1.0.3.tar.gz
#apache-couchdb-1.1.0 apache-couchdb-1.1.0.tar.gz http://people.apache.org/~nslater/dist/1.1.0/apache-couchdb-1.1.0.tar.gz
libcurl curl-7.21.7.zip http://curl.haxx.se/download/curl-7.21.7.zip
##zlib zlib125dll.zip http://www.winimage.com/zLibDll/zlib125dll.zip
## not auto redirect but original link is from http://www.apache.org/dyn/closer.cgi?path=/couchdb/1.x.y/apache-couchdb-1.x.y.tar.gz
apache-couchdb-1.0.3 apache-couchdb-1.0.3.tar.gz http://ftp.wayne.edu/apache/couchdb/1.0.3/apache-couchdb-1.0.3.tar.gz
apache-couchdb-1.1.0 apache-couchdb-1.1.0.tar.gz http://ftp.wayne.edu/apache/couchdb/1.1.0/apache-couchdb-1.1.0.tar.gz
@@ -1,12 +1,10 @@
################################################################################
# tools to support erlang and couchdb build
#7zip 7z465.exe http://downloads.sourceforge.net/sevenzip/7z465.exe
#curl curl-7.19.5-win32-ssl.zip http://curl.haxx.se/download/curl-7.19.5-win32-ssl.zip
#curl_static curl-7.21.1-ssl-sspi-zlib-static-bin-w32.zip http://www.gknw.net/mirror/curl/win32/curl-7.21.1-ssl-sspi-zlib-static-bin-w32.zip
7zip 7z465.exe http://downloads.sourceforge.net/sevenzip/7z465.exe
################################################################################
# stuff we could use in future
#bitvise_sshd_bits WinSSHD5-Inst.exe http://dl.bitvise.com/WinSSHD5-Inst.exe
#ramdisk imdiskinst.exe http://www.ltr-data.se/files/imdiskinst.exe
ramdisk imdiskinst.exe http://www.ltr-data.se/files/imdiskinst.exe
notepadplus npp.5.8.7.bin.minimalist.7z http://downloads.sourceforge.net/project/notepad-plus/notepad%2B%2B%20releases%20binary/npp%205.8.7%20bin/npp.5.8.7.bin.minimalist.7z
junction junction.exe http://live.sysinternals.com/junction.exe
setenv setenv.exe http://barnyard.syr.edu/~vefatica/ftpfiles/setenv.exe

0 comments on commit 3dd36da

Please sign in to comment.