A :: environment setup ----------------- # download and install MSYS2 /!\ **ALWAYS** launch MSYS2 32bits (you must see MINGW32 into the prompt) # update pacman and other packages pacman -Syu # exit console # update other packages pacman -Syu # install gcc and dev toolchain # /!\ don't install iconv for OpenSP # DONOT: pacman -S mingw-w64-i686-binutils mingw-w64-i686-gcc mingw-w64-i686-gcc-libs mingw-w64-i686-gcc-objc mingw-w64-i686-make mingw-w64-i686-pkg-config pacman -S mingw-w64-i686-toolchain B :: compile libopensp 1.5.2 ----------------------- # get source code :: https://sourceforge.net/projects/openjade/files/opensp/1.5.2/OpenSP-1.5.2.tar.gz/download # unzip into /home/ cd ./OpenSp-1.5.2 #1) apply those gnucash patch (by patch or by hand with text editor) wget https://github.com/Gnucash/gnucash-on-windows/blob/master/opensp-1.5.2.patch wget https://raw.githubusercontent.com/Gnucash/gnucash-on-windows/master/patches/OpenSP-1.5.2-non-posix-functions.patch #2) configure # options taken from gnucash https://github.com/Gnucash/gnucash-on-windows/blob/master/gnucash.modules#L208 ./configure --disable-static --enable-shared --disable-doc-build --disable-nls --prefix=/mingw32 #3) AFTER, WE MUST modify with text editor : Makefile line 105/106 (/lib/MakeFile.in) - Fixed4CodingSystem.lo memcmp.lo memmove.lo strerror.lo + Fixed4CodingSystem.lo memcmp.lo memmove.lo strerror.lo \ + WinInetStorage.lo WinApp.lo Win32CodingSystem.lo #4) build it ! make # we have a lot of warning here # and the build fail on ospcat.exe # BUT we don't care as we do have what we need into /libs/.libs #5) install make install # IF it fails, copy by hand into: #- C:\msys64\mingw32\bin\lib\libosp-5.dll #- C:\msys64\mingw32\include\OpenSP (145 files) #- C:\msys64\mingw32\lib # libosp.dll.a # libosp.la # libosp.lai #- C:\msys64\mingw32\share\OpenSP (28 files) #6) we are ready to compile libofx ! # ============================================================================= C :: Compile libofx --------------------- # get source code from https://sourceforge.net/projects/libofx/files/libofx/ (taken 0.9.14) #1) configure ./configure --prefix=/mingw32 --with-opensp-includes=/mingw32/include/OpenSP --with-opensp-libs=/mingw32/lib # DONOT other option: # --with-iconv=/mingw32 # not usefull as OpenSP is compiled with SP_MULTI_BYTE 1 # --with-no-opensp-multibyte #2) build ! make #3) make package make dist #this failed with infinite loop on 'y' on the console #so I maked a package by hand # ** THE END ** # ============================================================================= # **FOR REFERENCE ONLY** OBSOLETE FIX APPLIED IN THE PAST NO MORE REQUIRED # ============================================================================= # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # -- opensp obsolete :: other problems maybe fix -- # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = A) replace config.guess from mv ./config.guess ./config.guess.bad wget http://cvs.savannah.gnu.org/viewvc/*checkout*/config/config/config.guess B) gettext pb http://stackoverflow.com/questions/23637991/building-lzma-linker-errors # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # -- libofx obsolete :: other problems maybe fix -- # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = A) force some 'const char' as 'char' in \lib\ofx_preproc.cpp - line ~315 replace the 2 const char** with char** 3) comment line in win32.hh and win32.cpp the include stdlib see there http://code.activestate.com/lists/perl5-porters/220145/