From: Kern Sibbald Date: Tue, 11 Mar 2008 19:56:16 +0000 (+0000) Subject: kes Fix Win32 build. X-Git-Tag: Release-3.0.0~1703 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=11f6dd90712d7c1eb16b49daab402a840285b5be;p=bacula%2Fbacula kes Fix Win32 build. kes Update Win32 version of wxWidgets to most recent version git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6587 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patches/2.2.8-deadlock.patch b/bacula/patches/2.2.8-deadlock.patch new file mode 100644 index 0000000000..b9aed8a51f --- /dev/null +++ b/bacula/patches/2.2.8-deadlock.patch @@ -0,0 +1,124 @@ + + This patch fixes two deadlock conditions that occur in Bacula. + The first is caused by running simultaneous backup and restore jobs + with an autochanger, and leads to use counts getting out of sync causing + jobs in the Director to wait on resources. + The second is a condition where the SD is unable to use a Volume that + is currently mounted because it keeps wanting a different Volume. This + condition seems to be relatively rare unless you are using + "Prefer Mounted Volumes = no" in which case it occurs much more often. + + This patch can be applied to a fully patched 2.2.8 version with the + following: + + cd + patch -p0 <2.2.8-deadlock.patch + ./configure + make + ... + make install + + + +Index: src/dird/jobq.c +=================================================================== +--- src/dird/jobq.c (revision 6531) ++++ src/dird/jobq.c (working copy) +@@ -478,7 +478,7 @@ + */ + if (jcr->acquired_resource_locks) { + if (jcr->rstore) { +- jcr->rstore->NumConcurrentJobs = 0; ++ jcr->rstore->NumConcurrentJobs--; + Dmsg1(200, "Dec rncj=%d\n", jcr->rstore->NumConcurrentJobs); + } + if (jcr->wstore) { +Index: src/stored/askdir.c +=================================================================== +--- src/stored/askdir.c (revision 6531) ++++ src/stored/askdir.c (working copy) +@@ -252,20 +252,19 @@ + { + JCR *jcr = dcr->jcr; + BSOCK *dir = jcr->dir_bsock; +- bool found = false; + + Dmsg2(200, "dir_find_next_appendable_volume: reserved=%d Vol=%s\n", + dcr->reserved_device, dcr->VolumeName); + + /* +- * Try the twenty oldest or most available volumes. Note, ++ * Try the fourty oldest or most available volumes. Note, + * the most available could already be mounted on another + * drive, so we continue looking for a not in use Volume. + */ + lock_reservations(); + P(vol_info_mutex); + dcr->volume_in_use = false; +- for (int vol_index=1; vol_index < 20; vol_index++) { ++ for (int vol_index=1; vol_index < 40; vol_index++) { + bash_spaces(dcr->media_type); + bash_spaces(dcr->pool_name); + dir->fsend(Find_media, jcr->Job, vol_index, dcr->pool_name, dcr->media_type); +@@ -275,33 +274,26 @@ + bool ok = do_get_volume_info(dcr); + if (ok) { + if (!is_volume_in_use(dcr)) { +- found = true; +- break; ++ Dmsg0(400, "dir_find_next_appendable_volume return true\n"); ++ if (reserve_volume(dcr, dcr->VolumeName) == 0) { ++ Dmsg2(100, "Could not reserve volume %s on %s\n", dcr->VolumeName, ++ dcr->dev->print_name()); ++ continue; ++ } ++ V(vol_info_mutex); ++ unlock_reservations(); ++ return true; + } else { + Dmsg1(100, "Volume %s is in use.\n", dcr->VolumeName); + dcr->volume_in_use = true; + continue; + } +- } else { +- Dmsg2(100, "No vol. index %d return false. dev=%s\n", vol_index, +- dcr->dev->print_name()); +- found = false; +- break; + } ++ Dmsg2(100, "No vol. index %d return false. dev=%s\n", vol_index, ++ dcr->dev->print_name()); ++ break; + } +- if (found) { +- Dmsg0(400, "dir_find_next_appendable_volume return true\n"); +- if (reserve_volume(dcr, dcr->VolumeName) == 0) { +- Dmsg2(100, "Could not reserve volume %s on %s\n", dcr->VolumeName, +- dcr->dev->print_name()); +- goto bail_out; +- } +- V(vol_info_mutex); +- unlock_reservations(); +- return true; +- } + +-bail_out: + dcr->VolumeName[0] = 0; + V(vol_info_mutex); + unlock_reservations(); +Index: src/stored/acquire.c +=================================================================== +--- src/stored/acquire.c (revision 6531) ++++ src/stored/acquire.c (working copy) +@@ -362,7 +362,10 @@ + strcmp(dev->VolHdr.VolumeName, dcr->VolumeName) == 0)) { /* wrong tape mounted */ + /* Wrong tape mounted, release it, then fall through to get correct one */ + Dmsg0(50, "Wrong tape mounted, release and try mount.\n"); +- release = true; ++ /* Do not release if no Volume in drive */ ++ if (dev->VolHdr.VolumeName[0]) { ++ release = true; ++ } + do_mount = true; + } else { + /* diff --git a/bacula/src/win32/External-mingw32 b/bacula/src/win32/External-mingw32 index 5496d0ef7e..eb93acac01 100644 --- a/bacula/src/win32/External-mingw32 +++ b/bacula/src/win32/External-mingw32 @@ -37,7 +37,7 @@ SCONS|http://www.bacula.org/depkgs-mingw32/scons-0.96.92.tar.gz SED|http://www.bacula.org/depkgs-mingw32/sed-4.1.5.tar.gz SQLITE|http://www.bacula.org/depkgs-mingw32/sqlite-3.3.17.tar.gz STAB2CV|http://www.bacula.org/depkgs-mingw32/stab2cv-0.1.tar.bz2 -WX|http://www.bacula.org/depkgs-mingw32/wxWidgets-2.7.0.tar.gz +WX|http://www.bacula.org/depkgs-mingw32/wxWidgets-2.8.7.tar.gz ZLIB|http://www.bacula.org/depkgs-mingw32/zlib-1.2.3.tar.gz # # diff --git a/bacula/src/win32/Makefile.inc.in b/bacula/src/win32/Makefile.inc.in index c5b651b0c0..7b41950ce7 100644 --- a/bacula/src/win32/Makefile.inc.in +++ b/bacula/src/win32/Makefile.inc.in @@ -67,8 +67,8 @@ LIBS_CRYPTO := \ $(DEPKGS)/lib/libcrypto.dll.a LIBS_WX := \ - $(DEPKGS)/lib/wx_dll/libwxmsw27_core.a \ - $(DEPKGS)/lib/wx_dll/libwxbase27.a + $(DEPKGS)/lib/wx_dll/libwxmsw28_core.a \ + $(DEPKGS)/lib/wx_dll/libwxbase28.a LIBS_CATS := \ $(LIBDIR)/libcats.a diff --git a/bacula/src/win32/build-depkgs-mingw32 b/bacula/src/win32/build-depkgs-mingw32 index ce132dace7..a2f944865c 100755 --- a/bacula/src/win32/build-depkgs-mingw32 +++ b/bacula/src/win32/build-depkgs-mingw32 @@ -125,266 +125,266 @@ get_source() parse_output() { - sed -ne '/\\$/N' -e 's/\\\n//' -e 's/\t\+/ /g' -e 's/ \+/ /g' \ - -e '/ error: /p' \ - -e "s%.*Entering directory[ ]\\+.${DEPPKG_DIR}/\\([^ ]\+\).%Entering \\1%p" \ - -e "s%.*Leaving directory[ ]\\+.${DEPPKG_DIR}/\\([^ ]\+.\).%Leaving \\1%p" \ - -e '/gcc \|g\+\+ \|ar /!d' \ - -e 's/ \(\.\.\/\)\+/ /g' \ - -e 's/.* \([^ ]\+\(\.c\|\.cpp\|\.cc\|\.cxx\)\)\( .*\|\)$/Compiling \1/p' \ - -e 's/.* \([^ ]\+\.s\)\( .*\|\)$/Assembling \1/p' \ - -e 's/.*ar [^ ]\+ \([^ ]\+\)\(\( [^ ]\+\.o\)\+\)/Updating \1 -\2/p' \ - -e 's/.* -o \([^ ]\+\)\( .*\|\)$/Linking \1/p' + sed -ne '/\\$/N' -e 's/\\\n//' -e 's/\t\+/ /g' -e 's/ \+/ /g' \ + -e '/ error: /p' \ + -e "s%.*Entering directory[ ]\\+.${DEPPKG_DIR}/\\([^ ]\+\).%Entering \\1%p" \ + -e "s%.*Leaving directory[ ]\\+.${DEPPKG_DIR}/\\([^ ]\+.\).%Leaving \\1%p" \ + -e '/gcc \|g\+\+ \|ar /!d' \ + -e 's/ \(\.\.\/\)\+/ /g' \ + -e 's/.* \([^ ]\+\(\.c\|\.cpp\|\.cc\|\.cxx\)\)\( .*\|\)$/Compiling \1/p' \ + -e 's/.* \([^ ]\+\.s\)\( .*\|\)$/Assembling \1/p' \ + -e 's/.*ar [^ ]\+ \([^ ]\+\)\(\( [^ ]\+\.o\)\+\)/Updating \1 -\2/p' \ + -e 's/.* -o \([^ ]\+\)\( .*\|\)$/Linking \1/p' } do_patch() { - PATCH_FILE=${SCRIPT_DIR}/patches/$1; shift - - if patch -f -p0 "$@" >>patch.log < ${PATCH_FILE} - then - : - else - echo Patch failed - Check `pwd`/patch.log > /dev/tty - exit 1 - fi + PATCH_FILE=${SCRIPT_DIR}/patches/$1; shift + + if patch -f -p0 "$@" >>patch.log < ${PATCH_FILE} + then + : + else + echo Patch failed - Check `pwd`/patch.log > /dev/tty + exit 1 + fi } do_make() { - if make -f "$@" 2>&1 - then - : - else - echo Make failed - Check `pwd`/make.log > /dev/tty - exit 1 - fi | tee -a make.log | parse_output + if make -f "$@" 2>&1 + then + : + else + echo Make failed - Check `pwd`/make.log > /dev/tty + exit 1 + fi | tee -a make.log | parse_output } process_zlib() { - if get_source "${URL_ZLIB}" "${DIR_ZLIB}" "${MKD_ZLIB}" - then - echo Patching zlib - >patch.log - do_patch zlib.patch - fi - echo Building zlib - > make.log - do_make win32/Makefile.mingw32 PREFIX=${DEPPKG_DIR} all - echo Installing zlib - do_make win32/Makefile.mingw32 PREFIX=${DEPPKG_DIR} install + if get_source "${URL_ZLIB}" "${DIR_ZLIB}" "${MKD_ZLIB}" + then + echo Patching zlib + >patch.log + do_patch zlib.patch + fi + echo Building zlib + > make.log + do_make win32/Makefile.mingw32 PREFIX=${DEPPKG_DIR} all + echo Installing zlib + do_make win32/Makefile.mingw32 PREFIX=${DEPPKG_DIR} install } process_pcre() { - if get_source "${URL_PCRE}" "${DIR_PCRE}" "${MKD_PCRE}" - then - echo Patching PCRE - >patch.log - do_patch pcre.patch - echo Configuring PCRE - ./configure CC_FOR_BUILD=gcc \ - CXX_FOR_BUILD=g++ \ - --host=mingw32 \ - --prefix=${DEPPKG_DIR} \ - --enable-utf8 \ - --enable-unicode-properties >make.log 2>&1 - fi - echo Building PCRE - do_make Makefile PREFIX=${DEPPKG_DIR} all - echo Installing PCRE - do_make Makefile PREFIX=${DEPPKG_DIR} install + if get_source "${URL_PCRE}" "${DIR_PCRE}" "${MKD_PCRE}" + then + echo Patching PCRE + >patch.log + do_patch pcre.patch + echo Configuring PCRE + ./configure CC_FOR_BUILD=gcc \ + CXX_FOR_BUILD=g++ \ + --host=mingw32 \ + --prefix=${DEPPKG_DIR} \ + --enable-utf8 \ + --enable-unicode-properties >make.log 2>&1 + fi + echo Building PCRE + do_make Makefile PREFIX=${DEPPKG_DIR} all + echo Installing PCRE + do_make Makefile PREFIX=${DEPPKG_DIR} install } process_pthreads() { - if get_source "${URL_PTHREADS}" "${DIR_PTHREADS}" "${MKD_PTHREADS}" - then - echo Patching pthreads - >patch.log - do_patch pthreads.patch - fi - echo Building pthreads - > make.log - do_make GNUmakefile GCE - echo Installing pthreads - rm -rf ${DEPPKG_DIR}/include/pthreads - mkdir ${DEPPKG_DIR}/include/pthreads - cp -p *.h ${DEPPKG_DIR}/include/pthreads - cp -p *.dll ${DEPPKG_DIR}/bin - cp -p *.a ${DEPPKG_DIR}/lib + if get_source "${URL_PTHREADS}" "${DIR_PTHREADS}" "${MKD_PTHREADS}" + then + echo Patching pthreads + >patch.log + do_patch pthreads.patch + fi + echo Building pthreads + > make.log + do_make GNUmakefile GCE + echo Installing pthreads + rm -rf ${DEPPKG_DIR}/include/pthreads + mkdir ${DEPPKG_DIR}/include/pthreads + cp -p *.h ${DEPPKG_DIR}/include/pthreads + cp -p *.dll ${DEPPKG_DIR}/bin + cp -p *.a ${DEPPKG_DIR}/lib } process_openssl() { - if get_source "${URL_OPENSSL}" "${DIR_OPENSSL}" "${MKD_OPENSSL}" - then - echo Patching openssl - >patch.log - do_patch openssl.patch - echo Configuring openssl - ./Configure --prefix=${DEPPKG_DIR} \ - shared zlib-dynamic \ - threads \ - --with-zlib-include=${DEPPKG_DIR}/include \ - mingw32 > make.log 2>&1 - fi - echo Building openssl - perl util/mkdef.pl 32 libeay no-static-engine >ms/libeay32.def - perl util/mkdef.pl 32 ssleay >ms/ssleay32.def - do_make Makefile all - echo Installing openssl - do_make Makefile install_sw + if get_source "${URL_OPENSSL}" "${DIR_OPENSSL}" "${MKD_OPENSSL}" + then + echo Patching openssl + >patch.log + do_patch openssl.patch + echo Configuring openssl + ./Configure --prefix=${DEPPKG_DIR} \ + shared zlib-dynamic \ + threads \ + --with-zlib-include=${DEPPKG_DIR}/include \ + mingw32 > make.log 2>&1 + fi + echo Building openssl + perl util/mkdef.pl 32 libeay no-static-engine >ms/libeay32.def + perl util/mkdef.pl 32 ssleay >ms/ssleay32.def + do_make Makefile all + echo Installing openssl + do_make Makefile install_sw } process_mysql() { - get_source "${URL_MYSQL}" "${DIR_MYSQL}" "${DIR_MYSQL}" "${MKD_MYSQL}" - echo Converting mysql lib file - if [ -e ${BIN_DIR}/reimp ] - then - reimp --dlltool ${BIN_DIR}/mingw32-dlltool --as ${BIN_DIR}/mingw32-as lib/opt/libmysql.lib - else - ${BIN_DIR}/../mingw32/bin/reimp --dlltool ${BIN_DIR}/mingw32-dlltool --as ${BIN_DIR}/mingw32-as lib/opt/libmysql.lib - fi - echo Installing mysql - cp -p liblibmysql.a ../../lib/libmysql.a - rm -rf ../../include/mysql - mkdir ../../include/mysql - cp -p include/* ../../include/mysql 2>&1 | grep -v 'omitting directory' - cp -p lib/opt/libmysql.dll ../../bin + get_source "${URL_MYSQL}" "${DIR_MYSQL}" "${DIR_MYSQL}" "${MKD_MYSQL}" + echo Converting mysql lib file + if [ -e ${BIN_DIR}/reimp ] + then + reimp --dlltool ${BIN_DIR}/mingw32-dlltool --as ${BIN_DIR}/mingw32-as lib/opt/libmysql.lib + else + ${BIN_DIR}/../mingw32/bin/reimp --dlltool ${BIN_DIR}/mingw32-dlltool --as ${BIN_DIR}/mingw32-as lib/opt/libmysql.lib + fi + echo Installing mysql + cp -p liblibmysql.a ../../lib/libmysql.a + rm -rf ../../include/mysql + mkdir ../../include/mysql + cp -p include/* ../../include/mysql 2>&1 | grep -v 'omitting directory' + cp -p lib/opt/libmysql.dll ../../bin } process_postgresql() { - if get_source "${URL_POSTGRESQL}" "${DIR_POSTGRESQL}" "${MKD_POSTGRESQL}" - then - echo Patching postgreSQL - >patch.log - do_patch postgresql.patch - - # We need a native version of zic to build the timezone tables. - echo Configuring postgreSQL to build native zic - ./configure > make.log 2>&1 - - echo Building native zic - cd src/timezone - do_make Makefile >> make.log 2>&1 - cp zic ../.. - cd ../.. - do_make GNUmakefile distclean >> make.log 2>&1 - - echo Configuring postgreSQL for MinGW32 - - ./configure --host=mingw32 \ - --enable-shared \ - --enable-thread-safety \ - --prefix=${DEPPKG_DIR} \ - --with-includes=${DEPPKG_DIR}/include:${DEPPKG_DIR}/include/pthreads \ - --with-libraries=${DEPPKG_DIR}/lib >> make.log 2>&1 - fi - echo Building postgreSQL - ZIC=`pwd`/zic - do_make GNUmakefile AR=mingw32-ar DLLTOOL=mingw32-dlltool DLLWRAP=mingw32-dllwrap WINDRES=mingw32-windres PTHREAD_LIBS=-lpthreadGCE ZIC=${ZIC} - echo Installing postgreSQL - do_make GNUmakefile AR=mingw32-ar DLLTOOL=mingw32-dlltool DLLWRAP=mingw32-dllwrap WINDRES=mingw32-windres PTHREAD_LIBS=-lpthreadGCE ZIC=${ZIC} install + if get_source "${URL_POSTGRESQL}" "${DIR_POSTGRESQL}" "${MKD_POSTGRESQL}" + then + echo Patching postgreSQL + >patch.log + do_patch postgresql.patch + + # We need a native version of zic to build the timezone tables. + echo Configuring postgreSQL to build native zic + ./configure > make.log 2>&1 + + echo Building native zic + cd src/timezone + do_make Makefile >> make.log 2>&1 + cp zic ../.. + cd ../.. + do_make GNUmakefile distclean >> make.log 2>&1 + + echo Configuring postgreSQL for MinGW32 + + ./configure --host=mingw32 \ + --enable-shared \ + --enable-thread-safety \ + --prefix=${DEPPKG_DIR} \ + --with-includes=${DEPPKG_DIR}/include:${DEPPKG_DIR}/include/pthreads \ + --with-libraries=${DEPPKG_DIR}/lib >> make.log 2>&1 + fi + echo Building postgreSQL + ZIC=`pwd`/zic + do_make GNUmakefile AR=mingw32-ar DLLTOOL=mingw32-dlltool DLLWRAP=mingw32-dllwrap WINDRES=mingw32-windres PTHREAD_LIBS=-lpthreadGCE ZIC=${ZIC} + echo Installing postgreSQL + do_make GNUmakefile AR=mingw32-ar DLLTOOL=mingw32-dlltool DLLWRAP=mingw32-dllwrap WINDRES=mingw32-windres PTHREAD_LIBS=-lpthreadGCE ZIC=${ZIC} install } process_sqlite() { - if get_source "${URL_SQLITE}" "${DIR_SQLITE}" "${MKD_SQLITE}" - then - echo Patching SQLite - >patch.log - do_patch sqlite.patch - fi - echo Building SQLite - [ ! -e bld ] && mkdir bld - cd bld - > make.log - do_make ../Makefile.mingw32 CROSSTOOLS=${BIN_DIR} TLIBS="-L${DEPPKG_DIR}/lib" TCL_FLAGS="-I${DEPPKG_DIR}/include" - echo Installing SQLite - cp -p sqlite3.exe ${DEPPKG_DIR}/bin - cp -p libsqlite3.a ${DEPPKG_DIR}/lib - cp -p sqlite3.h ${DEPPKG_DIR}/include + if get_source "${URL_SQLITE}" "${DIR_SQLITE}" "${MKD_SQLITE}" + then + echo Patching SQLite + >patch.log + do_patch sqlite.patch + fi + echo Building SQLite + [ ! -e bld ] && mkdir bld + cd bld + > make.log + do_make ../Makefile.mingw32 CROSSTOOLS=${BIN_DIR} TLIBS="-L${DEPPKG_DIR}/lib" TCL_FLAGS="-I${DEPPKG_DIR}/include" + echo Installing SQLite + cp -p sqlite3.exe ${DEPPKG_DIR}/bin + cp -p libsqlite3.a ${DEPPKG_DIR}/lib + cp -p sqlite3.h ${DEPPKG_DIR}/include } process_wx() { - if get_source "${URL_WX}" "${DIR_WX}" "${MKD_WX}" - then - echo Patching wxWidgets - >patch.log - do_patch wx1.patch -o build/msw/config.mingw32 - do_patch wx2.patch - find . -name makefile.gcc -exec sh -c "sed -f ${SCRIPT_DIR}/patches/wx.sed {} > \`echo {} | sed -e 's/\.gcc$/\.mingw32/'\`" \; - fi - echo Building wxWidgets - cd build/msw - > make.log - do_make makefile.mingw32 SHARED=1 VENDOR=bacula DEBUG_INFO=1 - echo Installing wxWidgets - cd ../.. - rm -rf ../../include/wx - mkdir ../../include/wx - cp -p include/wx/* ../../include/wx 2>&1 | grep -v 'omitting directory' - mkdir ../../include/wx/generic - cp -p include/wx/generic/* ../../include/wx/generic 2>&1 | grep -v 'omitting directory' - mkdir ../../include/wx/msw - cp -p include/wx/msw/* ../../include/wx/msw 2>&1 | grep -v 'omitting directory' - mkdir ../../include/wx/msw/ole - cp -p include/wx/msw/ole/* ../../include/wx/msw/ole 2>&1 | grep -v 'omitting directory' - cp -p lib/gcc_dll/*.dll ../../bin - rm -rf ../../lib/wx_dll - mkdir ../../lib/wx_dll - cp -p lib/gcc_dll/*.a ../../lib/wx_dll - mkdir ../../lib/wx_dll/msw - cp -p lib/gcc_dll/msw/* ../../lib/wx_dll/msw 2>&1 | grep -v 'omitting directory' - mkdir ../../lib/wx_dll/msw/wx - cp -p lib/gcc_dll/msw/wx/* ../../lib/wx_dll/msw/wx 2>&1 | grep -v 'omitting directory' - mkdir ../../lib/wx_dll/msw/wx/msw - cp -p lib/gcc_dll/msw/wx/msw/* ../../lib/wx_dll/msw/wx/msw 2>&1 | grep -v 'omitting directory' + if get_source "${URL_WX}" "${DIR_WX}" "${MKD_WX}" + then + echo Patching wxWidgets + >patch.log + cp build/msw/config.gcc build/msw/config.mingw32 + do_patch wxWidgets.patch + find . -name makefile.gcc -exec sh -c "sed -f ${SCRIPT_DIR}/patches/wx.sed {} > \`echo {} | sed -e 's/\.gcc$/\.mingw32/'\`" \; + fi + echo Building wxWidgets + cd build/msw + > make.log + do_make makefile.mingw32 SHARED=1 VENDOR=bacula DEBUG_INFO=1 + echo Installing wxWidgets + cd ../.. + rm -rf ../../include/wx + mkdir ../../include/wx + cp -p include/wx/* ../../include/wx 2>&1 | grep -v 'omitting directory' + mkdir ../../include/wx/generic + cp -p include/wx/generic/* ../../include/wx/generic 2>&1 | grep -v 'omitting directory' + mkdir ../../include/wx/msw + cp -p include/wx/msw/* ../../include/wx/msw 2>&1 | grep -v 'omitting directory' + mkdir ../../include/wx/msw/ole + cp -p include/wx/msw/ole/* ../../include/wx/msw/ole 2>&1 | grep -v 'omitting directory' + cp -p lib/gcc_dll/*.dll ../../bin + rm -rf ../../lib/wx_dll + mkdir ../../lib/wx_dll + cp -p lib/gcc_dll/*.a ../../lib/wx_dll + mkdir ../../lib/wx_dll/msw + cp -p lib/gcc_dll/msw/* ../../lib/wx_dll/msw 2>&1 | grep -v 'omitting directory' + mkdir ../../lib/wx_dll/msw/wx + cp -p lib/gcc_dll/msw/wx/* ../../lib/wx_dll/msw/wx 2>&1 | grep -v 'omitting directory' + mkdir ../../lib/wx_dll/msw/wx/msw + cp -p lib/gcc_dll/msw/wx/msw/* ../../lib/wx_dll/msw/wx/msw 2>&1 | grep -v 'omitting directory' } process_scons() { - get_source "${URL_SCONS}" "${DIR_SCONS}" "${MKD_SCONS}" - echo "Installing scons" - if python setup.py install --prefix=${DEPPKG_DIR}/scons > make.log 2>&1 - then - : - else - echo "Make failed - Check `pwd`/make.log" - exit 1 - fi + get_source "${URL_SCONS}" "${DIR_SCONS}" "${MKD_SCONS}" + echo "Installing scons" + if python setup.py install --prefix=${DEPPKG_DIR}/scons > make.log 2>&1 + then + : + else + echo "Make failed - Check `pwd`/make.log" + exit 1 + fi } process_nsis() { - get_source "${URL_NSIS_BIN}" "${DIR_NSIS_BIN}" "${MKD_NSIS_BIN}" - cd .. - rm -rf ../nsis - mv nsis-2.17 ../nsis - if get_source "${URL_NSIS_SRC}" "${DIR_NSIS_SRC}" "${MKD_NSIS_SRC}" - then - echo "Patching nsis" - >patch.log - do_patch nsis.patch - fi - echo "Building nsis" - if ../../scons/bin/scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all \ - PREFIX=${DEPPKG_DIR}/nsis PREFIX_BIN=${DEPPKG_DIR}/nsis/Bin \ - PREFIX_CONF=${DEPPKG_DIR}/nsis PREFIX_DATA=${DEPPKG_DIR}/nsis \ - PREFIX_DOC=${DEPPKG_DIR}/nsis/Docs 2>&1 | tee make.log | parse_output - then - : - else - echo "Scons failed - Check `pwd`/make.log" - exit 1 - fi - echo "Installing nsis" - cp -p build/release/makensis/makensis ../../nsis + get_source "${URL_NSIS_BIN}" "${DIR_NSIS_BIN}" "${MKD_NSIS_BIN}" + cd .. + rm -rf ../nsis + mv nsis-2.17 ../nsis + if get_source "${URL_NSIS_SRC}" "${DIR_NSIS_SRC}" "${MKD_NSIS_SRC}" + then + echo "Patching nsis" + >patch.log + do_patch nsis.patch + fi + echo "Building nsis" + if ../../scons/bin/scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all \ + PREFIX=${DEPPKG_DIR}/nsis PREFIX_BIN=${DEPPKG_DIR}/nsis/Bin \ + PREFIX_CONF=${DEPPKG_DIR}/nsis PREFIX_DATA=${DEPPKG_DIR}/nsis \ + PREFIX_DOC=${DEPPKG_DIR}/nsis/Docs 2>&1 | tee make.log | parse_output + then + : + else + echo "Scons failed - Check `pwd`/make.log" + exit 1 + fi + echo "Installing nsis" + cp -p build/release/makensis/makensis ../../nsis } process_mtx() diff --git a/bacula/src/win32/dird/Makefile b/bacula/src/win32/dird/Makefile index 20d7329eed..37acbb17ba 100644 --- a/bacula/src/win32/dird/Makefile +++ b/bacula/src/win32/dird/Makefile @@ -33,7 +33,7 @@ DIRD_OBJS = \ $(OBJDIR)/backup.o \ $(OBJDIR)/bsr.o \ $(OBJDIR)/catreq.o \ - $(OBJDIR)/dir-plugins.o \ + $(OBJDIR)/dir_plugins.o \ $(OBJDIR)/dird.o \ $(OBJDIR)/dird_conf.o \ $(OBJDIR)/expand.o \ diff --git a/bacula/src/win32/dll/bacula.def b/bacula/src/win32/dll/bacula.def index 476d182713..a33a862466 100644 --- a/bacula/src/win32/dll/bacula.def +++ b/bacula/src/win32/dll/bacula.def @@ -690,8 +690,8 @@ _Z17tls_bsock_connectP5BSOCK _Z18new_tls_connectionP11TLS_Contexti _Z18tls_bsock_shutdownP5BSOCK _Z19free_tls_connectionP14TLS_Connection -_Z25tls_postconnect_verify_cnP14TLS_ConnectionP5alist -_Z27tls_postconnect_verify_hostP14TLS_ConnectionPKc +_Z25tls_postconnect_verify_cnP3JCRP14TLS_ConnectionP5alist +_Z27tls_postconnect_verify_hostP3JCRP14TLS_ConnectionPKc ; tree.o _Z11tree_relcwdPcP11s_tree_rootP11s_tree_node diff --git a/bacula/src/win32/filed/Makefile b/bacula/src/win32/filed/Makefile index abac1295ae..38f2ecb340 100644 --- a/bacula/src/win32/filed/Makefile +++ b/bacula/src/win32/filed/Makefile @@ -32,7 +32,7 @@ FILED_OBJS = \ $(OBJDIR)/authenticate.o \ $(OBJDIR)/backup.o \ $(OBJDIR)/estimate.o \ - $(OBJDIR)/fd-plugins.o \ + $(OBJDIR)/fd_plugins.o \ $(OBJDIR)/filed.o \ $(OBJDIR)/filed_conf.o \ $(OBJDIR)/heartbeat.o \ diff --git a/bacula/src/win32/patches/wxWidgets.patch b/bacula/src/win32/patches/wxWidgets.patch new file mode 100644 index 0000000000..64afc4dc0d --- /dev/null +++ b/bacula/src/win32/patches/wxWidgets.patch @@ -0,0 +1,67 @@ +diff -ur wxWidgets-2.8.7-rel/build/msw/config.gcc wxWidgets-2.8.7/build/msw/config.gcc +--- build/msw/config.mingw32 2007-11-21 13:42:45.000000000 +0100 ++++ build/msw/config.mingw32 2008-03-11 15:45:30.000000000 +0100 +@@ -11,10 +11,10 @@ + # ------------------------------------------------------------------------- + + # C compiler +-CC := gcc ++CC := mingw32-gcc + + # C++ compiler +-CXX := g++ ++CXX := mingw32-g++ + + # Standard flags for CC + CFLAGS := +@@ -23,10 +23,10 @@ + CXXFLAGS := + + # Standard preprocessor flags (common for CC and CXX) +-CPPFLAGS := ++CPPFLAGS := -I../../../zlib + + # Standard linker flags +-LDFLAGS := ++LDFLAGS := -L../../../zlib + + # The C preprocessor + CPP := $(CC) -E +@@ -44,7 +44,7 @@ + MSLU := 0 + + # Type of compiled binaries [debug,release] +-BUILD := debug ++BUILD := release + + # Should debugging info be included in the executables? The default value + # "default" means that debug info will be included if BUILD=debug +@@ -131,4 +131,3 @@ + # "3" ...... this is for Mingw 2.0 or newer (comes with gcc3) + # "2.95" ... for Mingw 1.1 or any of the older versions [3,2.95] + GCC_VERSION := 3 +- +diff -ur wxWidgets-2.8.7-rel/include/wx/string.h wxWidgets-2.8.7/include/wx/string.h +--- include/wx/string.h 2007-11-21 13:41:54.000000000 +0100 ++++ include/wx/string.h 2008-03-11 15:50:58.000000000 +0100 +@@ -235,7 +235,7 @@ + #endif + // VC++ free must take place in same DLL as allocation when using non dll + // run-time library (e.g. Multithreaded instead of Multithreaded DLL) +-#if defined(__VISUALC__) && defined(_MT) && !defined(_DLL) ++#if 1 || defined(__VISUALC__) && defined(_MT) && !defined(_DLL) + void Unlock() { if ( !IsEmpty() && --nRefs == 0) Free(); } + // we must not inline deallocation since allocation is not inlined + void Free(); +diff -ur wxWidgets-2.8.7-rel/src/common/string.cpp wxWidgets-2.8.7/src/common/string.cpp +--- src/common/string.cpp 2007-11-21 13:41:57.000000000 +0100 ++++ src/common/string.cpp 2008-03-11 15:53:17.000000000 +0100 +@@ -140,7 +140,7 @@ + // wxStringData class deallocation + // =========================================================================== + +-#if defined(__VISUALC__) && defined(_MT) && !defined(_DLL) ++#if 1 || defined(__VISUALC__) && defined(_MT) && !defined(_DLL) + # pragma message (__FILE__ ": building with Multithreaded non DLL runtime has a performance impact on wxString!") + void wxStringData::Free() + { diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index 609c8b3b36..fbe03d9e6b 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -2,6 +2,8 @@ General: 11Mar08 +kes Fix Win32 build. +kes Update Win32 version of wxWidgets to most recent version. kes Tweak Copy job details. kes Rework dir_find_next_appendable_volume to make a bit more effort to find a suitable volume before giving up.