Patch, patch submission questions and general configure/make questions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch, patch submission questions and general configure/make questions

Tim M-6
Hello,

I just wanted to check on the method you prefer for submitting
patches.  I wrote a patch or two some time ago for gnucash and am
hoping to get back into doing some coding on the application if/when I
have free time, but wanted to see if you prefer patches to be
submitted to the mailing list or for a defect to be created in
Bugzilla first and then if I create a patch for the defect to submit
it there, or some other process?  I did not see the patch submission
process specified on the wiki but may have missed it.

That said, I just downloaded the latest SVN revision to start working
with it and make reported the following error:

-----------------------
make[3]: Leaving directory
`/home/tim/Development/gnucash/development/gnucash/lib/stf'
stf-parse.c:562: error: comma at end of enumerator list
make[3]: *** [stf-parse.lo] Error 1
-----------------------

For the record, I am using the following configure options and after
fixing the above error, many more cropped up.  It seems --enable-iso-c
is probably causing many errors to appear during make so I am not sure
if this is recommended practice:

-----------------------
./configure --prefix=/opt/gnucash-devel \
   --enable-debug --enable-doxygen \
   --enable-error-on-warning --enable-compile-warnings \
   --enable-ofx --enable-aqbanking \
   --enable-iso-c --enable-python
-----------------------


The above error is quite a simple fix:

-----------------------SVN DIFF-----------------------
Index: gnucash/lib/stf/stf-parse.c
===================================================================
--- gnucash/lib/stf/stf-parse.c (revision 20735)
+++ gnucash/lib/stf/stf-parse.c (working copy)
@@ -559,7 +559,7 @@
  STF_CELL_EOF,
  STF_CELL_EOL,
  STF_CELL_FIELD_NO_SEP,
- STF_CELL_FIELD_SEP,
+ STF_CELL_FIELD_SEP
 } StfParseCellRes;

 static StfParseCellRes
-----------------------END DIFF-----------------------


I am wondering if it is desired to fix the build errors which are
appearing due to my configure options or if I should simply change
those options?  I have limited C++ experience so currently small
patches such as this are easy for me and probably a good use of my
time getting familiar with the code, but let me know if this is not
desired.  I do have some work I would like to accomplish on
new/improved budgeting features _eventually_ in the future if my
ability increases to the point that I can manage it, but I will only
have time and ability for smaller patches for the time being.

Thanks,
-Tim M
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Patch, patch submission questions and general configure/make questions

Mike Alexander
--On June 5, 2011 10:12:20 PM -0500 Tim M <[hidden email]> wrote:

> For the record, I am using the following configure options and after
> fixing the above error, many more cropped up.  It seems --enable-iso-c
> is probably causing many errors to appear during make so I am not sure
> if this is recommended practice:
>
> -----------------------
> ./configure --prefix=/opt/gnucash-devel \
>    --enable-debug --enable-doxygen \
>    --enable-error-on-warning --enable-compile-warnings \
>    --enable-ofx --enable-aqbanking \
>    --enable-iso-c --enable-python
> -----------------------

Don't use --enable-iso-c.  This restricts you to the C89 standard (or
something else equally ancient) and there's little hope that GnuCash
will compile with that standard, and little reason that it should.
This option is one that we inherit from the autoconf tools, not one
that is specific to GnuCash.

        Mike
 
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Patch, patch submission questions and general configure/make questions

Christian Stimming-4
In reply to this post by Tim M-6
Am Montag, 6. Juni 2011 schrieb Tim M:
> I just wanted to check on the method you prefer for submitting
> patches.  I wrote a patch or two some time ago for gnucash and am
> hoping to get back into doing some coding on the application if/when I
> have free time, but wanted to see if you prefer patches to be
> submitted to the mailing list or for a defect to be created in
> Bugzilla first and then if I create a patch for the defect to submit
> it there, or some other process?

We prefer patches in bugzilla,
http://wiki.gnucash.org/wiki/Development#Code 
Also, if you're using git locally, please submit patches through "git format-
patch".

> -----------------------
> make[3]: Leaving directory
> `/home/tim/Development/gnucash/development/gnucash/lib/stf'
> stf-parse.c:562: error: comma at end of enumerator list
> make[3]: *** [stf-parse.lo] Error 1
> -----------------------
>
> For the record, I am using the following configure options and after
> fixing the above error, many more cropped up.  It seems --enable-iso-c
> is probably causing many errors to appear

As Mike already mentioned: Please don't use --enable-iso-c.

> The above error is quite a simple fix:
>
> --- gnucash/lib/stf/stf-parse.c (revision 20735)
> +++ gnucash/lib/stf/stf-parse.c (working copy)

The code under lib/... is copied from somewhere else and is not developed
within gnucash. This means we don't want to touch it, except if there are
obvious bugs that might need to be fixed.

> I am wondering if it is desired to fix the build errors which are
> appearing due to my configure options or if I should simply change
> those options?  I have limited C++ experience so currently small
> patches such as this are easy for me and probably a good use of my
> time getting familiar with the code, but let me know if this is not
> desired.  I do have some work I would like to accomplish on
> new/improved budgeting features _eventually_ in the future if my
> ability increases to the point that I can manage it, but I will only
> have time and ability for smaller patches for the time being.

Both are fine. Feel free to work on whatever you prefer for yourself right
now. Feel free to submit patches for "simple" things such as comment clean-up
or even code clean-up for ISO C89, as long as it doesn't make the code less
readable. We are looking forward to seeing your patches!

Regards,

Christian
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Patch, patch submission questions and general configure/make questions

Tim M-6
On Mon, Jun 6, 2011 at 4:15 AM, Christian Stimming
<[hidden email]> wrote:
> The code under lib/... is copied from somewhere else and is not developed
> within gnucash. This means we don't want to touch it, except if there are
> obvious bugs that might need to be fixed.
>

Good point, thanks for the clarification.

>> I am wondering if it is desired to fix the build errors which are
>> appearing due to my configure options or if I should simply change
>> those options?  I have limited C++ experience so currently small
>> patches such as this are easy for me and probably a good use of my
>> time getting familiar with the code, but let me know if this is not
>> desired.  I do have some work I would like to accomplish on
>> new/improved budgeting features _eventually_ in the future if my
>> ability increases to the point that I can manage it, but I will only
>> have time and ability for smaller patches for the time being.
>
> Both are fine. Feel free to work on whatever you prefer for yourself right
> now. Feel free to submit patches for "simple" things such as comment clean-up
> or even code clean-up for ISO C89, as long as it doesn't make the code less
> readable. We are looking forward to seeing your patches!
>

I will avoid the --enable-iso-c option.

Cheers,
-Tim M
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel