Quantcast

Compiling GnuCash on Windows 7 to debug MySQL crashes

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Compiling GnuCash on Windows 7 to debug MySQL crashes

pinaar
I blew several days and gave up. I initially downloaded the GnuCash binaries in 2009 and used it with the ".xml" database file. I wanted to use SQL, so I re-downloaded the binaries last month and converted my ".xml" data to MySQL, but it kept crashing and couldn't read it back and said the database was locked.

So, I downloaded MSYS, MinGW and installed them in f:/usr/msys/1.0 and f:/usr/mingw, respectively. I did the links, per the documentation, then ran install.sh from MSYS sitting in the /h/ws/repackaging directory, right out of the latest SVN build. It failed - badly. I don't know if this has been documented and I'm just reiterating the obvious, but, I'll say what I did and hopefully, someone will let me know what I did right and where I went wrong.

The initial binary failed with MySQL. I tried my personal login, root, both with @127.0.0.1 and @localhost.
Initial installation was,
GnuCash v2.4.10   - /cygdrive/f/usr/gnucash
MySQL v5.5.24   - /cygdrive/f/usr/MySQL/MySQL\ Server\
      5.5/
(I'm editing from Cygwin, but not running nor building GnuCash from Cygwin.)
I tried several versions of Perl and finally settled with msys-perl via mingw-get.

However, automake is broken,
pinaar@HVS2 ~
$ $INSTALLER_DIR/install.sh
Build Starting at Sun Jul 15 22:35:22 PDT 2012

############################################################
###  Wget
############################################################
already installed in /usr/local/bin.  skipping.

############################################################
###  MSYS DTK
############################################################
msys dtk already installed in /F/usr/msys/1.0.  skipping.
,,,
############################################################
###  Autotools
############################################################
Extracting autoconf-2.63.tar.bz2 ... done
Extracting automake-1.11.1.tar.bz2 ... done

!!! Exactly one directory is required, but detected 2; please delete all but the latest one: /h/pinaar/ws/tmp/autoconf-2.63 /h/pinaar/ws/tmp/autoconf-2.69 !!!
!!! ABORTING !!!
resetting msys to use original mingw.
mv: cannot stat `/etc/fstab.': No such file or directory

I worked around the broken "mv" command, failing every other time (I just used "cp").
Actually, the above response from the automake installation is different from this morning when I gave up. It was,
pinaar@HVS2 ~
$ automake --help
Can't locate Automake/Struct.pm in @INC (@INC contains: /mingw/share/automake-1.11 .) at f:/usr/mingw/bin/automake-1.11 line 46.
BEGIN failed--compilation aborted at f:/usr/mingw/bin/automake-1.11 line 46.


So, I was wracking my brains - I assumed it was Perl screwing up, but autoconf was pointed out by automake as broken when I tried to build automake from source.


I would love to build the code in Visual Studio 2010, but the Wiki said I had to build a basis with MSYS and MinGW.
(I am far more comfortable with the IDE to debug the MySQL problem.)

Thanks,
Art
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Compiling GnuCash on Windows 7 to debug MySQL crashes

John Ralls-2

On Jul 15, 2012, at 10:45 PM, Art wrote:

> I blew several days and gave up. I initially downloaded the GnuCash binaries in 2009 and used it with the ".xml" database file. I wanted to use SQL, so I re-downloaded the binaries last month and converted my ".xml" data to MySQL, but it kept crashing and couldn't read it back and said the database was locked.
>
> So, I downloaded MSYS, MinGW and installed them in f:/usr/msys/1.0 and f:/usr/mingw, respectively. I did the links, per the documentation, then ran install.sh from MSYS sitting in the /h/ws/repackaging directory, right out of the latest SVN build. It failed - badly. I don't know if this has been documented and I'm just reiterating the obvious, but, I'll say what I did and hopefully, someone will let me know what I did right and where I went wrong.
>
> The initial binary failed with MySQL. I tried my personal login, root, both with @127.0.0.1 and @localhost.
> Initial installation was,
> GnuCash v2.4.10   - /cygdrive/f/usr/gnucash
> MySQL v5.5.24   - /cygdrive/f/usr/MySQL/MySQL\ Server\
>      5.5/
> (I'm editing from Cygwin, but not running nor building GnuCash from Cygwin.)
> I tried several versions of Perl and finally settled with msys-perl via mingw-get.
>

> However, automake is broken,
> pinaar@HVS2 ~
> $ $INSTALLER_DIR/install.sh
> Build Starting at Sun Jul 15 22:35:22 PDT 2012
>
> ############################################################
> ###  Wget
> ############################################################
> already installed in /usr/local/bin.  skipping.
>
> ############################################################
> ###  MSYS DTK
> ############################################################
> msys dtk already installed in /F/usr/msys/1.0.  skipping.
> ,,,
> ############################################################
> ###  Autotools
> ############################################################
> Extracting autoconf-2.63.tar.bz2 ... done
> Extracting automake-1.11.1.tar.bz2 ... done
>
> !!! Exactly one directory is required, but detected 2; please delete all but the latest one: /h/pinaar/ws/tmp/autoconf-2.63 /h/pinaar/ws/tmp/autoconf-2.69 !!!
> !!! ABORTING !!!
> resetting msys to use original mingw.
> mv: cannot stat `/etc/fstab.': No such file or directory
>
> I worked around the broken "mv" command, failing every other time (I just used "cp").
> Actually, the above response from the automake installation is different from this morning when I gave up. It was,
> pinaar@HVS2 ~
> $ automake --help
> Can't locate Automake/Struct.pm in @INC (@INC contains: /mingw/share/automake-1.11 .) at f:/usr/mingw/bin/automake-1.11 line 46.
> BEGIN failed--compilation aborted at f:/usr/mingw/bin/automake-1.11 line 46.
>
>
> So, I was wracking my brains - I assumed it was Perl screwing up, but autoconf was pointed out by automake as broken when I tried to build automake from source.

Mv isn't broken, automake isn't broken, and Perl doesn't "screw up".  

You must follow the instructions in the Wiki *exactly*, right down to the version numbers and paths. The Windows build scripts are extremely brittle and they work only with the version of MSYS specified in the instructions. It would be great to get it to work with newer versions of MinGW and MSYS, but it would be a bit of work.

>
>
> I would love to build the code in Visual Studio 2010, but the Wiki said I had to build a basis with MSYS and MinGW.
> (I am far more comfortable with the IDE to debug the MySQL problem.)

Gnucash, like all of its dependencies, is an autotools project. While it's possible to get libtool to work with the Microsoft command-line compilers, code must generally be adjusted (using #ifdef blocks) to account for differences between M$ compilers and gcc. A little of that was done in Gnucash a long time ago, but it hasn't been maintained. Other than the basic Gtk+ stack (which Dieter Verfalle keeps compilable with M$ tools), I don't know if any of Gnucash's dependencies are buildable with M$ tools. It would be a big project.

Regards,
John Ralls
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Compiling GnuCash on Windows 7 to debug MySQL crashes

pinaar
Thanks, John. I sort of suspected the "details" were what did me in, but I've gotten out of tight situations before, using newer tools. In this  case, I opted to use newer versions for several tools and didn't pay close attention to some of the instructions because I thought I had more leeway.

I'll give it another go, since you said it is doable. Once I build it the right way, I'll see if I can troubleshoot my initial problem of the MySQL hangs, locks, and, crashes.


- Art



________________________________
 From: John Ralls <[hidden email]>
To: Art <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Monday, July 16, 2012 7:33 AM
...
On Jul 15, 2012, at 10:45 PM, Art wrote:

...[deleted for brevity - ajp]
Mv isn't broken, automake isn't broken, and Perl doesn't "screw up". 

You must follow the instructions in the Wiki *exactly*...
John Ralls
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

install.sh fails "HTML Help Workshop" with Cannot export ?pHtmlHelpW@@3P6GPAUHWND__@@PAU1@PBGIK@ZA: symbol not found

pinaar
I followed the Wiki, except were I received fatal errors, but got through them until this one.


Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Cannot export ??_C@_00A@?$AA@: symbol not found
Cannot export ?pHtmlHelpA@@3P6GPAUHWND__@@PAU1@PBDIK@ZA: symbol not found
Cannot export ?pHtmlHelpW@@3P6GPAUHWND__@@PAU1@PBGIK@ZA: symbol not found
collect2: ld returned 1 exit status
!!! When asked for an installation path, specify h:\pinaar\ws\soft\hh !!!
./install-impl.sh: line 1449: /h/pinaar/ws/soft/downloads/htmlhelp.exe: Bad file
 number
I tracked the failure to,

gcc -shared -o ofile.dll ofile.c -I/h/pinaar/ws/soft/hh/include -L/h/pinaar/ws/soft/hh/lib -lhtmlhelp


Microsoft says their latest Workshop is v1.3, but their Technology is v1.4 and there is no v1.4 Workshop as of March, 2012. I manually installed the Workshop in h:\pinaar\ws\soft\hh, since it seemed to expect it there.

How can I install the "HTML Help Workshop" so install.sh is happen and can move on?
Should I skip building this part or will it cause something else to break further down?
I recognize the above errors are valid because I can build the test case statically with gcc under Cygwin, but dynamically, it gives me the same error message.

I inspected the hh library and it does have both of the HtmlHelp symbols referenced in the error message above, but maybe it's just a reference with no corresponding object.


Thanks,
Art
Ref: msdn.microsoft.com/en-us/library/windows/desktop/ms670169%28v=vs.85%29.aspx
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: install.sh fails "HTML Help Workshop" with Cannot export ?pHtmlHelpW@@3P6GPAUHWND__@@PAU1@PBGIK@ZA: symbol not found

John Ralls-2

On Jul 20, 2012, at 5:31 PM, Art wrote:

> I followed the Wiki, except were I received fatal errors, but got through them until this one.
>
>
> Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
> Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
> Cannot export ??_C@_00A@?$AA@: symbol not found
> Cannot export ?pHtmlHelpA@@3P6GPAUHWND__@@PAU1@PBDIK@ZA: symbol not found
> Cannot export ?pHtmlHelpW@@3P6GPAUHWND__@@PAU1@PBGIK@ZA: symbol not found
> collect2: ld returned 1 exit status
> !!! When asked for an installation path, specify h:\pinaar\ws\soft\hh !!!
> ./install-impl.sh: line 1449: /h/pinaar/ws/soft/downloads/htmlhelp.exe: Bad file
>  number
> I tracked the failure to,
>
> gcc -shared -o ofile.dll ofile.c -I/h/pinaar/ws/soft/hh/include -L/h/pinaar/ws/soft/hh/lib -lhtmlhelp
>
>
> Microsoft says their latest Workshop is v1.3, but their Technology is v1.4 and there is no v1.4 Workshop as of March, 2012. I manually installed the Workshop in h:\pinaar\ws\soft\hh, since it seemed to expect it there.
>
> How can I install the "HTML Help Workshop" so install.sh is happen and can move on?
> Should I skip building this part or will it cause something else to break further down?
> I recognize the above errors are valid because I can build the test case statically with gcc under Cygwin, but dynamically, it gives me the same error message.
>
> I inspected the hh library and it does have both of the HtmlHelp symbols referenced in the error message above, but maybe it's just a reference with no corresponding object.
>

That always kicks me in the butt, too.  I just comment out that bit in install.sh. As long as it work on the buildbot for making the distro, it's good. ;-)

Regards,
John Ralls
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: install.sh fails "HTML Help Workshop" with Cannot export ?pHtmlHelpW@@3P6GPAUHWND__@@PAU1@PBGIK@ZA: symbol not found

Derek Atkins
John Ralls <[hidden email]> writes:

> That always kicks me in the butt, too.  I just comment out that bit in
> install.sh. As long as it work on the buildbot for making the distro,
> it's good. ;-)

I've always thought that we should "distribute" the tarballs/zipfiles
that we use.  I'm not sure if I should copy them to code or maybe even
upload them to SF.  But if G-d forbid the build server crashes and needs
to be reinstalled, we're screwed!

> Regards,
> John Ralls

-derek
--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Loading...