Re: [GNC-dev] Fwd: gnucash master: Multiple changes pushed

2020-05-14 Thread Geert Janssens
Good point.

Geert

Op donderdag 14 mei 2020 13:01:45 CEST schreef Christopher Lam:
> Small warning/notice is warranted:
> This will automatically modify datafile to add feature as follows.
> 
>   
> Register sort and filter settings stored in .gcm
> file
> Store the register sort and filter
> settings in .gcm metadata file (requires at least GnuCash 3.3)
>   
> 
> -- Forwarded message -
> From: Robert Fewell 
> Date: Thu, 14 May 2020 at 09:36
> Subject: gnucash master: Multiple changes pushed
> To: 
> 
> 
> Updated  via  https://github.com/Gnucash/gnucash/commit/6fb50d22 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/bf9c4441 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/b6de2981 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/2494ad1a (commit)
>  via  https://github.com/Gnucash/gnucash/commit/74abd821 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/4c8ebfe1 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/2f5225ad (commit)
>  via  https://github.com/Gnucash/gnucash/commit/b622518f (commit)
> from  https://github.com/Gnucash/gnucash/commit/a874483b (commit)
> 
> 
> 
> commit 6fb50d227a2a07acdfcf30194a949239bdb32ad3
> Author: Robert Fewell <14ubo...@gmail.com>
> Date:   Sat May 2 14:45:14 2020 +0100
> 
> Complete the move of saving register filter/sort to .gcm
> 
> This commit changes the saving of register filter and sort information
> from KVP entries to using the .gcm file. On register load these
> settings are transferred to the .gcm file and the KVP entries removed.
> A feature flag is also set when the first register is loaded by this
> version.
> 
> diff --git a/gnucash/gnome/gnc-plugin-page-register.c
> b/gnucash/gnome/gnc-plugin-page-register.c
> index 36ff606ac..5229de385 100644
> --- a/gnucash/gnome/gnc-plugin-page-register.c
> +++ b/gnucash/gnome/gnc-plugin-page-register.c
> @@ -730,6 +730,10 @@ gnc_plugin_page_register_new_common (GNCLedgerDisplay*
> ledger)
>  gchar* label_color;
>  QofQuery* q;
> 
> +// added for version 4.0 onwards
> +if (!gnc_features_check_used (gnc_get_current_book(),
> GNC_FEATURE_REG_SORT_FILTER))
> +gnc_features_set_used (gnc_get_current_book(),
> GNC_FEATURE_REG_SORT_FILTER);
> +
>  /* Is there an existing page? */
>  gsr = gnc_ledger_display_get_user_data (ledger);
>  if (gsr)
> @@ -1656,10 +1660,6 @@ static const gchar* style_names[] =
>  #define KEY_REGISTER_STYLE  "RegisterStyle"
>  #define KEY_DOUBLE_LINE "DoubleLineMode"
> 
> -#define KEY_PAGE_SORT   "register_order"
> -#define KEY_PAGE_SORT_REV   "register_reversed"
> -#define KEY_PAGE_FILTER "register_filter"
> -
>  #define LABEL_ACCOUNT   "Account"
>  #define LABEL_SUBACCOUNT"SubAccount"
>  #define LABEL_GL"GL"
> @@ -2061,6 +2061,18 @@ gnc_plugin_page_register_get_tab_color
> (GncPluginPage* plugin_page)
>  return g_strdup (color ? color : "Not Set");
>  }
> 
> +static void
> +gnc_plugin_page_register_check_for_empty_group (GKeyFile *state_file,
> const gchar *state_section)
> +{
> +gsize num_keys;
> +gchar **keys = g_key_file_get_keys (state_file, state_section,
> &num_keys, NULL);
> +
> +if (num_keys == 0)
> +gnc_state_drop_sections_for (state_section);
> +
> +g_strfreev (keys);
> +}
> +
>  static const gchar*
>  gnc_plugin_page_register_get_filter_gcm (Account* leader)
>  {
> @@ -2094,7 +2106,6 @@ gnc_plugin_page_register_get_filter (GncPluginPage*
> plugin_page)
>  {
>  GncPluginPageRegisterPrivate* priv;
>  GNCLedgerDisplayType ledger_type;
> -GNCLedgerDisplay* ld;
>  Account* leader;
>  const char* filter = NULL;
> 
> @@ -2102,19 +2113,12 @@ gnc_plugin_page_register_get_filter (GncPluginPage*
> plugin_page)
>_ ("unknown"));
> 
>  priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (plugin_page);
> -ld = priv->ledger;
> -ledger_type = gnc_ledger_display_type (ld);
> -leader = gnc_ledger_display_leader (ld);
> 
> -// load from gcm file for LD_GL or when feature is set
> -if (ledger_type == LD_GL ||
> -gnc_features_check_used (gnc_get_current_book(),
> GNC_FEATURE_REG_SORT_FILTER))
> -filter = gnc_plugin_page_register_get_filter_gcm (leader);
> -else // load from kvp
> -{
> -if ((ledger_type == LD_SINGLE) || (ledger_type == LD

[GNC-dev] Fwd: gnucash master: Multiple changes pushed

2020-05-14 Thread Christopher Lam
Small warning/notice is warranted:
This will automatically modify datafile to add feature as follows.

  
Register sort and filter settings stored in .gcm
file
Store the register sort and filter
settings in .gcm metadata file (requires at least GnuCash 3.3)
  

-- Forwarded message -
From: Robert Fewell 
Date: Thu, 14 May 2020 at 09:36
Subject: gnucash master: Multiple changes pushed
To: 


Updated  via  https://github.com/Gnucash/gnucash/commit/6fb50d22 (commit)
 via  https://github.com/Gnucash/gnucash/commit/bf9c4441 (commit)
 via  https://github.com/Gnucash/gnucash/commit/b6de2981 (commit)
 via  https://github.com/Gnucash/gnucash/commit/2494ad1a (commit)
 via  https://github.com/Gnucash/gnucash/commit/74abd821 (commit)
 via  https://github.com/Gnucash/gnucash/commit/4c8ebfe1 (commit)
 via  https://github.com/Gnucash/gnucash/commit/2f5225ad (commit)
 via  https://github.com/Gnucash/gnucash/commit/b622518f (commit)
from  https://github.com/Gnucash/gnucash/commit/a874483b (commit)



commit 6fb50d227a2a07acdfcf30194a949239bdb32ad3
Author: Robert Fewell <14ubo...@gmail.com>
Date:   Sat May 2 14:45:14 2020 +0100

Complete the move of saving register filter/sort to .gcm

This commit changes the saving of register filter and sort information
from KVP entries to using the .gcm file. On register load these
settings are transferred to the .gcm file and the KVP entries removed.
A feature flag is also set when the first register is loaded by this
version.

diff --git a/gnucash/gnome/gnc-plugin-page-register.c
b/gnucash/gnome/gnc-plugin-page-register.c
index 36ff606ac..5229de385 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -730,6 +730,10 @@ gnc_plugin_page_register_new_common (GNCLedgerDisplay*
ledger)
 gchar* label_color;
 QofQuery* q;

+// added for version 4.0 onwards
+if (!gnc_features_check_used (gnc_get_current_book(),
GNC_FEATURE_REG_SORT_FILTER))
+gnc_features_set_used (gnc_get_current_book(),
GNC_FEATURE_REG_SORT_FILTER);
+
 /* Is there an existing page? */
 gsr = gnc_ledger_display_get_user_data (ledger);
 if (gsr)
@@ -1656,10 +1660,6 @@ static const gchar* style_names[] =
 #define KEY_REGISTER_STYLE  "RegisterStyle"
 #define KEY_DOUBLE_LINE "DoubleLineMode"

-#define KEY_PAGE_SORT   "register_order"
-#define KEY_PAGE_SORT_REV   "register_reversed"
-#define KEY_PAGE_FILTER "register_filter"
-
 #define LABEL_ACCOUNT   "Account"
 #define LABEL_SUBACCOUNT"SubAccount"
 #define LABEL_GL"GL"
@@ -2061,6 +2061,18 @@ gnc_plugin_page_register_get_tab_color
(GncPluginPage* plugin_page)
 return g_strdup (color ? color : "Not Set");
 }

+static void
+gnc_plugin_page_register_check_for_empty_group (GKeyFile *state_file,
const gchar *state_section)
+{
+gsize num_keys;
+gchar **keys = g_key_file_get_keys (state_file, state_section,
&num_keys, NULL);
+
+if (num_keys == 0)
+gnc_state_drop_sections_for (state_section);
+
+g_strfreev (keys);
+}
+
 static const gchar*
 gnc_plugin_page_register_get_filter_gcm (Account* leader)
 {
@@ -2094,7 +2106,6 @@ gnc_plugin_page_register_get_filter (GncPluginPage*
plugin_page)
 {
 GncPluginPageRegisterPrivate* priv;
 GNCLedgerDisplayType ledger_type;
-GNCLedgerDisplay* ld;
 Account* leader;
 const char* filter = NULL;

@@ -2102,19 +2113,12 @@ gnc_plugin_page_register_get_filter (GncPluginPage*
plugin_page)
   _ ("unknown"));

 priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (plugin_page);
-ld = priv->ledger;
-ledger_type = gnc_ledger_display_type (ld);
-leader = gnc_ledger_display_leader (ld);

-// load from gcm file for LD_GL or when feature is set
-if (ledger_type == LD_GL ||
-gnc_features_check_used (gnc_get_current_book(),
GNC_FEATURE_REG_SORT_FILTER))
-filter = gnc_plugin_page_register_get_filter_gcm (leader);
-else // load from kvp
-{
-if ((ledger_type == LD_SINGLE) || (ledger_type == LD_SUBACCOUNT))
-filter = xaccAccountGetFilter (leader);
-}
+ledger_type = gnc_ledger_display_type (priv->ledger);
+leader = gnc_ledger_display_leader (priv->ledger);
+
+// load from gcm file
+filter = gnc_plugin_page_register_get_filter_gcm (leader);

 return filter ? g_strdup (filter) : g_strdup_printf ("%s,%s,%s,%s",
  DEFAULT_FILTER,
@@ -2137,6 +2141,8 @@ gnc_plugin_page_register_set_filter_gcm (Account*
leader, const gchar* filter,
 {
 if (g_key_file_has_key (state_file, state_section,
KEY_PAGE_FILTER, NULL))
 g_key_file_remove_key (state_file, state_section

Re: [GNC-dev] gnucash master: Multiple changes pushed

2020-05-13 Thread Geert Janssens
Op woensdag 13 mei 2020 14:50:45 CEST schreef Christopher Lam:
> Hi the branch name was originally 'maint-'. Github doesn't allow changing
> branch names without creating a new PR. So, next time I'll just need to
> amend the merge commit message (and also add a #link to PR).

That would also be sufficient indeed.

Regards,

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash master: Multiple changes pushed

2020-05-13 Thread Christopher Lam
Hi the branch name was originally 'maint-'. Github doesn't allow changing
branch names without creating a new PR. So, next time I'll just need to
amend the merge commit message (and also add a #link to PR).

On Wed, 13 May 2020 at 12:21, Geert Janssens 
wrote:

> Op woensdag 13 mei 2020 14:17:20 CEST schreef Geert Janssens:
> > Op dinsdag 12 mei 2020 16:06:05 CEST schreef Christopher Lam:
> > > Updated  via  https://github.com/Gnucash/gnucash/commit/57fe0515
> (commit)
> > >
> > >  via  https://github.com/Gnucash/gnucash/commit/b4d7386d (commit)
> > >
> > > from  https://github.com/Gnucash/gnucash/commit/ebd9db89 (commit)
> > >
> > > commit 57fe05156535bc67960b2497393cf8eee3525a73
> > > Merge: ebd9db892 b4d7386d4
> > > Author: Christopher Lam 
> > > Date:   Tue May 12 21:47:36 2020 +0800
> > >
> > > Merge branch 'maint-trep-case-insensitive' PR #719
> > >
> > > commit b4d7386d44122384c036ae68c1a090bc36210389
> > > Author: Christopher Lam 
> > > Date:   Mon May 11 20:51:21 2020 +0800
> > >
> > > [trep-engine] "Transaction Filter is case insensitive"
> > >
> > > add Filter option to make Transaction Filter case insensitive.
> > >
> > > Summary of changes:
> > >  .../reports/standard/test/test-transaction.scm | 16 
> > >  gnucash/report/trep-engine.scm | 29
> > >
> > > ++ 2 files changed, 40 insertions(+), 5
> deletions(-)
> > >
> > > ___
> > > gnucash-patches mailing list
> > > gnucash-patc...@gnucash.org
> > > https://lists.gnucash.org/mailman/listinfo/gnucash-patches
> >
> > This commit merges some of your local maint changes into public master.
> > However that commit in question hasn't been pushed to maint yet as far
> as I
> > can see. Is that intentional ?
> >
> > Geert
>
> Ok, on the PR I see John asked to merge it into master only. To avoid
> confusion, please change the feature branch name before doing so. The fact
> it
> mentions "maint-" set me on the wrong track. Or at the very least motivate
> the
> branch change in the merge commit.
>
> Regards,
>
> Geert
>
>
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash master: Multiple changes pushed

2020-05-13 Thread Geert Janssens
Op woensdag 13 mei 2020 14:17:20 CEST schreef Geert Janssens:
> Op dinsdag 12 mei 2020 16:06:05 CEST schreef Christopher Lam:
> > Updated  via  https://github.com/Gnucash/gnucash/commit/57fe0515 
(commit)
> > 
> >  via  https://github.com/Gnucash/gnucash/commit/b4d7386d (commit)
> > 
> > from  https://github.com/Gnucash/gnucash/commit/ebd9db89 (commit)
> > 
> > commit 57fe05156535bc67960b2497393cf8eee3525a73
> > Merge: ebd9db892 b4d7386d4
> > Author: Christopher Lam 
> > Date:   Tue May 12 21:47:36 2020 +0800
> > 
> > Merge branch 'maint-trep-case-insensitive' PR #719
> > 
> > commit b4d7386d44122384c036ae68c1a090bc36210389
> > Author: Christopher Lam 
> > Date:   Mon May 11 20:51:21 2020 +0800
> > 
> > [trep-engine] "Transaction Filter is case insensitive"
> > 
> > add Filter option to make Transaction Filter case insensitive.
> > 
> > Summary of changes:
> >  .../reports/standard/test/test-transaction.scm | 16 
> >  gnucash/report/trep-engine.scm | 29
> > 
> > ++ 2 files changed, 40 insertions(+), 5 deletions(-)
> > 
> > ___
> > gnucash-patches mailing list
> > gnucash-patc...@gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-patches
> 
> This commit merges some of your local maint changes into public master.
> However that commit in question hasn't been pushed to maint yet as far as I
> can see. Is that intentional ?
> 
> Geert

Ok, on the PR I see John asked to merge it into master only. To avoid 
confusion, please change the feature branch name before doing so. The fact it 
mentions "maint-" set me on the wrong track. Or at the very least motivate the 
branch change in the merge commit.

Regards,

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash master: Multiple changes pushed

2020-05-13 Thread Geert Janssens
Op dinsdag 12 mei 2020 16:06:05 CEST schreef Christopher Lam:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/57fe0515 
> (commit)
>via  https://github.com/Gnucash/gnucash/commit/b4d7386d (commit)
>   from  https://github.com/Gnucash/gnucash/commit/ebd9db89 (commit)
> 
> 
> 
> commit 57fe05156535bc67960b2497393cf8eee3525a73
> Merge: ebd9db892 b4d7386d4
> Author: Christopher Lam 
> Date:   Tue May 12 21:47:36 2020 +0800
> 
> Merge branch 'maint-trep-case-insensitive' PR #719
> 
> commit b4d7386d44122384c036ae68c1a090bc36210389
> Author: Christopher Lam 
> Date:   Mon May 11 20:51:21 2020 +0800
> 
> [trep-engine] "Transaction Filter is case insensitive"
> 
> add Filter option to make Transaction Filter case insensitive.
> 
> 
> 
> Summary of changes:
>  .../reports/standard/test/test-transaction.scm | 16 
>  gnucash/report/trep-engine.scm | 29
> ++ 2 files changed, 40 insertions(+), 5 deletions(-)
> 
> ___
> gnucash-patches mailing list
> gnucash-patc...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches

This commit merges some of your local maint changes into public master. 
However that commit in question hasn't been pushed to maint yet as far as I 
can see. Is that intentional ?

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash master: Multiple changes pushed

2020-05-02 Thread Geert Janssens
Op vrijdag 1 mei 2020 13:03:53 CEST schreef Robert Fewell:
> commit 3602753f5093313592dee6acf92b821fc604c976
> Author: Robert Fewell <14ubo...@gmail.com>
> Date:   Fri May 1 11:54:58 2020 +0100
> 
> Remove some Gtk version checks in code
> 
> With the requirement for Gtk+ 3.22, the version checks dealing with
> checking for version 3.20 or 3.22 are no longer required so these have
> been removed in the source files.
> 
> commit 065002190adef7734827a09a6551c5fd5d1095d5
> Author: Robert Fewell <14ubo...@gmail.com>
> Date:   Fri May 1 11:46:49 2020 +0100
> 
> Remove some Gtk version checks for CSS
> 
> With the requirement for Gtk+ 3.22, the version checks dealing with CSS
> can be removed and the application CSS files dealing with version 3.10
> can be removed with the remaining being renamed.
> 
I'm quite happy with this cleanup !
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash master: Multiple changes pushed

2019-10-06 Thread Geert Janssens
Op maandag 7 oktober 2019 04:51:57 CEST schreef John Ralls:
> > On Oct 6, 2019, at 1:02 PM, Geert Janssens 
> > wrote:
> > 
> > This push didn't make it to github due to a network glitch at
> > code.gnucash.org (unable to resolve github.com).
> > 
> > Whoever does the next push to master, please take care these commits are
> > in
> > your local master branch before doing so. Otherwise you might be tempted
> > to
> > force push to fix the inconsistency :)
> > 
> > Regards,
> > 
> > Geert
> > 
> > Op zondag 6 oktober 2019 21:57:00 CEST schreef Geert Janssens:
> >> Updated via  https://github.com/Gnucash/gnucash/commit/75073a7a 
(commit)


> One shouldn't resolve push failures by force pushing. Instead do `git pull
> --rebase upstream master`, adjusting the branch and remote as necessary,
> the latter being whatever you use for g...@code.gnucash.org:gnucash.
> 
I know, but it's good you write it explicitly.

In the past I have had someone drop my changes at least once due to a force 
push. That's why I chose to inform the list this time around.

Regards,

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash master: Multiple changes pushed

2019-10-06 Thread John Ralls



> On Oct 6, 2019, at 1:02 PM, Geert Janssens  wrote:
> 
> This push didn't make it to github due to a network glitch at 
> code.gnucash.org 
> (unable to resolve github.com).
> 
> Whoever does the next push to master, please take care these commits are in 
> your local master branch before doing so. Otherwise you might be tempted to 
> force push to fix the inconsistency :)
> 
> Regards,
> 
> Geert
> 
> Op zondag 6 oktober 2019 21:57:00 CEST schreef Geert Janssens:
>> Updated   via  https://github.com/Gnucash/gnucash/commit/75073a7a 
>> (commit)
>>   via  https://github.com/Gnucash/gnucash/commit/f28cf416 (commit)
>>  from  https://github.com/Gnucash/gnucash/commit/1eb22c09 (commit)
>> 
>> 
>> 
>> commit 75073a7ab22b7feb701ebf51f4fc0873456ec662
>> Author: Geert Janssens 
>> Date:   Sun Oct 6 21:27:10 2019 +0200
>> 
>>Tweak install rule to be able to compile glib's schema's on Windows as
>> well
>> 
>>It's a bit of a hack based on the assumption DESTDIR is never set on
>> Windows. A install time guard is added to assert this.
>> 
>>It needed a few changes to make this working:
>>- Have cmake expand DESTDIR instead of delaying this to bash
>>  If not, bash would see "$DESTDIRC:/gcdev64/..." and we'd loose
>>  the drive letter in bash' expansion of $DESTDIRC.
>>  So work with $ENV{DESTDIR} instead
>>- To prevent cmake from already expanding this in the
>>  build system generation step add the appropriate escapes to
>>  that variable.
>>- Add guard code in the install command that asserts
>>  DESTDIR is not set on Windows. Use similar escapes as
>>  necessary to ensure the evaluation happens at install time
>>  rather than in the generation step.
>> 
>> commit f28cf4161183223119f3524a6e0af5e8d1bf453e
>> Author: Geert Janssens 
>> Date:   Sun Oct 6 20:17:42 2019 +0200
>> 
>>Fix another dependency issue
>> 
>>This one popped up while experimenting on Windows.
>>In general: whenever a guile module (the ones created with
>>'define-module' load files (via 'load-from-path')
>>the loaded files must have been built before the
>>module. Otherwise targets depending on the module
>>may have dependency issues.
>> 
>> 
>> 
>> Summary of changes:
>> CMakeLists.txt  |  2 ++
>> gnucash/gschemas/CMakeLists.txt | 18 ++
>> gnucash/report/CMakeLists.txt   | 20 ++--
>> 3 files changed, 26 insertions(+), 14 deletions(-)

One shouldn't resolve push failures by force pushing. Instead do `git pull 
--rebase upstream master`, adjusting the branch and remote as necessary, the 
latter being whatever you use for g...@code.gnucash.org:gnucash.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash master: Multiple changes pushed

2019-10-06 Thread Geert Janssens
And that turned out to be me (with a commit to maint).
Problem solved.

Geert

Op zondag 6 oktober 2019 22:02:21 CEST schreef Geert Janssens:
> This push didn't make it to github due to a network glitch at
> code.gnucash.org (unable to resolve github.com).
> 
> Whoever does the next push to master, please take care these commits are in
> your local master branch before doing so. Otherwise you might be tempted to
> force push to fix the inconsistency :)
> 
> Regards,
> 
> Geert
> 
> Op zondag 6 oktober 2019 21:57:00 CEST schreef Geert Janssens:
> > Updated  via  https://github.com/Gnucash/gnucash/commit/75073a7a 
(commit)
> > 
> >  via  https://github.com/Gnucash/gnucash/commit/f28cf416 (commit)
> > 
> > from  https://github.com/Gnucash/gnucash/commit/1eb22c09 (commit)
> > 
> > commit 75073a7ab22b7feb701ebf51f4fc0873456ec662
> > Author: Geert Janssens 
> > Date:   Sun Oct 6 21:27:10 2019 +0200
> > 
> > Tweak install rule to be able to compile glib's schema's on Windows as
> > 
> > well
> > 
> > It's a bit of a hack based on the assumption DESTDIR is never set on
> > 
> > Windows. A install time guard is added to assert this.
> > 
> > It needed a few changes to make this working:
> > - Have cmake expand DESTDIR instead of delaying this to bash
> > 
> >   If not, bash would see "$DESTDIRC:/gcdev64/..." and we'd loose
> >   the drive letter in bash' expansion of $DESTDIRC.
> >   So work with $ENV{DESTDIR} instead
> > 
> > - To prevent cmake from already expanding this in the
> > 
> >   build system generation step add the appropriate escapes to
> >   that variable.
> > 
> > - Add guard code in the install command that asserts
> > 
> >   DESTDIR is not set on Windows. Use similar escapes as
> >   necessary to ensure the evaluation happens at install time
> >   rather than in the generation step.
> > 
> > commit f28cf4161183223119f3524a6e0af5e8d1bf453e
> > Author: Geert Janssens 
> > Date:   Sun Oct 6 20:17:42 2019 +0200
> > 
> > Fix another dependency issue
> > 
> > This one popped up while experimenting on Windows.
> > In general: whenever a guile module (the ones created with
> > 'define-module' load files (via 'load-from-path')
> > the loaded files must have been built before the
> > module. Otherwise targets depending on the module
> > may have dependency issues.
> > 
> > Summary of changes:
> >  CMakeLists.txt  |  2 ++
> >  gnucash/gschemas/CMakeLists.txt | 18 ++
> >  gnucash/report/CMakeLists.txt   | 20 ++--
> >  3 files changed, 26 insertions(+), 14 deletions(-)
> > 
> > ___
> > gnucash-patches mailing list
> > gnucash-patc...@gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-patches
> 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel




___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash master: Multiple changes pushed

2019-10-06 Thread Geert Janssens
This push didn't make it to github due to a network glitch at code.gnucash.org 
(unable to resolve github.com).

Whoever does the next push to master, please take care these commits are in 
your local master branch before doing so. Otherwise you might be tempted to 
force push to fix the inconsistency :)

Regards,

Geert

Op zondag 6 oktober 2019 21:57:00 CEST schreef Geert Janssens:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/75073a7a 
> (commit)
>via  https://github.com/Gnucash/gnucash/commit/f28cf416 (commit)
>   from  https://github.com/Gnucash/gnucash/commit/1eb22c09 (commit)
> 
> 
> 
> commit 75073a7ab22b7feb701ebf51f4fc0873456ec662
> Author: Geert Janssens 
> Date:   Sun Oct 6 21:27:10 2019 +0200
> 
> Tweak install rule to be able to compile glib's schema's on Windows as
> well
> 
> It's a bit of a hack based on the assumption DESTDIR is never set on
> Windows. A install time guard is added to assert this.
> 
> It needed a few changes to make this working:
> - Have cmake expand DESTDIR instead of delaying this to bash
>   If not, bash would see "$DESTDIRC:/gcdev64/..." and we'd loose
>   the drive letter in bash' expansion of $DESTDIRC.
>   So work with $ENV{DESTDIR} instead
> - To prevent cmake from already expanding this in the
>   build system generation step add the appropriate escapes to
>   that variable.
> - Add guard code in the install command that asserts
>   DESTDIR is not set on Windows. Use similar escapes as
>   necessary to ensure the evaluation happens at install time
>   rather than in the generation step.
> 
> commit f28cf4161183223119f3524a6e0af5e8d1bf453e
> Author: Geert Janssens 
> Date:   Sun Oct 6 20:17:42 2019 +0200
> 
> Fix another dependency issue
> 
> This one popped up while experimenting on Windows.
> In general: whenever a guile module (the ones created with
> 'define-module' load files (via 'load-from-path')
> the loaded files must have been built before the
> module. Otherwise targets depending on the module
> may have dependency issues.
> 
> 
> 
> Summary of changes:
>  CMakeLists.txt  |  2 ++
>  gnucash/gschemas/CMakeLists.txt | 18 ++
>  gnucash/report/CMakeLists.txt   | 20 ++--
>  3 files changed, 26 insertions(+), 14 deletions(-)
> 
> ___
> gnucash-patches mailing list
> gnucash-patc...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches




___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-08-19 Thread John Ralls

> On Aug 19, 2017, at 6:05 PM, Geert Janssens  
> wrote:
> 
> On zaterdag 19 augustus 2017 17:33:03 CEST John Ralls wrote:
>> commit 6a359f86a07b2adcf6233cafc7531656e02cc6df
>> Author: John Ralls 
>> Date:   Wed Aug 16 23:16:42 2017 +0200
>> 
>>Fix mac looking in wrong directory for libgncmod-backend-dbi.dylib.
>> 
>> diff --git a/libgnucash/backend/dbi/test/test-backend-dbi.cpp
>> b/libgnucash/backend/dbi/test/test-backend-dbi.cpp index 4936ed0..ff51ab0
>> 100644
>> --- a/libgnucash/backend/dbi/test/test-backend-dbi.cpp
>> +++ b/libgnucash/backend/dbi/test/test-backend-dbi.cpp
>> @@ -30,9 +30,9 @@ extern "C"
>> extern void test_suite_gnc_backend_dbi ();
>> 
>> #define GNC_LIB_NAME_1 "gncmod-backend-dbi"
>> -#define GNC_LIB_REL_PATH_1 "dbi"
>> +#define GNC_LIB_REL_PATH_1 "gnucash"
>> #define GNC_LIB_NAME_2 "gncmod-backend-xml"
>> -#define GNC_LIB_REL_PATH_2 "xml"
>> +#define GNC_LIB_REL_PATH_2 "gnucash"
>> 
>> int
>> main (int   argc,
>> diff --git a/libgnucash/engine/gnc-engine.c b/libgnucash/engine/gnc-engine.c
>> index a61dfd8..34d1348 100644
>> --- a/libgnucash/engine/gnc-engine.c
>> +++ b/libgnucash/engine/gnc-engine.c
>> @@ -74,10 +74,10 @@ gnc_engine_init_part2()
>> } libs[] =
>> {
>> #if defined( HAVE_DBI_DBI_H )
>> -{ "dbi", "gncmod-backend-dbi", TRUE },
>> +{ "gnucash", "gncmod-backend-dbi", TRUE },
>> #endif
>> -{ "xml", "gncmod-backend-xml", TRUE },
>> -{ NULL, NULL, FALSE }
>> +{ "gnucash", "gncmod-backend-xml", TRUE },
>> +{ NULL, FALSE }
>> }, *lib;
>> 
>> for (lib = libs; lib->lib ; lib++)
>> 
> 
> John,
> 
> This essentially undoes my commit
> https://github.com/Gnucash/gnucash/commit/0946b0315fcc2509390
> I created that commit because I believed that should fix the problem in 
> another way.
> 
> I mentioned this on Wednesday around the time you had to leave, but I haven't 
> seen feedback from you on it.
> 
> Did my alternative still not work ? If so we have to look further, because 
> the 
> above commit breaks autotools builds on all platforms.

Geert,

Rats, no, it got eaten in a rebase and I didn't recognize it. I've reverted 
that change, everything works fine without it.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-08-19 Thread Geert Janssens
On zaterdag 19 augustus 2017 17:33:03 CEST John Ralls wrote:
> commit 6a359f86a07b2adcf6233cafc7531656e02cc6df
> Author: John Ralls 
> Date:   Wed Aug 16 23:16:42 2017 +0200
> 
> Fix mac looking in wrong directory for libgncmod-backend-dbi.dylib.
> 
> diff --git a/libgnucash/backend/dbi/test/test-backend-dbi.cpp
> b/libgnucash/backend/dbi/test/test-backend-dbi.cpp index 4936ed0..ff51ab0
> 100644
> --- a/libgnucash/backend/dbi/test/test-backend-dbi.cpp
> +++ b/libgnucash/backend/dbi/test/test-backend-dbi.cpp
> @@ -30,9 +30,9 @@ extern "C"
>  extern void test_suite_gnc_backend_dbi ();
> 
>  #define GNC_LIB_NAME_1 "gncmod-backend-dbi"
> -#define GNC_LIB_REL_PATH_1 "dbi"
> +#define GNC_LIB_REL_PATH_1 "gnucash"
>  #define GNC_LIB_NAME_2 "gncmod-backend-xml"
> -#define GNC_LIB_REL_PATH_2 "xml"
> +#define GNC_LIB_REL_PATH_2 "gnucash"
> 
>  int
>  main (int   argc,
> diff --git a/libgnucash/engine/gnc-engine.c b/libgnucash/engine/gnc-engine.c
> index a61dfd8..34d1348 100644
> --- a/libgnucash/engine/gnc-engine.c
> +++ b/libgnucash/engine/gnc-engine.c
> @@ -74,10 +74,10 @@ gnc_engine_init_part2()
>  } libs[] =
>  {
>  #if defined( HAVE_DBI_DBI_H )
> -{ "dbi", "gncmod-backend-dbi", TRUE },
> +{ "gnucash", "gncmod-backend-dbi", TRUE },
>  #endif
> -{ "xml", "gncmod-backend-xml", TRUE },
> -{ NULL, NULL, FALSE }
> +{ "gnucash", "gncmod-backend-xml", TRUE },
> +{ NULL, FALSE }
>  }, *lib;
> 
>  for (lib = libs; lib->lib ; lib++)
> 

John,

This essentially undoes my commit
https://github.com/Gnucash/gnucash/commit/0946b0315fcc2509390
I created that commit because I believed that should fix the problem in 
another way.

I mentioned this on Wednesday around the time you had to leave, but I haven't 
seen feedback from you on it.

Did my alternative still not work ? If so we have to look further, because the 
above commit breaks autotools builds on all platforms.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-21 Thread John Ralls

> On Feb 21, 2017, at 9:16 AM, David T.  wrote:
> 
> 
>> On Feb 21, 2017, at 10:06 PM, John Ralls  wrote:
>> 
>> 
>>> On Feb 21, 2017, at 8:43 AM, Derek Atkins  wrote:
>>> 
>>> It's weird that this isn't caught by the *compiler* -- isn't an unused
>>> parameter a warning/error?
>> 
>> It is by default, but we turn it off in configure.ac lines 1570 (C++) and 
>> 1581 (C) because we have so many unused variables littering our code.
>> 
>> Regards,
>> John Ralls
> 
> John,
> 
> I’m not going to add much to this discussion, except to ask if the removal of 
> unused variables is: a) something worthy of doing, and b) something that 
> could be delegated to a non-programmer in such a way that they would not 
> *ahem* fuck things up worse? Iff both are true, then I would be willing to 
> take a stab in some way. But only if that actually helps with Real 
> Development, and doesn’t hurt the cause.

David,

Yes, cleanup would be worthwhile. It's time-consuming grunt-work.

I don't know if it's something that a non-programmer could do. It should be 
within the ability of a beginning programmer... The catch for a non-programmer 
is that there are cases where an unused variable is a function argument. Some 
functions have required argument lists even when those arguments aren't needed 
in the code at hand. In that case instead of deleting the argument you'd 
precede it with G_GNUC_UNUSED(). The difficulty for a non-programmer is in 
recognizing when to do that instead of removing the argument.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-21 Thread David T. via gnucash-devel

> On Feb 21, 2017, at 10:06 PM, John Ralls  wrote:
> 
> 
>> On Feb 21, 2017, at 8:43 AM, Derek Atkins  wrote:
>> 
>> It's weird that this isn't caught by the *compiler* -- isn't an unused
>> parameter a warning/error?
> 
> It is by default, but we turn it off in configure.ac lines 1570 (C++) and 
> 1581 (C) because we have so many unused variables littering our code.
> 
> Regards,
> John Ralls

John,

I’m not going to add much to this discussion, except to ask if the removal of 
unused variables is: a) something worthy of doing, and b) something that could 
be delegated to a non-programmer in such a way that they would not *ahem* fuck 
things up worse? Iff both are true, then I would be willing to take a stab in 
some way. But only if that actually helps with Real Development, and doesn’t 
hurt the cause.

David
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-21 Thread John Ralls

> On Feb 21, 2017, at 8:43 AM, Derek Atkins  wrote:
> 
> Geert Janssens  > writes:
> 
>> Hi John,
>> 
>> Op maandag 20 februari 2017 19:06:19 CET schreef John Ralls:
>> 
>>> @@ -246,7 +246,7 @@ inline GncRational operator+(GncRational a, GncInt128 b)
>>> }
>>> inline GncRational operator+(GncInt128 a, GncRational b)
>>> {
>>> -return b + GncRational(a, 1);
>>> +return GncRational(a, 1) + a;
>>> }
>> 
>> Looks like one more copy/paste error or typo...
>> return GncRational(a, 1) + *b*;
>> 
>> It's weird this isn't caught in our unit tests (unless this is not
>> specifically tested for yet).
> 
> It's weird that this isn't caught by the *compiler* -- isn't an unused
> parameter a warning/error?

It is by default, but we turn it off in configure.ac lines 1570 (C++) and 1581 
(C) because we have so many unused variables littering our code.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-21 Thread Geert Janssens
Op dinsdag 21 februari 2017 11:43:35 CET schreef Derek Atkins:
> Geert Janssens  writes:
> > Hi John,
> > 
> > Op maandag 20 februari 2017 19:06:19 CET schreef John Ralls:
> >> @@ -246,7 +246,7 @@ inline GncRational operator+(GncRational a, GncInt128
> >> b) }
> >> 
> >>  inline GncRational operator+(GncInt128 a, GncRational b)
> >>  {
> >> 
> >> -return b + GncRational(a, 1);
> >> +return GncRational(a, 1) + a;
> >> 
> >>  }
> > 
> > Looks like one more copy/paste error or typo...
> > return GncRational(a, 1) + *b*;
> > 
> > It's weird this isn't caught in our unit tests (unless this is not
> > specifically tested for yet).
> 
> It's weird that this isn't caught by the *compiler* -- isn't an unused
> parameter a warning/error?
> 
> -derek

Good point. I went back to the ubuntu build of which I still had the build 
log. There was no warning for this.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-21 Thread Derek Atkins
Geert Janssens  writes:

> Hi John,
>
> Op maandag 20 februari 2017 19:06:19 CET schreef John Ralls:
>
>> @@ -246,7 +246,7 @@ inline GncRational operator+(GncRational a, GncInt128 b)
>> }
>>  inline GncRational operator+(GncInt128 a, GncRational b)
>>  {
>> -return b + GncRational(a, 1);
>> +return GncRational(a, 1) + a;
>>  }
>
> Looks like one more copy/paste error or typo...
> return GncRational(a, 1) + *b*;
>
> It's weird this isn't caught in our unit tests (unless this is not
> specifically tested for yet).

It's weird that this isn't caught by the *compiler* -- isn't an unused
parameter a warning/error?

-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
   warl...@mit.eduPGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-21 Thread Geert Janssens
Op dinsdag 21 februari 2017 07:07:58 CET schreef John Ralls:
> Interesting. I didn't get that particular failure on Travis; I got it on my
> local Ubuntu 14.04 VM which I use to debug Travis failures. It didn't even
> occur to me that the exception (which isn't the one the standard requires
> and which it doesn't throw when one compiles with -O0 -g) was caused by an
> uninstalled language.
> 
> Yes, please do push it.

Done. I learned from this the C++ locale code is pickier about locale names 
than the C code is. "fr_FR" doesn't exist as a locale on travis and my Ubuntu 
14.04 VM, but "fr_FR.utf8" does. The C++ code only accepted the latter, where 
our C tests were equally happy with the former.

I've also pushed a followup commit for the operator typo.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-21 Thread John Ralls

> On Feb 21, 2017, at 6:17 AM, Geert Janssens  
> wrote:
> 
> Hi John,
> 
> Op maandag 20 februari 2017 19:06:19 CET schreef John Ralls:
> 
>> @@ -246,7 +246,7 @@ inline GncRational operator+(GncRational a, GncInt128 b)
>> }
>> inline GncRational operator+(GncInt128 a, GncRational b)
>> {
>> -return b + GncRational(a, 1);
>> +return GncRational(a, 1) + a;
>> }
> 
> Looks like one more copy/paste error or typo...
> return GncRational(a, 1) + *b*;
> 
> It's weird this isn't caught in our unit tests (unless this is not 
> specifically tested for yet).

Darn. No, the unit tests test the class operator methods not the overloads.
> 
> 
>> diff --git a/src/libqof/qof/test/gtest-gnc-numeric.cpp
>> b/src/libqof/qof/test/gtest-gnc-numeric.cpp index 9ba7a68..34f56b1 100644
>> --- a/src/libqof/qof/test/gtest-gnc-numeric.cpp
>> +++ b/src/libqof/qof/test/gtest-gnc-numeric.cpp
>> @@ -211,6 +211,16 @@ TEST(gncnumeric_stream, output_stream)
>> GncNumeric rational_string(123, 456);
>> output << rational_string;
>> EXPECT_EQ("123/456", output.str());
>> +output.imbue(std::locale("de_DE"));
> 
> I was going to suggest using fr_FR here instead of de_DE, because the latter 
> is not installed by 
> default on travis and we explicitly install the former. However  I also see 
> you are excluding this 
> test from travis due to bugs in gcc 4.8 in your followup commit.
> 
> I was curious enough to run a couple of tests on this and these are my 
> findings:
> - I had to include the typeinfo header in gnc-numeric.hpp or it wouldn't 
> compile due to 
> std::bad_cast not being defined. With the typeinfo header included it builds, 
> however tests still 
> fail
> - Using "fr_FR" instead of de_DE also fails with "invalid locale name", 
> however the function does 
> accept "fr_FR.utf8"
> 
>> +output.str("");
>> +output << simple_int;
>> +EXPECT_EQ("123456", output.str());
> 
> - Finally the French locale uses a thousands separator, so the expected 
> output for a simple 
> integer should have one as well
> 
> I have pushed these changes to my personal github repo [1] (after reverting 
> your last commit) 
> and with this travis completes all tests without error [2]
> 
> I'm holding off to pushing the same to the gnucash repo until you had a 
> chance to provide your 
> thoughts on this.

Interesting. I didn't get that particular failure on Travis; I got it on my 
local Ubuntu 14.04 VM which I use to debug Travis failures. It didn't even 
occur to me that the exception (which isn't the one the standard requires and 
which it doesn't throw when one compiles with -O0 -g) was caused by an 
uninstalled language.

Yes, please do push it.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-21 Thread Geert Janssens
Hi John,

Op maandag 20 februari 2017 19:06:19 CET schreef John Ralls:

> @@ -246,7 +246,7 @@ inline GncRational operator+(GncRational a, GncInt128 b)
> }
>  inline GncRational operator+(GncInt128 a, GncRational b)
>  {
> -return b + GncRational(a, 1);
> +return GncRational(a, 1) + a;
>  }

Looks like one more copy/paste error or typo...
return GncRational(a, 1) + *b*;

It's weird this isn't caught in our unit tests (unless this is not specifically 
tested for yet).


> diff --git a/src/libqof/qof/test/gtest-gnc-numeric.cpp
> b/src/libqof/qof/test/gtest-gnc-numeric.cpp index 9ba7a68..34f56b1 100644
> --- a/src/libqof/qof/test/gtest-gnc-numeric.cpp
> +++ b/src/libqof/qof/test/gtest-gnc-numeric.cpp
> @@ -211,6 +211,16 @@ TEST(gncnumeric_stream, output_stream)
>  GncNumeric rational_string(123, 456);
>  output << rational_string;
>  EXPECT_EQ("123/456", output.str());
> +output.imbue(std::locale("de_DE"));

I was going to suggest using fr_FR here instead of de_DE, because the latter is 
not installed by 
default on travis and we explicitly install the former. However  I also see you 
are excluding this 
test from travis due to bugs in gcc 4.8 in your followup commit.

I was curious enough to run a couple of tests on this and these are my findings:
- I had to include the typeinfo header in gnc-numeric.hpp or it wouldn't 
compile due to 
std::bad_cast not being defined. With the typeinfo header included it builds, 
however tests still 
fail
- Using "fr_FR" instead of de_DE also fails with "invalid locale name", however 
the function does 
accept "fr_FR.utf8"

> +output.str("");
> +output << simple_int;
> +EXPECT_EQ("123456", output.str());

- Finally the French locale uses a thousands separator, so the expected output 
for a simple 
integer should have one as well

I have pushed these changes to my personal github repo [1] (after reverting 
your last commit) 
and with this travis completes all tests without error [2]

I'm holding off to pushing the same to the gnucash repo until you had a chance 
to provide your 
thoughts on this.

Regards,

Geert

[1] https://github.com/gjanssens/gnucash/commit/
888cc8dae6492c52c3cdef652138ebcc60af6c3b
[2] https://travis-ci.org/gjanssens/gnucash/builds/203811458
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed & Windows

2017-02-06 Thread Stephen Brown
Hi John

Sent from Mail for Windows 10

> On Feb 5, 2017, at 12:04 PM, Stephen Brown  
> wrote:
>
> Hi All,
>
> I am still unable to get a clean build of gnucash under Windows 10.
>
> Does it work for others or is it still my installation?

I just did a clean build starting from `cscript.exe bootstrap_win_dev.vbs`, no 
problems at all.

What errors are you getting? Last we heard from you,  you'd gotten past the sed 
crash caused by using the wrong msys shell.

Regards,
John Ralls

I unistalled cygwin using its install program. Now I am in the process of 
removing the cygwin directory completely.
I will try again when I have done it.
Thanks for your help
Regards
Stephen Brown
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed & Windows

2017-02-05 Thread John Ralls

> On Feb 5, 2017, at 12:04 PM, Stephen Brown  
> wrote:
> 
> Hi All,
> 
> I am still unable to get a clean build of gnucash under Windows 10.
> 
> Does it work for others or is it still my installation?

I just did a clean build starting from `cscript.exe bootstrap_win_dev.vbs`, no 
problems at all.

What errors are you getting? Last we heard from you,  you'd gotten past the sed 
crash caused by using the wrong msys shell.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


gnucash master: Multiple changes pushed & Windows

2017-02-05 Thread Stephen Brown
Hi All,

I am still unable to get a clean build of gnucash under Windows 10.

Does it work for others or is it still my installation?

Cheers

Stephen Brown
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-03 Thread Alex Aycinena
On Thu, Feb 2, 2017 at 11:09 PM, Geert Janssens 
wrote:

> Op donderdag 2 februari 2017 16:35:02 CET schreef Alex Aycinena:
> > Geert,
> >
> > I build on Fedora 25 and after this commit configure fails with:
> >
> > checking for main in -lgtest_main... no
> > checking for /usr/src/gtest/src/gtest-all.cc... no
> > checking for /usr/src/gtest/gtest-main.cc... no
> > checking for /usr/src/gmock/src/gmock-all.cc... no
> > checking for /usr/include/gtest/gtest.h... no
> > checking for /usr/include/gmock/gmock.h... no
> > checking whether Google Test is available... No gtest-root
> > No gmock-root
> > configure: error:
> >
> >  Unable to find the Google test framework. Either install gtest/gmock
> >  packages or point to the base directories of the sources using
> >  GTEST_ROOT and GMOCK_ROOT environment variables.
> >
> > I install gtest and gmock and get the same failure. I believe you build
> on
> > Fedora 25 as well. Can you (or anyone else) give me some guidance as to
> > what I need to do to successfully configure, make and make check after
> this
> > commit after having installed the packages?
>
> I do build in Fedora 25 indeed. When I install gtest-devel and gmock-devel
> configure properly finds them. Did you install the development packages or
> just plain gmock & gtest ?
>
> Geert
>

Geert,

Development packages! I should have figured that out by myself. Yes that
solved it. Thanks.

Regards,

Alex
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-02 Thread Geert Janssens
Op donderdag 2 februari 2017 16:35:02 CET schreef Alex Aycinena:
> Geert,
> 
> I build on Fedora 25 and after this commit configure fails with:
> 
> checking for main in -lgtest_main... no
> checking for /usr/src/gtest/src/gtest-all.cc... no
> checking for /usr/src/gtest/gtest-main.cc... no
> checking for /usr/src/gmock/src/gmock-all.cc... no
> checking for /usr/include/gtest/gtest.h... no
> checking for /usr/include/gmock/gmock.h... no
> checking whether Google Test is available... No gtest-root
> No gmock-root
> configure: error:
> 
>  Unable to find the Google test framework. Either install gtest/gmock
>  packages or point to the base directories of the sources using
>  GTEST_ROOT and GMOCK_ROOT environment variables.
> 
> I install gtest and gmock and get the same failure. I believe you build on
> Fedora 25 as well. Can you (or anyone else) give me some guidance as to
> what I need to do to successfully configure, make and make check after this
> commit after having installed the packages?

I do build in Fedora 25 indeed. When I install gtest-devel and gmock-devel 
configure properly finds them. Did you install the development packages or 
just plain gmock & gtest ?

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-02 Thread John Ralls

> On Feb 2, 2017, at 4:35 PM, Alex Aycinena  wrote:
> 
> On Thu, Feb 2, 2017 at 10:03 AM, Geert Janssens 
> wrote:
> 
>> Updated  via  https://github.com/Gnucash/gnucash/commit/659c96eb (commit)
>> via  https://github.com/Gnucash/gnucash/commit/4fdacb9b (commit)
>> via  https://github.com/Gnucash/gnucash/commit/0a8d7a21 (commit)
>>from  https://github.com/Gnucash/gnucash/commit/aeb04e1d (commit)
>> 
>> 
>> 
>> commit 659c96eb1bb8c6cc4a4eab6de0b2ee3f82bd50af
>> Author: Geert Janssens 
>> Date:   Thu Feb 2 18:48:15 2017 +0100
>> 
>>Optionally locate boost via environment variable BOOST_ROOT
>> 
>>This was already the case for our autotools based build
>>and simplifies the build setup for our Windows build system.
>> 
>> commit 4fdacb9b2a614c62ee8c03e2035a1cb800417bcf
>> Author: Geert Janssens 
>> Date:   Thu Feb 2 18:31:54 2017 +0100
>> 
>>Fix building gtest library on mingw
>> 
>>See https://github.com/google/googletest/issues/893
>> 
>> commit 0a8d7a2142419c9494bf40324936a31b380d2161
>> Author: Geert Janssens 
>> Date:   Thu Feb 2 17:20:39 2017 +0100
>> 
>>Make google test framework a mandatory build dependency
>> 
>>All c++ unit tests will be written with it, and testing
>>should be possible out of the box.
>>We could make it optional, but then lots of tests will
>>be skipped. This creates an illusion of all tests passing
>>while many are simply not run. This confusion should be
>>avoided.
>>This change depends on a second commit for the windows build
>>in the gnucash-on-windows repository. This commit will be
>>pushed at the same time.
>> 
>> 
>> 
>> Summary of changes:
>> CMakeLists.txt |   9 +-
>> configure.ac   | 197 +++---
>> ---
>> src/cmake_modules/GncAddTest.cmake |  66 +++--
>> src/engine/test/Makefile.am|   2 -
>> src/libqof/qof/test/CMakeLists.txt |  89 -
>> src/libqof/qof/test/Makefile.am|   2 -
>> src/test-core/CMakeLists.txt   |  22 ++---
>> src/test-core/Makefile.am  |   2 -
>> 8 files changed, 195 insertions(+), 194 deletions(-)
>> 
>> ___
>> gnucash-patches mailing list
>> gnucash-patc...@gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-patches
>> 
> 
> Geert,
> 
> I build on Fedora 25 and after this commit configure fails with:
> 
> checking for main in -lgtest_main... no
> checking for /usr/src/gtest/src/gtest-all.cc... no
> checking for /usr/src/gtest/gtest-main.cc... no
> checking for /usr/src/gmock/src/gmock-all.cc... no
> checking for /usr/include/gtest/gtest.h... no
> checking for /usr/include/gmock/gmock.h... no
> checking whether Google Test is available... No gtest-root
> No gmock-root
> configure: error:
> 
> Unable to find the Google test framework. Either install gtest/gmock
> packages or point to the base directories of the sources using
> GTEST_ROOT and GMOCK_ROOT environment variables.
> 
> I install gtest and gmock and get the same failure. I believe you build on
> Fedora 25 as well. Can you (or anyone else) give me some guidance as to
> what I need to do to successfully configure, make and make check after this
> commit after having installed the packages?

Alex,

The configure script used to know where the gtest and gmock modules were 
installed on Fedora, but perhaps that's changed. The simplest solution is to 
clone https://github.com/google/googletest 
 -b revision_1.18.0 and then pass 
--with-gtest-root=/path/to/googletest/googletest 
--with-gmock-root=/path/to/googletest/googlemock to configure. Be sure to use 
absolute paths in those args, recursive make will fail if you give it relative 
paths.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2017-02-02 Thread Alex Aycinena
On Thu, Feb 2, 2017 at 10:03 AM, Geert Janssens 
wrote:

> Updated  via  https://github.com/Gnucash/gnucash/commit/659c96eb (commit)
>  via  https://github.com/Gnucash/gnucash/commit/4fdacb9b (commit)
>  via  https://github.com/Gnucash/gnucash/commit/0a8d7a21 (commit)
> from  https://github.com/Gnucash/gnucash/commit/aeb04e1d (commit)
>
>
>
> commit 659c96eb1bb8c6cc4a4eab6de0b2ee3f82bd50af
> Author: Geert Janssens 
> Date:   Thu Feb 2 18:48:15 2017 +0100
>
> Optionally locate boost via environment variable BOOST_ROOT
>
> This was already the case for our autotools based build
> and simplifies the build setup for our Windows build system.
>
> commit 4fdacb9b2a614c62ee8c03e2035a1cb800417bcf
> Author: Geert Janssens 
> Date:   Thu Feb 2 18:31:54 2017 +0100
>
> Fix building gtest library on mingw
>
> See https://github.com/google/googletest/issues/893
>
> commit 0a8d7a2142419c9494bf40324936a31b380d2161
> Author: Geert Janssens 
> Date:   Thu Feb 2 17:20:39 2017 +0100
>
> Make google test framework a mandatory build dependency
>
> All c++ unit tests will be written with it, and testing
> should be possible out of the box.
> We could make it optional, but then lots of tests will
> be skipped. This creates an illusion of all tests passing
> while many are simply not run. This confusion should be
> avoided.
> This change depends on a second commit for the windows build
> in the gnucash-on-windows repository. This commit will be
> pushed at the same time.
>
>
>
> Summary of changes:
>  CMakeLists.txt |   9 +-
>  configure.ac   | 197 +++---
> ---
>  src/cmake_modules/GncAddTest.cmake |  66 +++--
>  src/engine/test/Makefile.am|   2 -
>  src/libqof/qof/test/CMakeLists.txt |  89 -
>  src/libqof/qof/test/Makefile.am|   2 -
>  src/test-core/CMakeLists.txt   |  22 ++---
>  src/test-core/Makefile.am  |   2 -
>  8 files changed, 195 insertions(+), 194 deletions(-)
>
> ___
> gnucash-patches mailing list
> gnucash-patc...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches
>

Geert,

I build on Fedora 25 and after this commit configure fails with:

checking for main in -lgtest_main... no
checking for /usr/src/gtest/src/gtest-all.cc... no
checking for /usr/src/gtest/gtest-main.cc... no
checking for /usr/src/gmock/src/gmock-all.cc... no
checking for /usr/include/gtest/gtest.h... no
checking for /usr/include/gmock/gmock.h... no
checking whether Google Test is available... No gtest-root
No gmock-root
configure: error:

 Unable to find the Google test framework. Either install gtest/gmock
 packages or point to the base directories of the sources using
 GTEST_ROOT and GMOCK_ROOT environment variables.

I install gtest and gmock and get the same failure. I believe you build on
Fedora 25 as well. Can you (or anyone else) give me some guidance as to
what I need to do to successfully configure, make and make check after this
commit after having installed the packages?

Thanks,

Alex
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2016-10-09 Thread John Ralls

> On Oct 9, 2016, at 6:48 PM, Geert Janssens  wrote:
> 
> On Sunday 09 October 2016 04:54:11 John Ralls wrote:
>> Updated   via  https://github.com/Gnucash/gnucash/commit/20c0271e
>> (commit) via  https://github.com/Gnucash/gnucash/commit/b00694fd
>> (commit) from  https://github.com/Gnucash/gnucash/commit/6e132d83
>> (commit)
>> 
>> 
>> 
>> commit 20c0271e985cfe711e0edf9bd89c1e06efc6db15
>> Author: John Ralls 
>> Date:   Tue Oct 4 20:00:48 2016 +0200
>> 
>>Fix CSV importer to handle GMT + 13 Timezone (New Zealand Daylight
>> Time).
>> 
>>Also remove special time calculations and use
>> gnc_dmy2timespec_neutral() for consistency with rest of GnuCash.
>> 
>> commit b00694fde4148417813e36502ca6a68dba66454e
>> Author: John Ralls 
>> Date:   Tue Oct 4 19:59:00 2016 +0200
>> 
>>Bug 772382 - Date off-by-one after DST change
>> 
>>The time needs to be 10:59, not 11:00: 13 hours after 11:00 is
>> 24:00, which is really 00:00 the next day.
> 
> These commits were previously pushed on maint as well earlier this week. 
> However they seem to be cherry-picked to master instead of merged. At 
> least I don't see a merge commit. Is there a particular reason for this 

Darn. I didn't notice that. Sorry.

What happened is that I did a merge and was working on fixing the conflicts and 
getting the tests to pass; in the meantime Christian pushed 6e132d8 so I did a 
pull--rebase, which of course replaced the merge with new commits. At least it 
didn't replay a bunch of history.

Regards,
John Ralls



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2016-10-09 Thread Geert Janssens
On Sunday 09 October 2016 04:54:11 John Ralls wrote:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/20c0271e
> (commit) via  https://github.com/Gnucash/gnucash/commit/b00694fd
> (commit) from  https://github.com/Gnucash/gnucash/commit/6e132d83
> (commit)
> 
> 
> 
> commit 20c0271e985cfe711e0edf9bd89c1e06efc6db15
> Author: John Ralls 
> Date:   Tue Oct 4 20:00:48 2016 +0200
> 
> Fix CSV importer to handle GMT + 13 Timezone (New Zealand Daylight
> Time).
> 
> Also remove special time calculations and use
> gnc_dmy2timespec_neutral() for consistency with rest of GnuCash.
> 
> commit b00694fde4148417813e36502ca6a68dba66454e
> Author: John Ralls 
> Date:   Tue Oct 4 19:59:00 2016 +0200
> 
> Bug 772382 - Date off-by-one after DST change
> 
> The time needs to be 10:59, not 11:00: 13 hours after 11:00 is
> 24:00, which is really 00:00 the next day.

These commits were previously pushed on maint as well earlier this week. 
However they seem to be cherry-picked to master instead of merged. At 
least I don't see a merge commit. Is there a particular reason for this 
?

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2016-06-12 Thread Aaron Laws
On Sun, Jun 12, 2016 at 11:48 AM, John Ralls  wrote:
>
> >
> >
> > I'm not using guid's in my code. These errors are pulled in because of
> the Account.h header
> > that gets included somewhere.
> >
> > I saw one commit on the guid_header branch is including guid.hpp
> everywhere. Is that what I
> > now have to do in my sources even if I'm not using a guid directly ? Or
> what is the correct
> > approach here ?
> >
>
> Yes, I had a similar problem in the backend work after I merged, though
> the backend code obviously does use GncGUID so it didn't seem quite as
> weird. Try including guid.hpp before gnc-csv-account-map.h in
> gnc-csv-imp-trans.cpp.
>
> It might work to conditionally include guid.hpp inside of guid.h and wrap
> guid.hpp's declarations in extern "C"
> to avoid linkage problems. If so that would allow us to remove all of the
> sxplicit include guid.hpp from .cpp files.
>
> Aaron, any thoughts on this?
>
> Regards,
> John Ralls


tl;dr: This can be made better by making a small change in guid.h which I
will Pull Request within the next day or so. With this change, any .cpp
file that doesn't need the definition of GncGUID doesn't have to include
guid.hpp at the top.

Long version:

The problem here is that there is one definition of GncGUID for C code and
one for C++ code (this is in the commit message). I was unable to do
something like

#ifdef __cplusplus
struct GncGUID : public boost::uuids::uuid...
#else
typedef struct _gncGuid {
unsigned char.
#endif

because rather than trusting C headers to use extern "C" when they need it,
we use extern "C" around C headers "for" them. This means that, even when
compiling c++, the linkage could be "C". For example: kvp-value.cpp
includes kvp-value.hpp which uses extern "C" to include qof.h which
includes guid.h. Although a c++ compiler is being invoked, the linkage is
"C", so a c++ definition can't be conditionally included here.

For the same reason, we can't
#ifdef __cplusplus
#include "guid.hpp"
#endif
etc.

Also, GncGUID must be defined before it's used! This means that the best
place to put it is first in a .cpp file (perhaps after config.h is more
correct), and of course, not within an extern "C" block.

The solution I have is that I can simply forward declare the struct in the
#ifdef __cplusplus. I can't put the definition in there because of the "C"
linkage problem, but I forgot that I *can* forward declare, and that's what
I plan to do. I just did a test run in libqof, and it allowed me to remove
a guid.hpp include is almost 20 files.

Thanks for bringing this to my attention; please let me know if you have
any more thoughts!
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2016-06-12 Thread John Ralls

> On Jun 12, 2016, at 8:20 AM, Geert Janssens  
> wrote:
> 
> On Thursday 09 June 2016 18:42:28 John Ralls wrote:
>> Updated   via  https://github.com/Gnucash/gnucash/commit/2bbc1a19
>> (commit) via  https://github.com/Gnucash/gnucash/commit/949ff816
>> (commit) via  https://github.com/Gnucash/gnucash/commit/ce190e34
>> (commit) via  https://github.com/Gnucash/gnucash/commit/1c00937a
>> (commit) via  https://github.com/Gnucash/gnucash/commit/293a2866
>> (commit) via  https://github.com/Gnucash/gnucash/commit/74800e18
>> (commit) via  https://github.com/Gnucash/gnucash/commit/0ee7e61b
>> (commit) via  https://github.com/Gnucash/gnucash/commit/3063c873
>> (commit) via  https://github.com/Gnucash/gnucash/commit/557a5e2f
>> (commit) via  https://github.com/Gnucash/gnucash/commit/33908860
>> (commit) from  https://github.com/Gnucash/gnucash/commit/9f3dc0c8
>> (commit)
>> 
>> 
>> 
>> commit 2bbc1a193d582a6f1a9b7a95391485af09fd3e6a
>> Merge: 949ff81 ce190e3
>> Author: John Ralls 
>> Date:   Thu Jun 9 15:29:45 2016 -0700
>> 
>>Merge branch 'guid_header'
>> 
> 
> After I rebase a local c++ branch on top of master with the guid_header 
> branch merged it, I'm 
> getting compile errors. A snippet from the build log:
> 
> In file included from /kobaltnet/janssege/Development/gnucash/gnucash-
> master/src/libqof/qof/qofid.h:82:0, from 
> /kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/qof.h:72,
>  
>from /kobaltnet/janssege/Development/gnucash/gnucash-
> master/src/engine/Account.h:47, from 
> /kobaltnet/janssege/Development/gnucash/gnucash-master/src/import-export/csv-imp/gnc-csv-
> account-map.h:31, from 
> /kobaltnet/janssege/Development/gnucash/gnucash-
> master/src/import-export/csv-imp/gnc-csv-imp-trans.cpp:31: 
> /kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:76:7:
>  error: 
> ‘GncGUID’ does not name a type const GncGUID* gnc_value_get_guid (const 
> GValue *value); 
>  ^ In file included from /kobaltnet/janssege/Development/gnucash/gnucash-
> master/src/libqof/qof/qofid.h:82:0, from 
> /kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/qof.h:72,
>  
>from /kobaltnet/janssege/Development/gnucash/gnucash-
> master/src/engine/Account.h:47, from 
> /kobaltnet/janssege/Development/gnucash/gnucash-master/src/import-export/csv-imp/gnc-csv-
> account-map.h:31, from 
> /kobaltnet/janssege/Development/gnucash/gnucash-
> master/src/import-export/csv-imp/gnc-csv-imp-trans.cpp:31: 
> /kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:87:20:
>  error: 
> variable or field ‘guid_replace’ declared void void guid_replace (GncGUID 
> *guid);^ 
> /kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:87:20:
>  error: 
> ‘GncGUID’ was not declared inthis scope 
> /kobaltnet/janssege/Development/gnucash/gnucash-
> master/src/libqof/qof/guid.h:87:29: error: ‘guid’ was not declared in this 
> scope void 
> guid_replace (GncGUID *guid); ^ 
> /kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:93:1:
>  error: 
> ‘GncGUID’ does not name a type GncGUID guid_new_return (void); ^ 
> /kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:98:7:
>  error: 
> ‘GncGUID’ does not name a type const GncGUID * guid_null (void);
> 
> 
> 
> I'm not using guid's in my code. These errors are pulled in because of the 
> Account.h header 
> that gets included somewhere.
> 
> I saw one commit on the guid_header branch is including guid.hpp everywhere. 
> Is that what I 
> now have to do in my sources even if I'm not using a guid directly ? Or what 
> is the correct 
> approach here ?
> 

Yes, I had a similar problem in the backend work after I merged, though the 
backend code obviously does use GncGUID so it didn't seem quite as weird. Try 
including guid.hpp before gnc-csv-account-map.h in gnc-csv-imp-trans.cpp.

It might work to conditionally include guid.hpp inside of guid.h and wrap 
guid.hpp's declarations in extern "C"
to avoid linkage problems. If so that would allow us to remove all of the 
sxplicit include guid.hpp from .cpp files.

Aaron, any thoughts on this?

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2016-06-12 Thread Geert Janssens
On Thursday 09 June 2016 18:42:28 John Ralls wrote:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/2bbc1a19
> (commit) via  https://github.com/Gnucash/gnucash/commit/949ff816
> (commit) via  https://github.com/Gnucash/gnucash/commit/ce190e34
> (commit) via  https://github.com/Gnucash/gnucash/commit/1c00937a
> (commit) via  https://github.com/Gnucash/gnucash/commit/293a2866
> (commit) via  https://github.com/Gnucash/gnucash/commit/74800e18
> (commit) via  https://github.com/Gnucash/gnucash/commit/0ee7e61b
> (commit) via  https://github.com/Gnucash/gnucash/commit/3063c873
> (commit) via  https://github.com/Gnucash/gnucash/commit/557a5e2f
> (commit) via  https://github.com/Gnucash/gnucash/commit/33908860
> (commit) from  https://github.com/Gnucash/gnucash/commit/9f3dc0c8
> (commit)
> 
> 
> 
> commit 2bbc1a193d582a6f1a9b7a95391485af09fd3e6a
> Merge: 949ff81 ce190e3
> Author: John Ralls 
> Date:   Thu Jun 9 15:29:45 2016 -0700
> 
> Merge branch 'guid_header'
> 

After I rebase a local c++ branch on top of master with the guid_header branch 
merged it, I'm 
getting compile errors. A snippet from the build log:

In file included from /kobaltnet/janssege/Development/gnucash/gnucash-
master/src/libqof/qof/qofid.h:82:0, from 
/kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/qof.h:72, 
from /kobaltnet/janssege/Development/gnucash/gnucash-
master/src/engine/Account.h:47, from 
/kobaltnet/janssege/Development/gnucash/gnucash-master/src/import-export/csv-imp/gnc-csv-
account-map.h:31, from 
/kobaltnet/janssege/Development/gnucash/gnucash-
master/src/import-export/csv-imp/gnc-csv-imp-trans.cpp:31: 
/kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:76:7:
 error: 
‘GncGUID’ does not name a type const GncGUID* gnc_value_get_guid (const GValue 
*value); 
  ^ In file included from /kobaltnet/janssege/Development/gnucash/gnucash-
master/src/libqof/qof/qofid.h:82:0, from 
/kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/qof.h:72, 
from /kobaltnet/janssege/Development/gnucash/gnucash-
master/src/engine/Account.h:47, from 
/kobaltnet/janssege/Development/gnucash/gnucash-master/src/import-export/csv-imp/gnc-csv-
account-map.h:31, from 
/kobaltnet/janssege/Development/gnucash/gnucash-
master/src/import-export/csv-imp/gnc-csv-imp-trans.cpp:31: 
/kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:87:20:
 error: 
variable or field ‘guid_replace’ declared void void guid_replace (GncGUID 
*guid);^ 
/kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:87:20:
 error: 
‘GncGUID’ was not declared inthis scope 
/kobaltnet/janssege/Development/gnucash/gnucash-
master/src/libqof/qof/guid.h:87:29: error: ‘guid’ was not declared in this 
scope void 
guid_replace (GncGUID *guid); ^ 
/kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:93:1:
 error: 
‘GncGUID’ does not name a type GncGUID guid_new_return (void); ^ 
/kobaltnet/janssege/Development/gnucash/gnucash-master/src/libqof/qof/guid.h:98:7:
 error: 
‘GncGUID’ does not name a type const GncGUID * guid_null (void);



I'm not using guid's in my code. These errors are pulled in because of the 
Account.h header 
that gets included somewhere.

I saw one commit on the guid_header branch is including guid.hpp everywhere. Is 
that what I 
now have to do in my sources even if I'm not using a guid directly ? Or what is 
the correct 
approach here ?

Regards,
Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-11-03 Thread Geert Janssens
Thanks for the heads-up, Alex. Fixed in master now.

Regards,
Geert

On Monday 02 November 2015 13:29:50 Alex Aycinena wrote:
> Geert,
> 
> I get this make failure on this change:
> 
> /home/gnucash-dev/gitcheckouts/gnucash-clean/src/gnome/gnc-plugin-page
> -register.c: In function 'gnc_plugin_page_register_get_query':
> /home/gnucash-dev/gitcheckouts/gnucash-clean/src/gnome/gnc-plugin-page
> -register.c:1817:443: error: 'return' with no value, in function
> returning non-void [-Werror]
> g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER(plugin_page));
> 
> ^
> cc1: all warnings being treated as errors
> Makefile:826: recipe for target 'gnc-plugin-page-register.lo' failed
> make[4]: *** [gnc-plugin-page-register.lo] Error 1
> make[4]: Leaving directory
> '/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/gnome'
> 
> Regards,
> 
> Alex
> 
> On Mon, Nov 2, 2015 at 3:26 AM, Geert Janssens
> 
> wrote:
> > Updated  via  https://github.com/Gnucash/gnucash/commit/e0ca9344
> > (commit)> 
> >  via  https://github.com/Gnucash/gnucash/commit/f41a2149
> >  (commit)
> >  via  https://github.com/Gnucash/gnucash/commit/1a6fb375
> >  (commit)
> >  via  https://github.com/Gnucash/gnucash/commit/50350c40
> >  (commit)
> > 
> > from  https://github.com/Gnucash/gnucash/commit/f8271749
> > (commit)
> > 
> > commit e0ca934438fc384504d0b8efbd7bdcfd6315c5f3
> > Author: Geert Janssens 
> > Date:   Mon Nov 2 12:30:19 2015 +0100
> > 
> > Set num_accounts upfront for ordinary register exports
> > 
> > commit f41a214956a9cb1bc9af1853cc421f7bd5da8d56
> > Author: Geert Janssens 
> > Date:   Mon Nov 2 12:29:35 2015 +0100
> > 
> > Avoid code duplication
> > 
> > commit 1a6fb3757070faed745e63d71a67227cb46fa9c4
> > Author: Geert Janssens 
> > Date:   Mon Nov 2 12:28:26 2015 +0100
> > 
> > Rephrase some comments (to help an outsider to better understand
> > 
> > what's happening)
> > 
> > commit 50350c40a737577a705eea3b4bd9f577fdd9e704
> > Author: Robert Fewell <14ubo...@gmail.com>
> > Date:   Sat Oct 17 19:43:17 2015 +0100
> > 
> > Bug 754533 Add CSV Register Export
> > 
> > Allow you to do a CSV export of the active Register View
> > 
> > Summary of changes:
> >  src/gnome/gnc-plugin-page-register.c   | 18 +
> >  src/gnome/gnc-plugin-page-register.h   | 10 +++
> >  src/gnome/gnc-plugin-page-register2.c  | 18 +
> >  src/gnome/gnc-plugin-page-register2.h  | 11 +++
> >  src/import-export/csv-exp/Makefile.am  |  3 +
> >  src/import-export/csv-exp/assistant-csv-export.c   | 79
> > 
> > +-
> > 
> >  src/import-export/csv-exp/assistant-csv-export.h   | 14 +++-
> >  .../csv-exp/csv-transactions-export.c  | 56
> >  +-- .../csv-exp/gnc-plugin-csv-export-ui.xml  
> >  |  1 +
> >  src/import-export/csv-exp/gnc-plugin-csv-export.c  | 39 +++
> >  10 files changed, 210 insertions(+), 39 deletions(-)
> > 
> > ___
> > gnucash-patches mailing list
> > gnucash-patc...@gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-patches

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-11-02 Thread Alex Aycinena
Geert,

I get this make failure on this change:

/home/gnucash-dev/gitcheckouts/gnucash-clean/src/gnome/gnc-plugin-page-register.c:
In function 'gnc_plugin_page_register_get_query':
/home/gnucash-dev/gitcheckouts/gnucash-clean/src/gnome/gnc-plugin-page-register.c:1817:443:
error: 'return' with no value, in function returning non-void [-Werror]
 g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER(plugin_page));

^
cc1: all warnings being treated as errors
Makefile:826: recipe for target 'gnc-plugin-page-register.lo' failed
make[4]: *** [gnc-plugin-page-register.lo] Error 1
make[4]: Leaving directory
'/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/gnome'

Regards,

Alex

On Mon, Nov 2, 2015 at 3:26 AM, Geert Janssens 
wrote:

> Updated  via  https://github.com/Gnucash/gnucash/commit/e0ca9344 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/f41a2149 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/1a6fb375 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/50350c40 (commit)
> from  https://github.com/Gnucash/gnucash/commit/f8271749 (commit)
>
>
>
> commit e0ca934438fc384504d0b8efbd7bdcfd6315c5f3
> Author: Geert Janssens 
> Date:   Mon Nov 2 12:30:19 2015 +0100
>
> Set num_accounts upfront for ordinary register exports
>
> commit f41a214956a9cb1bc9af1853cc421f7bd5da8d56
> Author: Geert Janssens 
> Date:   Mon Nov 2 12:29:35 2015 +0100
>
> Avoid code duplication
>
> commit 1a6fb3757070faed745e63d71a67227cb46fa9c4
> Author: Geert Janssens 
> Date:   Mon Nov 2 12:28:26 2015 +0100
>
> Rephrase some comments (to help an outsider to better understand
> what's happening)
>
> commit 50350c40a737577a705eea3b4bd9f577fdd9e704
> Author: Robert Fewell <14ubo...@gmail.com>
> Date:   Sat Oct 17 19:43:17 2015 +0100
>
> Bug 754533 Add CSV Register Export
>
> Allow you to do a CSV export of the active Register View
>
>
>
> Summary of changes:
>  src/gnome/gnc-plugin-page-register.c   | 18 +
>  src/gnome/gnc-plugin-page-register.h   | 10 +++
>  src/gnome/gnc-plugin-page-register2.c  | 18 +
>  src/gnome/gnc-plugin-page-register2.h  | 11 +++
>  src/import-export/csv-exp/Makefile.am  |  3 +
>  src/import-export/csv-exp/assistant-csv-export.c   | 79
> +-
>  src/import-export/csv-exp/assistant-csv-export.h   | 14 +++-
>  .../csv-exp/csv-transactions-export.c  | 56 +--
>  .../csv-exp/gnc-plugin-csv-export-ui.xml   |  1 +
>  src/import-export/csv-exp/gnc-plugin-csv-export.c  | 39 +++
>  10 files changed, 210 insertions(+), 39 deletions(-)
>
> ___
> gnucash-patches mailing list
> gnucash-patc...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-08-10 Thread Mike Alexander
> On Aug 10, 2015, at 3:05 AM, John Ralls  wrote:
> 
> I pushed the change Alex suggested to maint and that got my other change 
> synced to Github so everything should be OK now.

I pushed changes to maint and master that I think fix things up.  They replace 
my change to gnu-fq-helper.in on master with your version of the same fix and 
put the parts of my change 142844db that relevant to maint on that branch.

  Mike
 
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-08-10 Thread John Ralls

> On Aug 10, 2015, at 7:30 AM, John Ralls  wrote:
> 
> 
>> On Aug 9, 2015, at 11:51 PM, Mike Alexander  wrote:
>> 
>> --On August 9, 2015 at 10:36:52 AM +0100 John Ralls  
>> wrote:
>> 
>>> m
 On Aug 8, 2015, at 5:00 PM, gnucash-patches-requ...@gnucash.org
 wrote: commit 1e16ba6c14ccec6222a8fe798e7824285fd49cac
 Author: Mike Alexander 
 Date:   Fri Aug 7 19:43:12 2015 -0400
 
 Quote the date returned by get_quote_time so Scheme can read it.
 
 commit 655c04bd68d984272d8593ebbcff10f3dbaac93b
 Author: Mike Alexander 
 Date:   Thu Aug 6 17:43:57 2015 -0400
 
 Avoid passing invalid arguments to functions to get rid of some
 non-fatal asserts.
 
>>> 
>>> Mike,
>>> 
>>> The first one and possibly the second should have been made in maint
>>> and then merged to master.
>>> http://wiki.gnucash.org/wiki/Git#Branching_and_Merging. Just because
>>> there’s no bug report doesn’t mean it isn’t a bug!
>>> 
>>> Oddly, I did fix the first last Sunday and it sure looks like I
>>> pushed it (20242c5 Put the quotes back around the date string in
>>> gnc-fq-helper.). I just pulled a fresh clone from Code and it’s
>>> there, but it doesn’t show up in Github and didn’t get pulled in
>>> to Geert’s merge — which might have happened because Geert pulls
>>> from Github and only pushes to Code.
>> 
>> You're right, I apologize.  For the first one I thought your change d2798b8c 
>> was only on master, but I see that it was also on maint.  For the second 
>> one, I just forgot.  They were just little changes I found in passing while 
>> looking for other problems and I didn't really think about where to put 
>> them.  I'll try to do better in the future.
>> 
>> I just tried to fix this, but I think there is something wrong with the 
>> remote repositories. The GitHub and Code repositories seem to be out of 
>> synch.  If I pull maint from GitHub and then try to push a change to Code, 
>> Git tells me I'm out of date and need to do a pull.  I'm set up to pull from 
>> GitHub and push to Code, and they seem to be out of synch. This is probably 
>> why your change 20242c5 isn't on GitHub.  I could pull from Code and push 
>> there, but I'm afraid I'll just make things worse. If someone fixes the Git 
>> confusion, I'll fix my mistakes.
> 
> Mike,
> 
> There was probably a network glitch when I pushed 20242c5 that broke the 
> transfer from Code to Github. Pushing something new will likely overcome 
> that, so if you have a change just pull from code and push back. You’ll want 
> a rebase pull if you already have new commits to push. Assuming your code 
> remote is called “upstream” like in the wiki page:
> git checkout maint
> git pull --rebase upstream

I pushed the change Alex suggested to maint and that got my other change synced 
to Github so everything should be OK now.

Regards,
John Ralls
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-08-09 Thread John Ralls

> On Aug 9, 2015, at 11:51 PM, Mike Alexander  wrote:
> 
> --On August 9, 2015 at 10:36:52 AM +0100 John Ralls  
> wrote:
> 
>> m
>>> On Aug 8, 2015, at 5:00 PM, gnucash-patches-requ...@gnucash.org
>>> wrote: commit 1e16ba6c14ccec6222a8fe798e7824285fd49cac
>>> Author: Mike Alexander 
>>> Date:   Fri Aug 7 19:43:12 2015 -0400
>>> 
>>>  Quote the date returned by get_quote_time so Scheme can read it.
>>> 
>>> commit 655c04bd68d984272d8593ebbcff10f3dbaac93b
>>> Author: Mike Alexander 
>>> Date:   Thu Aug 6 17:43:57 2015 -0400
>>> 
>>>  Avoid passing invalid arguments to functions to get rid of some
>>>  non-fatal asserts.
>>> 
>> 
>> Mike,
>> 
>> The first one and possibly the second should have been made in maint
>> and then merged to master.
>> http://wiki.gnucash.org/wiki/Git#Branching_and_Merging. Just because
>> there’s no bug report doesn’t mean it isn’t a bug!
>> 
>> Oddly, I did fix the first last Sunday and it sure looks like I
>> pushed it (20242c5 Put the quotes back around the date string in
>> gnc-fq-helper.). I just pulled a fresh clone from Code and it’s
>> there, but it doesn’t show up in Github and didn’t get pulled in
>> to Geert’s merge — which might have happened because Geert pulls
>> from Github and only pushes to Code.
> 
> You're right, I apologize.  For the first one I thought your change d2798b8c 
> was only on master, but I see that it was also on maint.  For the second one, 
> I just forgot.  They were just little changes I found in passing while 
> looking for other problems and I didn't really think about where to put them. 
>  I'll try to do better in the future.
> 
> I just tried to fix this, but I think there is something wrong with the 
> remote repositories. The GitHub and Code repositories seem to be out of 
> synch.  If I pull maint from GitHub and then try to push a change to Code, 
> Git tells me I'm out of date and need to do a pull.  I'm set up to pull from 
> GitHub and push to Code, and they seem to be out of synch. This is probably 
> why your change 20242c5 isn't on GitHub.  I could pull from Code and push 
> there, but I'm afraid I'll just make things worse. If someone fixes the Git 
> confusion, I'll fix my mistakes.

Mike,

There was probably a network glitch when I pushed 20242c5 that broke the 
transfer from Code to Github. Pushing something new will likely overcome that, 
so if you have a change just pull from code and push back. You’ll want a rebase 
pull if you already have new commits to push. Assuming your code remote is 
called “upstream” like in the wiki page:
 git checkout maint
 git pull --rebase upstream

Regards,
John Ralls



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-08-09 Thread Mike Alexander
--On August 9, 2015 at 10:36:52 AM +0100 John Ralls 
 wrote:



m

On Aug 8, 2015, at 5:00 PM, gnucash-patches-requ...@gnucash.org
wrote: commit 1e16ba6c14ccec6222a8fe798e7824285fd49cac
Author: Mike Alexander 
Date:   Fri Aug 7 19:43:12 2015 -0400

   Quote the date returned by get_quote_time so Scheme can read it.

commit 655c04bd68d984272d8593ebbcff10f3dbaac93b
Author: Mike Alexander 
Date:   Thu Aug 6 17:43:57 2015 -0400

   Avoid passing invalid arguments to functions to get rid of some
   non-fatal asserts.



Mike,

The first one and possibly the second should have been made in maint
and then merged to master.
http://wiki.gnucash.org/wiki/Git#Branching_and_Merging. Just because
there’s no bug report doesn’t mean it isn’t a bug!

Oddly, I did fix the first last Sunday and it sure looks like I
pushed it (20242c5 Put the quotes back around the date string in
gnc-fq-helper.). I just pulled a fresh clone from Code and it’s
there, but it doesn’t show up in Github and didn’t get pulled in
to Geert’s merge — which might have happened because Geert pulls
from Github and only pushes to Code.


You're right, I apologize.  For the first one I thought your change 
d2798b8c was only on master, but I see that it was also on maint.  For 
the second one, I just forgot.  They were just little changes I found 
in passing while looking for other problems and I didn't really think 
about where to put them.  I'll try to do better in the future.


I just tried to fix this, but I think there is something wrong with the 
remote repositories.  The GitHub and Code repositories seem to be out 
of synch.  If I pull maint from GitHub and then try to push a change to 
Code, Git tells me I'm out of date and need to do a pull.  I'm set up 
to pull from GitHub and push to Code, and they seem to be out of synch. 
This is probably why your change 20242c5 isn't on GitHub.  I could pull 
from Code and push there, but I'm afraid I'll just make things worse. 
If someone fixes the Git confusion, I'll fix my mistakes.


  Mike


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-08-09 Thread John Ralls
m
> On Aug 8, 2015, at 5:00 PM, gnucash-patches-requ...@gnucash.org wrote:
> commit 1e16ba6c14ccec6222a8fe798e7824285fd49cac
> Author: Mike Alexander 
> Date:   Fri Aug 7 19:43:12 2015 -0400
> 
>Quote the date returned by get_quote_time so Scheme can read it.
> 
> commit 655c04bd68d984272d8593ebbcff10f3dbaac93b
> Author: Mike Alexander 
> Date:   Thu Aug 6 17:43:57 2015 -0400
> 
>Avoid passing invalid arguments to functions to get rid of some non-fatal 
> asserts.
> 

Mike,

The first one and possibly the second should have been made in maint and then 
merged to master. http://wiki.gnucash.org/wiki/Git#Branching_and_Merging. Just 
because there’s no bug report doesn’t mean it isn’t a bug!

Oddly, I did fix the first last Sunday and it sure looks like I pushed it 
(20242c5 Put the quotes back around the date string in gnc-fq-helper.). I just 
pulled a fresh clone from Code and it’s there, but it doesn’t show up in Github 
and didn’t get pulled in to Geert’s merge — which might have happened because 
Geert pulls from Github and only pushes to Code.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-08-05 Thread John Ralls

> On Aug 5, 2015, at 6:05 PM, Derek Atkins  wrote:
> 
> Geert Janssens  writes:
> 
>> On Tuesday 04 August 2015 12:00:06 Derek Atkins wrote:
>>> Geert,
>>> 
>>> This change seems like the wrong direction; the point of including the
>>> book in the API was to reduce the need for global variables/storage.
>>> I'd like to see GnuCash move more towards being able to have multiple
>>> files open simultaneously, not further away from it.
>>> 
>>> I clearly missed the gnc:*company-name* change the preceeded this
>>> change otherwise I'd probably have commented on that, too.
>>> 
>>> -derek
>>> 
>> 
>> Derek,
>> 
>> That's a fair point. I have reverted most of the commit that removes the 
>> book parameter and instead corrected gnc:company-info to require it 
>> (gnc:company-info was introduced by John during his kvp rewrite).
>> 
>> I occurred to me though that the issue is much more fundamental than 
>> that. I haven't found a universal way to tie a report to a book. It'd 
>> have expected the options database to be able to tell what book it 
>> belongs to, but at present it doesn't.
> 

I’m a bit at two minds about this: On the one hand it’s clear that many report 
customizations apply to only one book. On the other I have trusts for my two 
daughters which are pretty much identical and which it makes sense to use the 
same customizations. On the third, the two accounts are so identical that I can 
run the report twice in one of them changing only the title, so it’s not 
actually necessary to use the report in both except that my aging brain would 
have to remember in which account the reports live.

Regards,
John Ralls



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-08-05 Thread Derek Atkins
Geert Janssens  writes:

> On Tuesday 04 August 2015 12:00:06 Derek Atkins wrote:
>> Geert,
>> 
>> This change seems like the wrong direction; the point of including the
>> book in the API was to reduce the need for global variables/storage.
>> I'd like to see GnuCash move more towards being able to have multiple
>> files open simultaneously, not further away from it.
>> 
>> I clearly missed the gnc:*company-name* change the preceeded this
>> change otherwise I'd probably have commented on that, too.
>> 
>> -derek
>> 
>
> Derek,
>
> That's a fair point. I have reverted most of the commit that removes the 
> book parameter and instead corrected gnc:company-info to require it 
> (gnc:company-info was introduced by John during his kvp rewrite).
>
> I occurred to me though that the issue is much more fundamental than 
> that. I haven't found a universal way to tie a report to a book. It'd 
> have expected the options database to be able to tell what book it 
> belongs to, but at present it doesn't.

Yes, this is a more fundamental issue, and one which we will have to
work through eventually.  But in the meantime we should plan for that.

> So for now I have had to resort to (gnc-get-current-book) for a number 
> of reports instead of being able to extract the real book from one or 
> the other parameter. This will have to be revisited if/when we will 
> actually implement a multiple files open interface.

Yeah, it's unfortunate that there is not a better way.  :(

> Geert

-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
   warl...@mit.eduPGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-08-04 Thread Geert Janssens
On Tuesday 04 August 2015 12:00:06 Derek Atkins wrote:
> Geert,
> 
> This change seems like the wrong direction; the point of including the
> book in the API was to reduce the need for global variables/storage.
> I'd like to see GnuCash move more towards being able to have multiple
> files open simultaneously, not further away from it.
> 
> I clearly missed the gnc:*company-name* change the preceeded this
> change otherwise I'd probably have commented on that, too.
> 
> -derek
> 

Derek,

That's a fair point. I have reverted most of the commit that removes the 
book parameter and instead corrected gnc:company-info to require it 
(gnc:company-info was introduced by John during his kvp rewrite).

I occurred to me though that the issue is much more fundamental than 
that. I haven't found a universal way to tie a report to a book. It'd 
have expected the options database to be able to tell what book it 
belongs to, but at present it doesn't.

So for now I have had to resort to (gnc-get-current-book) for a number 
of reports instead of being able to extract the real book from one or 
the other parameter. This will have to be revisited if/when we will 
actually implement a multiple files open interface.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2015-08-04 Thread Derek Atkins
Geert,

This change seems like the wrong direction; the point of including the
book in the API was to reduce the need for global variables/storage.
I'd like to see GnuCash move more towards being able to have multiple
files open simultaneously, not further away from it.

I clearly missed the gnc:*company-name* change the preceeded this
change otherwise I'd probably have commented on that, too.

-derek

Geert Janssens  writes:

> commit 42710c7e6c69ae99b0a8d3713ae79db43f37f7d4
> Author: Geert Janssens 
> Date:   Tue Aug 4 15:31:40 2015 +0200
>
> Drop some unused parameters from business reports
> 
> They are no longer used since the introduction of gnc:company-info
>
> diff --git a/src/report/business-reports/easy-invoice.scm 
> b/src/report/business-reports/easy-invoice.scm
> index e2ee9c2..d241692 100644
> --- a/src/report/business-reports/easy-invoice.scm
> +++ b/src/report/business-reports/easy-invoice.scm
> @@ -625,7 +625,7 @@
>   'attribute (list "valign" "top"))
>  table))
>  
> -(define (make-myname-table book)
> +(define (make-myname-table)
>(let* ((table (gnc:make-html-table))
>(name (gnc:company-info gnc:*company-name*))
>(addy (gnc:company-info gnc:*company-addy*)))
> @@ -753,7 +753,7 @@
>  (make-break! document)
>  
>  ; add the client and company name table
> - (let ((book (gncInvoiceGetBook invoice)))
> + (begin
> (set! table (make-entry-table invoice
>   (gnc:report-options report-obj)
>   add-order cust-doc? credit-note?))
> @@ -769,7 +769,7 @@
>(add-html! document "")
>(gnc:html-document-add-object!
> document
> -   (make-myname-table book))
> +   (make-myname-table))
>(add-html! document "")))
>(add-html! document "")
>  )
> diff --git a/src/report/business-reports/fancy-invoice.scm 
> b/src/report/business-reports/fancy-invoice.scm
> index cd5bf31..667cff3 100644
> --- a/src/report/business-reports/fancy-invoice.scm
> +++ b/src/report/business-reports/fancy-invoice.scm
> @@ -675,7 +675,7 @@
>   'attribute (list "valign" "top"))
>  table))
>  
> -(define (make-myname-table book date-format title)
> +(define (make-myname-table title)
>(let* ((table (gnc:make-html-table))
>(name (gnc:company-info gnc:*company-name*))
>  ;;(contact (gnc:company-info gnc:*company-contact*))
> @@ -796,8 +796,7 @@
>  
>  
>  (if (not (null? invoice))
> - (let ((book (gncInvoiceGetBook invoice))
> -  (date-object #f)
> + (let ((date-object #f)
>(date-format (gnc:fancy-date-info gnc:*fancy-date-format*))
> (helper-table (gnc:make-html-table))
> (title (title-string default-title custom-title)))
> @@ -828,8 +827,7 @@
>   "50%" "60%")))
>  
> (gnc:html-document-add-object!
> -document (make-myname-table
> -  book date-format title)) ;; Note: date-format is not used 
> for this report
> +document (make-myname-table title))
>  
> (make-break! document)
> (make-break! document)
> diff --git a/src/report/business-reports/invoice.scm 
> b/src/report/business-reports/invoice.scm
> index 094e82a..365ed12 100644
> --- a/src/report/business-reports/invoice.scm
> +++ b/src/report/business-reports/invoice.scm
> @@ -602,7 +602,7 @@
>   'attribute (list "valign" "top"))
>  table))
>  
> -(define (make-myname-table book date-format)
> +(define (make-myname-table date-format)
>(let* ((table (gnc:make-html-table))
>(name (gnc:company-info gnc:*company-name*))
>(addy (gnc:company-info gnc:*company-addy*)))
> @@ -691,8 +691,7 @@
>   (gncInvoiceGetID invoice)))
>  
>  (if (not (null? invoice))
> - (let* ((book (gncInvoiceGetBook invoice))
> -   (date-format (gnc:fancy-date-info gnc:*fancy-date-format*)))
> + (let* ((date-format (gnc:fancy-date-info gnc:*fancy-date-format*)))
> (set! table (make-entry-table invoice
>   (gnc:report-options report-obj)
>   add-order cust-doc? credit-note?))
> @@ -705,7 +704,7 @@
>  
> (gnc:html-document-add-object!
>  document
> -(make-myname-table book date-format))
> +(make-myname-table date-format))
>  
> (let ((date-table #f)
>   (post-date (gncInvoiceGetDatePosted invoice))
> diff --git a/src/report/business-reports/job-report.scm 
> b/src/report/business-reports/job-report.scm
> index dfb8e40..f909330 100644
> --- a/src/report/business-reports/job-report.scm
> +++ b/src/report/business-reports/job-report.scm
> @@ -506,7 +506,7 @@
>   'attribute (list "valign" "top"))
>  table))
>  
> -(define (make-myname-table book date-format)
> +(defin

Re: gnucash master: Multiple changes pushed

2014-12-08 Thread John Ralls

> On Dec 8, 2014, at 11:33 AM, Geert Janssens  
> wrote:
> 
> John,
> 
> How do you explain this push ? It's a push to master yet with several commits 
> from maint. I 
> don't see a merge happen from maint to master though ? Did you cherry-pick 
> them ?
> 

Geert,

No, I merged, but it did a fast-forward, and I guess I wasn’t paying close 
enough attention to recognize the fast forward and that it didn’t ask me for a 
commit message for the merge commit.

It’s a bit surprising to me that it was able to do a fast-forward merge from 
maint considering how different they are now.

$ Manjusri:ter-git/src/gnucash-git> git branch -t maint origin/maint
Branch maint set up to track remote branch maint from origin.
$ Manjusri:ter-git/src/gnucash-git> git merge maint
Auto-merging src/test-core/Makefile.am
Auto-merging src/report/stylesheets/Makefile.am
Auto-merging src/engine/Makefile.am
Merge made by the 'recursive' strategy.
 .gitattributes|3 +-
 Makefile.am   |1 +
 po/de.po  | 1955 -
 src/app-utils/Makefile.am |   13 +-
 src/app-utils/business-prefs.scm  |2 +-
 src/business/business-gnome/Makefile.am   |   16 +-
 src/core-utils/Makefile.am|3 +-
 src/engine/Makefile.am|9 +-
 src/gnc-module/Makefile.am|2 +-
 src/gnome-utils/Makefile.am   |   11 +-
 src/import-export/qif-imp/Makefile.am |   18 +-
 src/report/business-reports/Makefile.am   |   12 +-
 src/report/locale-specific/us/Makefile.am |   14 +-
 src/report/report-gnome/Makefile.am   |8 +-
 src/report/report-system/Makefile.am  |   15 +-
 src/report/report-system/html-jqplot.scm  |4 +-
 src/report/standard-reports/Makefile.am   |   17 +-
 src/report/stylesheets/Makefile.am|   10 +-
 src/report/utility-reports/Makefile.am|8 +-
 src/scm/Makefile.am   |3 +-
 src/scm/gnumeric/Makefile.am  |3 +-
 src/tax/us/Makefile.am|5 +-
 src/tax/us/de_DE.scm  |   11 +-
 src/tax/us/txf-de_DE.scm  |2 +-
 src/test-core/Makefile.am |2 +-
 25 files changed, 976 insertions(+), 1171 deletions(-)
$ Manjusri:ter-git/src/gnucash-git>

Regards,
John Ralls



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-12-08 Thread Geert Janssens
John,

How do you explain this push ? It's a push to master yet with several commits 
from maint. I 
don't see a merge happen from maint to master though ? Did you cherry-pick them 
?

Geert

On Monday 08 December 2014 00:55:58 John Ralls wrote:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/85c1b229
> (commit) via  https://github.com/Gnucash/gnucash/commit/f649da86
> (commit) via  https://github.com/Gnucash/gnucash/commit/689a25e5
> (commit) via  https://github.com/Gnucash/gnucash/commit/67c0c41e
> (commit) via  https://github.com/Gnucash/gnucash/commit/a41a6d63
> (commit) via  https://github.com/Gnucash/gnucash/commit/3061d31f
> (commit) via  https://github.com/Gnucash/gnucash/commit/9a3a0a85
> (commit) via  https://github.com/Gnucash/gnucash/commit/d764f766
> (commit) via  https://github.com/Gnucash/gnucash/commit/8df25243
> (commit) via  https://github.com/Gnucash/gnucash/commit/42da6bd9
> (commit) via  https://github.com/Gnucash/gnucash/commit/3ea118b6
> (commit) via  https://github.com/Gnucash/gnucash/commit/8fa47414
> (commit) via  https://github.com/Gnucash/gnucash/commit/1179a79a
> (commit) via  https://github.com/Gnucash/gnucash/commit/13f5b478
> (commit) via  https://github.com/Gnucash/gnucash/commit/b49f6496
> (commit) via  https://github.com/Gnucash/gnucash/commit/6d6f95bb
> (commit) from  https://github.com/Gnucash/gnucash/commit/4654f49d
> (commit)
> 
> 
> 
> commit 85c1b2293b51e77e27c61b83f9814e6bc1bb23ad
> Author: John Ralls 
> Date:   Sun Dec 7 21:54:24 2014 -0800
> 
> Except latest Apple clang from long-form error messages.
> 
> commit f649da86f8d2c3f91635da1ffd47932ca2149484
> Author: John Ralls 
> Date:   Sun Dec 7 21:53:23 2014 -0800
> 
> Fix up test makefiles to provide linkage paths for Guile2.
> 
> Which is apparently not as smart as Guile1 when loading for libs
> in the current directory.
> 
> commit 689a25e56f99608acae336d1d19ade124f739902
> Author: John Ralls 
> Date:   Sun Dec 7 15:38:40 2014 -0800
> 
> More Guile compilation library links, needed in master but not
> maint.
> 
> commit 67c0c41e920e4fad91b1d83ca8b0a12f4d167e7e
> Author: Frank H. Ellenberger 
> Date:   Fri Dec 5 09:41:50 2014 +0100
> 
> Add ChangeLog.2013 to dist_doc_DATA
> 
> Happy New Year! ;-)
> 
> commit a41a6d635968b86b883da340fcc6ed9857f5148e
> Author: Frank H. Ellenberger 
> Date:   Tue Dec 2 15:33:49 2014 +0100
> 
> Update of de.po: 152 + 38 remaining
> 
> commit 3061d31f0697498a5dc0b3d517f53ef3a64eb0f8
> Author: Geert Janssens 
> Date:   Wed Dec 3 12:04:49 2014 +0100
> 
> Yet another guile 2 precompile fix of the German tax report
> 
> The previous one only fixed part of the problem
> 
> commit 9a3a0a85d1a6ad430ce589802cff0eff8109594d
> Author: Geert Janssens 
> Date:   Wed Dec 3 09:48:49 2014 +0100
> 
> Fix guile 2 precompilation of German tax report
> 
> commit d764f7663c697970860ae5c9c45d7eee280644aa
> Author: John Ralls 
> Date:   Tue Dec 2 09:47:20 2014 -0800
> 
> Guile compilation: One missed CLEANFILES.
> 
> commit 8df252436ab35ba239dded3e25cc5c03b62bf70e
> Author: John Ralls 
> Date:   Tue Dec 2 09:30:58 2014 -0800
> 
> Fix the *.win32-bin.txt and downloaded.mt940 attributes.
> 
> commit 42da6bd96eaaa0cb6b70986bdb720a8a9d1badc7
> Author: John Ralls 
> Date:   Tue Dec 2 09:03:11 2014 -0800
> 
> Guile precompilation: One more missing library-dir.
> 
> commit 3ea118b6b4a2378b7dd3a418d884d40fb5da3895
> Author: John Ralls 
> Date:   Tue Dec 2 08:24:57 2014 -0800
> 
> Reapply fix of Guile precompilation without unwanted change in
> gnc-numeric.c.
> 
> commit 8fa4741438ab09608fa4634cd4304c8ebf6e6d9b
> Author: John Ralls 
> Date:   Tue Dec 2 08:18:06 2014 -0800
> 
> Revert "Fix Guile-2.0 precompilation."
> 
> This reverts commit a26801ab0e12ba44e9dc505ce87dc11ebd26a4ac.
> 
> commit 1179a79a0124de7920d5b29ece9fb72db9f780df
> Author: John Ralls 
> Date:   Mon Dec 1 15:36:48 2014 -0800
> 
> Fix Guile-2.0 precompilation.
> 
> commit 13f5b478722a0a6e8c1b44985c8d3745774e3cb2
> Author: Frank H. Ellenberger 
> Date:   Mon Dec 1 14:07:16 2014 +0100
> 
> Update of de.po: 351 +50 remaining
> 
> commit b49f64961c38ed05e58cc959ce6a54fd30283a2e
> Author: John Ralls 
> Date:   Sun Nov 30 16:08:00 2014 -0800
> 
> Bug 738477 - WebKit is broken on Win32.
> 
> Turns out our URL for loading jqplot is what was broken.
> 
> commit 6d6f95bb9bfce9efba344d9d7ea78653b41ceb71
> Author: Frank H. Ellenberger 
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-08-23 Thread Geert Janssens
On Friday 22 August 2014 19:45:07 John Ralls wrote:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/dd10aab5
> (commit) via  https://github.com/Gnucash/gnucash/commit/3f8718ea
> (commit) via  https://github.com/Gnucash/gnucash/commit/bad092a4
> (commit) from  https://github.com/Gnucash/gnucash/commit/1134d64a
> (commit)
> 
> 
> 
> commit dd10aab53a3fde04f05fe6399496b36e625b4c37
> Author: John Ralls 
> Date:   Thu Jul 31 12:00:06 2014 -0700
> 
> Balance ENTER with a LEAVE for all exit points.
> 
> For xaccLotFill and xaccLotScrubDoubleBalance, anyway.
> 
Funny - Last week I had prepared a commit to fix exactly the same issue in the 
scrub 
functions. I'll go and check now if my commit had some additional changes worth 
pushing ;)

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-08-08 Thread Aaron Laws
Jralls,

Thanks, these will be very helpful! I'm sure I wouldn't have come up with
that perl replacement for grep.


In Christ,
Aaron Laws


On Fri, Aug 8, 2014 at 6:15 PM, John Ralls  wrote:

> Updated  via  https://github.com/Gnucash/gnucash/commit/e25c2a34 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/063b9c57 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/10cd33f9 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/0ddd9db0 (commit)
> from  https://github.com/Gnucash/gnucash/commit/367b608f (commit)
>
>
>
> commit e25c2a34b9e9995936010d5577aa588165d1a61c
> Author: John Ralls 
> Date:   Fri Aug 8 15:15:23 2014 -0700
>
> POTFILES.in resulting from previous make-gnucash-potfiles changes.
>
> commit 063b9c57f4ed9cfe9edb8150c1161ac479003174
> Author: John Ralls 
> Date:   Fri Aug 8 13:43:43 2014 -0700
>
> Remove a bunch of no-longer-existing files from POTFILES.skip.
>
> commit 10cd33f9f584f74fe2c2ac1a827d3c8c4ac06d09
> Author: John Ralls 
> Date:   Fri Aug 8 13:37:38 2014 -0700
>
> Add *.cpp to the search pattern for files to translate.
>
> Exclude the files in src/gnc and src/optional/gtkmm; they shouldn't
> have
> any user-visible strings.
>
> commit 0ddd9db0a213ef24186df4353aa6ae9fd26d6939
> Author: John Ralls 
> Date:   Fri Aug 8 13:31:29 2014 -0700
>
> Use perl instead of grep to scan POTFILES.ignore and POTFILES.skip
>
> No point in shelling out of perl to do what perl does best; besides,
> grep
> has environment settings that can break our parsing of the result.
>
>
>
> Summary of changes:
>  make-gnucash-potfiles.in | 19 +++
>  po/POTFILES.in   | 22 +-
>  po/POTFILES.skip | 21 +
>  3 files changed, 41 insertions(+), 21 deletions(-)
>
> ___
> gnucash-patches mailing list
> gnucash-patc...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-09 Thread John Ralls

On Jul 9, 2014, at 3:05 AM, Tim Janssen  wrote:

> Hello gnucash-devel,
> 
> I've been following this thread and trying to compile GnuCash myself and have 
> been getting the same error about unrecognised command line option but have 
> gotten different results through experimenting.
> 
> First of all, I'm running Arch Linux 64bit. And gcc/g++ version 4.9.0. I'm 
> trying to compile the latest source from git as of July 8, around 14:00 EDT.
> 
> $ gcc --version
> gcc (GCC) 4.9.0 20140604 (prerelease)
> Copyright (C) 2014 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> I ran ./configure with the --disable--error-on-warning option just so one 
> warning won't halt the whole compile.
> 
> When compiling, sometimes there are two warnings: a warning about 
> FORTIFY_SOURCE and a warning about the unrecognised command line option 
> -Wno-non-literal-null-conversion:
> 
> In file included from /usr/include/string.h:25:0,
>  from swig-core-utils-guile.c:300:
> /usr/include/features.h:341:4: warning: #warning _FORTIFY_SOURCE requires 
> compiling with optimization (-O) [-Wcpp]
>  #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
> ^
> cc1: warning: unrecognized command line option 
> "-Wno-non-literal-null-conversion"
> 
> 
> These two warnings always appear together. Like Sumit, I tried compiling some 
> trivial C and C++ programs with that compiler option to see what would 
> happen. Neither gcc nor g++ issued warnings or erros about using that 
> argument when I tried it on my sample code.
> 
> $ make
> gcc -c -Wall -Wno-non-literal-null-conversion -Werror -o main.o main.c 
> gcc -c -Wall -Wno-non-literal-null-conversion -Werror -o foo.o foo.c
> gcc -o main main.o foo.o
> $ 
> 
> 
> $ make
> g++ -c -Wall -Wno-non-literal-null-conversion -Werror -std=c++11 -o main.o 
> main.cpp
> g++ -c -Wall -Wno-non-literal-null-conversion -Werror -std=c++11 -o foo.o 
> foo.cpp
> g++ -c -Wall -Wno-non-literal-null-conversion -Werror -std=c++11 -o bar.o 
> bar.cpp
> g++ -o main main.o foo.o bar.o
> $ 
> 
> 
> The wierd part: I changed configure.ac around line 1318 to add the -O2 option 
> to CFLAGS and CXXFLAGS. (I doubt this is the right way to do it, but I'm not 
> too familliar with the GNU build system, and I'm doing it just to see what 
> would happen). 
> 
> # This has to come after AC_PROG_CC _AND_ GNOME_COMPILE_WARNINGS
> AC_LANG([C++])
> AX_CHECK_COMPILE_FLAG([-Wno-deprecated-register],
> [AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-unused -Wno-deprecated-register -O2"],
> [AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-unused"], [-Werror])
> AC_LANG([C])
> AX_CHECK_COMPILE_FLAG([-Wno-non-literal-null-conversion],
> [AM_CFLAGS="${AM_CFLAGS} -Wno-non-literal-null-conversion -O2"],
> [], [-Werror])
> 
> 
> After making this change and running autogen.sh, configure, and make, the 
> warning about FORTIFY_SOURCE still appears about 4 times. But, the warning 
> about -Wno-non-literal-null-conversion has disappeared.
> 
> gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../lib/libc 
> -I../../../../src -I../../../../src/core-utils -I../../../../src/gnc-module 
> -I../../../../src/test-core -I../../../../src/engine 
> -I../../../../src/engine/test-core -I../../../../src/backend/sql 
> -I../../../../src/libqof/qof -pthread -I/usr/include/glib-2.0 
> -I/usr/lib/glib-2.0/include  -D_FORTIFY_SOURCE=2 -pthread  
> -DG_LOG_DOMAIN=\"gnc.backend.sql\"  -DTESTPROG=test_sqlbe -I. -I../../../.. 
> -I../../../../src/backend/sql/ -I../../../../src/backend/dbi/ 
> -I../../../../src/libqof/qof/ -I../../../../src/test-core/ -pthread 
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -g  -g  -MT 
> test_sqlbe-utest-gnc-backend-sql.o -MD -MP -MF 
> .deps/test_sqlbe-utest-gnc-backend-sql.Tpo -c -o 
> test_sqlbe-utest-gnc-backend-sql.o `test -f 'utest-gnc-backend-sql.c' || echo 
> './'`utest-gnc-backend-sql.c
> In file included from /usr/include/string.h:25:0,
>  from utest-gnc-backend-sql.c:24:
> /usr/include/features.h:341:4: warning: #warning _FORTIFY_SOURCE requires 
> compiling with optimization (-O) [-Wcpp]
>  #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
> ^
> mv -f .deps/test_sqlbe-utest-gnc-backend-sql.Tpo 
> .deps/test_sqlbe-utest-gnc-backend-sql.Po
> 
> I noticed that, for the files that still emit the FORTIFY_SOURCE warning when 
> compiled, the CFLAGS in the configure.ac file are not being used. My -O2 and 
> the -Wno-non-literal-null-conversion don't show up in the terminal.
> 
> 
> So, it seems trying to eliminate one compiler warning not only doesn't work 
> but somehow eliminates another completely unrelated compiler warning.
> 
> I post this in the hopes that it might help someone much smarter than me 
> figure out what's actually going on.

That's interesting. 

I don't see  -DFORTIFY_SOURCE, -Wno-non-literal

Re: gnucash master: Multiple changes pushed

2014-07-08 Thread Tim Janssen
Hello gnucash-devel,

I've been following this thread and trying to compile GnuCash myself and
have been getting the same error about unrecognised command line option but
have gotten different results through experimenting.

First of all, I'm running Arch Linux 64bit. And gcc/g++ version 4.9.0. I'm
trying to compile the latest source from git as of July 8, around 14:00 EDT.

$ gcc --version
gcc (GCC) 4.9.0 20140604 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I ran ./configure with the --disable--error-on-warning option just so one
warning won't halt the whole compile.

When compiling, sometimes there are two warnings: a warning about
FORTIFY_SOURCE and a warning about the unrecognised command line option
-Wno-non-literal-null-conversion:

In file included from /usr/include/string.h:25:0,
 from swig-core-utils-guile.c:300:
/usr/include/features.h:341:4: warning: #warning _FORTIFY_SOURCE requires
compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
cc1: warning: unrecognized command line option
"-Wno-non-literal-null-conversion"


These two warnings always appear together. Like Sumit, I tried compiling
some trivial C and C++ programs with that compiler option to see what would
happen. Neither gcc nor g++ issued warnings or erros about using that
argument when I tried it on my sample code.

$ make
gcc -c -Wall -Wno-non-literal-null-conversion -Werror -o main.o main.c
gcc -c -Wall -Wno-non-literal-null-conversion -Werror -o foo.o foo.c
gcc -o main main.o foo.o
$


$ make
g++ -c -Wall -Wno-non-literal-null-conversion -Werror -std=c++11 -o main.o
main.cpp
g++ -c -Wall -Wno-non-literal-null-conversion -Werror -std=c++11 -o foo.o
foo.cpp
g++ -c -Wall -Wno-non-literal-null-conversion -Werror -std=c++11 -o bar.o
bar.cpp
g++ -o main main.o foo.o bar.o
$


The wierd part: I changed configure.ac around line 1318 to add the -O2
option to CFLAGS and CXXFLAGS. (I doubt this is the right way to do it, but
I'm not too familliar with the GNU build system, and I'm doing it just to
see what would happen).

# This has to come after AC_PROG_CC _AND_ GNOME_COMPILE_WARNINGS
AC_LANG([C++])
AX_CHECK_COMPILE_FLAG([-Wno-deprecated-register],
[AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-unused -Wno-deprecated-register -O2"],
[AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-unused"], [-Werror])
AC_LANG([C])
AX_CHECK_COMPILE_FLAG([-Wno-non-literal-null-conversion],
[AM_CFLAGS="${AM_CFLAGS} -Wno-non-literal-null-conversion -O2"],
[], [-Werror])


After making this change and running autogen.sh, configure, and make, the
warning about FORTIFY_SOURCE still appears about 4 times. But, the warning
about -Wno-non-literal-null-conversion has disappeared.

gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../lib/libc
-I../../../../src -I../../../../src/core-utils -I../../../../src/gnc-module
-I../../../../src/test-core -I../../../../src/engine
-I../../../../src/engine/test-core -I../../../../src/backend/sql
-I../../../../src/libqof/qof -pthread -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include  -D_FORTIFY_SOURCE=2 -pthread
-DG_LOG_DOMAIN=\"gnc.backend.sql\"  -DTESTPROG=test_sqlbe -I. -I../../../..
-I../../../../src/backend/sql/ -I../../../../src/backend/dbi/
-I../../../../src/libqof/qof/ -I../../../../src/test-core/ -pthread
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -g  -g  -MT
test_sqlbe-utest-gnc-backend-sql.o -MD -MP -MF
.deps/test_sqlbe-utest-gnc-backend-sql.Tpo -c -o
test_sqlbe-utest-gnc-backend-sql.o `test -f 'utest-gnc-backend-sql.c' ||
echo './'`utest-gnc-backend-sql.c
In file included from /usr/include/string.h:25:0,
 from utest-gnc-backend-sql.c:24:
/usr/include/features.h:341:4: warning: #warning _FORTIFY_SOURCE requires
compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
mv -f .deps/test_sqlbe-utest-gnc-backend-sql.Tpo
.deps/test_sqlbe-utest-gnc-backend-sql.Po

I noticed that, for the files that still emit the FORTIFY_SOURCE warning
when compiled, the CFLAGS in the configure.ac file are not being used. My
-O2 and the -Wno-non-literal-null-conversion don't show up in the terminal.


So, it seems trying to eliminate one compiler warning not only doesn't work
but somehow eliminates another completely unrelated compiler warning.

I post this in the hopes that it might help someone much smarter than me
figure out what's actually going on.


Tim




On Tue, Jul 8, 2014 at 2:40 PM, John Ralls  wrote:

>
> On Jul 8, 2014, at 4:43 PM, Sumit Bhardwaj  wrote:
>
> > On Mon, Jul 7, 2014 at 11:38 AM, John Ralls  wrote:
> >
> > On Jul 7, 2014, at 4:03 PM, Sumit Bhardwaj  wrote:
> >> Hi John,
> >>
> >> Sumit,
> >>
> >> I don't understand how you concluded that the AM_CXXFLAGS are being
> included when make builds gfec.c, 

Re: gnucash master: Multiple changes pushed

2014-07-08 Thread John Ralls

On Jul 8, 2014, at 4:43 PM, Sumit Bhardwaj  wrote:

> On Mon, Jul 7, 2014 at 11:38 AM, John Ralls  wrote:
> 
> On Jul 7, 2014, at 4:03 PM, Sumit Bhardwaj  wrote:
>> Hi John,
>> 
>> Sumit,
>> 
>> I don't understand how you concluded that the AM_CXXFLAGS are being included 
>> when make builds gfec.c, nor do I understand why you think that it's using 
>> g++. The command make emitted when it failed was:
  gcc -DHAVE_CONFIG_H -I. -I../.. -Wno-error=deprecated-declarations 
 -I../../lib/libc -I../../src -I../../src -I../../src/gnc-module 
 -I../../src/app-utils/calculation -I../../src/core-utils 
 -I../../src/engine -I../../src/libqof/qof -I../../src/backend/xml -pthread 
 -I/usr/include/guile/2.0 -pthread -I/usr/include/glib-2.0 
 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtk-2.0 
 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 
 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 
 -I/usr/include/libdrm -I/usr/include/libpng16 
 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 
 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 
 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include 
 -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libxml2 
 -DG_LOG_DOMAIN=\"gnc.app-utils\" -Werror -Wdeclaration-after-statement 
 -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes 
 -Wmissing-declarations -Wno-non-li!
 teral-null-conversion -Wno-unused -g -O2 -MT gfec.lo -MD -MP -MF 
.deps/gfec.Tpo -c gfec.c  -fPIC -DPIC -o .libs/gfec.o 
>> 
>> Clearly showing that it's calling gcc and clearly not including 
>> -Wno-deprecated-register.
>> 
>> Apologies for not being clear. This compile shouldn't cause problem if the 
>> compiler was gcc. My test
>> gcc   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations  
>> -Wno-non-literal-null-
>> conversion -Wno-unused -g -O2 -Werror -D_FORTIFY_SOURCE=2 helloworld.c
>> worked without any problems, but the test with g++ threw the error saying 
>> -Wno-non-literal-null-conversion is not a valid option.
> 
> Yeah, I got that. What I don't understand is why you think that's germane 
> when it's clearly gcc that's failing to compile gfec.c and it's clearly cc1, 
> not cc1plus, that's rejecting the -Wno-non-literal-null-conversion argument.
> 
> My hypothesis is based on the experiment on the trivial helloworld.c with gcc 
> and g++. While gcc compiles and links with the 
> -Wno-non-literal-null-conversion argument, g++ doesn't.
> 
> My hypothesis for the fail step is that cc1plus is invoked in the background 
> which bonks with this argument. I will google to see if that's the behavior 
> in mixed (C and C++) codebases.

You can test that by pasting the gcc invocation directly to a command prompt. 
If gfec.c compiles that way, you're hypothesis is proved and make or libtool is 
doing something sttange; if not, the problem is in gcc or maybe something about 
gfec.c. It's perhaps significant that app-utils is about halfway through the 
compilation, so lots of files have compiled quite happily with that argument.

> 
> So adding actual code to be compiled doesn't make any difference, it still 
> passes only to fail later. Rats.
> Of course, we can drop this argument as a workaround. Barring that, configure 
> is setting CFLAGS and CXXFLAGS correctly.  Rats indeed!

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-08 Thread Sumit Bhardwaj
>
> On Mon, Jul 7, 2014 at 11:38 AM, John Ralls  wrote:
>
> On Jul 7, 2014, at 4:03 PM, Sumit Bhardwaj  wrote:
>
> Hi John,
>
> Sumit,
>>
>> I don't understand how you concluded that the AM_CXXFLAGS are being
>> included when make builds gfec.c, nor do I understand why you think that
>> it's using g++. The command make emitted when it failed was:
>>
>>  gcc -DHAVE_CONFIG_H -I. -I../.. -Wno-error=deprecated-declarations
>> -I../../lib/libc -I../../src -I../../src -I../../src/gnc-module
>> -I../../src/app-utils/calculation -I../../src/core-utils -I../../src/engine
>> -I../../src/libqof/qof -I../../src/backend/xml -pthread
>> -I/usr/include/guile/2.0 -pthread -I/usr/include/glib-2.0
>> -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtk-2.0
>> -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0
>> -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1
>> -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
>> -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
>> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
>> -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2
>> -I/usr/include/libxml2 -I/usr/include/libxml2
>> -DG_LOG_DOMAIN=\"gnc.app-utils\" -Werror -Wdeclaration-after-statement
>> -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes
>> -Wmissing-declarations -Wno-non-literal-null-conversion -Wno-unused -g -O2
>> -MT gfec.lo -MD -MP -MF .deps/gfec.Tpo -c gfec.c  -fPIC -DPIC -o
>> .libs/gfec.o
>>
>>
>> Clearly showing that it's calling gcc and clearly not including
>> -Wno-deprecated-register.
>
>
> Apologies for not being clear. This compile shouldn't cause problem if the
> compiler was gcc. My test
>
>> gcc   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
>>> -Wno-non-literal-null-
>>> conversion -Wno-unused -g -O2 -Werror -D_FORTIFY_SOURCE=2 helloworld.c
>>>
>> worked without any problems, but the test with g++ threw the error saying
> -Wno-non-literal-null-conversion is not a valid option.
>
>
> Yeah, I got that. What I don't understand is why you think that's germane
> when it's clearly gcc that's failing to compile gfec.c and it's clearly
> cc1, not cc1plus, that's rejecting the -Wno-non-literal-null-conversion
> argument.
>

My hypothesis is based on the experiment on the trivial helloworld.c with
gcc and g++. While gcc compiles and links with the
-Wno-non-literal-null-conversion argument, g++ doesn't.

My hypothesis for the fail step is that cc1plus is invoked in the
background which bonks with this argument. I will google to see if that's
the behavior in mixed (C and C++) codebases.

So adding actual code to be compiled doesn't make any difference, it still
> passes only to fail later. Rats.
>
Of course, we can drop this argument as a workaround. Barring that,
configure is setting CFLAGS and CXXFLAGS correctly.  Rats indeed!


> Regards,
> John Ralls
>

Cheers,
Sumit
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-07 Thread John Ralls

On Jul 7, 2014, at 4:03 PM, Sumit Bhardwaj  wrote:

> Hi John,
> 
> Sumit,
> 
> I don't understand how you concluded that the AM_CXXFLAGS are being included 
> when make builds gfec.c, nor do I understand why you think that it's using 
> g++. The command make emitted when it failed was:
>>>  gcc -DHAVE_CONFIG_H -I. -I../.. -Wno-error=deprecated-declarations 
>>> -I../../lib/libc -I../../src -I../../src -I../../src/gnc-module 
>>> -I../../src/app-utils/calculation -I../../src/core-utils -I../../src/engine 
>>> -I../../src/libqof/qof -I../../src/backend/xml -pthread 
>>> -I/usr/include/guile/2.0 -pthread -I/usr/include/glib-2.0 
>>> -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtk-2.0 
>>> -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 
>>> -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 
>>> -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 
>>> -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
>>> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
>>> -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 
>>> -I/usr/include/libxml2 -I/usr/include/libxml2 
>>> -DG_LOG_DOMAIN=\"gnc.app-utils\" -Werror -Wdeclaration-after-statement 
>>> -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes 
>>> -Wmissing-declarations -Wno-non-lit!
 eral-null-conversion -Wno-unused -g -O2 -MT gfec.lo -MD -MP -MF .deps/gfec.Tpo 
-c gfec.c  -fPIC -DPIC -o .libs/gfec.o 
> 
> Clearly showing that it's calling gcc and clearly not including 
> -Wno-deprecated-register.
> 
> Apologies for not being clear. This compile shouldn't cause problem if the 
> compiler was gcc. My test
> gcc   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations  
> -Wno-non-literal-null-
> conversion -Wno-unused -g -O2 -Werror -D_FORTIFY_SOURCE=2 helloworld.c
> worked without any problems, but the test with g++ threw the error saying 
> -Wno-non-literal-null-conversion is not a valid option.

Yeah, I got that. What I don't understand is why you think that's germane when 
it's clearly gcc that's failing to compile gfec.c and it's clearly cc1, not 
cc1plus, that's rejecting the -Wno-non-literal-null-conversion argument.

> 
> What does the no-non-literal-null-conversion section of config.log look like 
> with the modified AX_CHECK_COMPILE_FLAG?
> Here you go:
> configure:25427: g++ -c -g -O2 -std=gnu++11 -Werror -Wno-deprecated-register  
> conftest.cpp >&5
> configure:25427: $? = 0
> configure:25435: result: yes
> configure:25449: checking whether C compiler accepts 
> -Wno-non-literal-null-conversion
> configure:25468: gcc -c -g -O2 -Werror -Wno-non-literal-null-conversion  
> conftest.c >&5
> configure:25468: $? = 0
> configure:25476: result: yes
> configure:25484: checking what extra warning flags to pass to the C compiler
> configure:25547: gcc -c  -Wall -Wunused -Wmissing-prototypes 
> -Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused -g -O2 
> -Werror -D_FORTIFY_SOURCE=2  conftest.c >&5
> configure:25547: $? = 0
> configure:25560: result:  -Werror -Wdeclaration-after-statement 
> -Wno-pointer-sign -D_FORTIFY_SOURCE=2

So adding actual code to be compiled doesn't make any difference, it still 
passes only to fail later. Rats.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-07 Thread John Ralls

On Jul 7, 2014, at 4:16 PM, Geert Janssens  wrote:

> On Sunday 06 July 2014 19:29:11 John Ralls wrote:
> > On Jul 6, 2014, at 7:15 PM, Geert Janssens  
> > wrote:
> > > John,
> > > 
> > > I will be away on holidays soon. If you think my commit should be
> > > reverted, feel free to do so. I doubt I will have much online time
> > > available while I'm gone.
> > Geert,
> > 
> > Yeah, you're not likely to have good connectivity. No worries, enjoy
> > your trip. We had a lovely day at the Brussels and Chocolate Museums
> > at the Gross Markt, finishing up at Delerium. It didn't start to rain
> > seriously until we got back to the apartment.
> > 
> Nice. I hope you found some nice beers to try in Delirium.
>  
> > I hope to keep the change to configure.ac and fix
> > m4_ax_check_compile_flag; once it works reliably we'll want
> > everything that's wrapped in "if gcc" to use it instead, because it's
> > much better practice to test the feature than to rely on
> > compiler/version settings.
> > 
> That would be much better indeed. Do we want to send patches for our fixes to 
> m4_ax_check_compile_flag back upstream where you got the original script from 
> ?

Only if we come up with a change that makes a difference. Sumit's latest 
results say we're not there yet.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-07 Thread Geert Janssens
On Sunday 06 July 2014 19:29:11 John Ralls wrote:
> On Jul 6, 2014, at 7:15 PM, Geert Janssens  wrote:
> > John,
> > 
> > I will be away on holidays soon. If you think my commit should be
> > reverted, feel free to do so. I doubt I will have much online time
> > available while I'm gone.
> Geert,
> 
> Yeah, you're not likely to have good connectivity. No worries, enjoy
> your trip. We had a lovely day at the Brussels and Chocolate Museums
> at the Gross Markt, finishing up at Delerium. It didn't start to rain
> seriously until we got back to the apartment.
> 
Nice. I hope you found some nice beers to try in Delirium.

> I hope to keep the change to configure.ac and fix
> m4_ax_check_compile_flag; once it works reliably we'll want
> everything that's wrapped in "if gcc" to use it instead, because it's
> much better practice to test the feature than to rely on
> compiler/version settings.
> 
That would be much better indeed. Do we want to send patches for our fixes to 
m4_ax_check_compile_flag back upstream where you got the original script from ?

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-07 Thread Sumit Bhardwaj
Hi John,

Sumit,
>
> I don't understand how you concluded that the AM_CXXFLAGS are being
> included when make builds gfec.c, nor do I understand why you think that
> it's using g++. The command make emitted when it failed was:
>
>  gcc -DHAVE_CONFIG_H -I. -I../.. -Wno-error=deprecated-declarations
> -I../../lib/libc -I../../src -I../../src -I../../src/gnc-module
> -I../../src/app-utils/calculation -I../../src/core-utils -I../../src/engine
> -I../../src/libqof/qof -I../../src/backend/xml -pthread
> -I/usr/include/guile/2.0 -pthread -I/usr/include/glib-2.0
> -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtk-2.0
> -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0
> -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1
> -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
> -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
> -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2
> -I/usr/include/libxml2 -I/usr/include/libxml2
> -DG_LOG_DOMAIN=\"gnc.app-utils\" -Werror -Wdeclaration-after-statement
> -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes
> -Wmissing-declarations -Wno-non-literal-null-conversion -Wno-unused -g -O2
> -MT gfec.lo -MD -MP -MF .deps/gfec.Tpo -c gfec.c  -fPIC -DPIC -o
> .libs/gfec.o
>
>
> Clearly showing that it's calling gcc and clearly not including
> -Wno-deprecated-register.


Apologies for not being clear. This compile shouldn't cause problem if the
compiler was gcc. My test

> gcc   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
>> -Wno-non-literal-null-
>> conversion -Wno-unused -g -O2 -Werror -D_FORTIFY_SOURCE=2 helloworld.c
>>
> worked without any problems, but the test with g++ threw the error saying
-Wno-non-literal-null-conversion is not a valid option.

What does the no-non-literal-null-conversion section of config.log look
> like with the modified AX_CHECK_COMPILE_FLAG?
>
Here you go:

> configure:25427: g++ -c -g -O2 -std=gnu++11 -Werror
> -Wno-deprecated-register  conftest.cpp >&5
> configure:25427: $? = 0
> configure:25435: result: yes
> configure:25449: checking whether C compiler accepts
> -Wno-non-literal-null-conversion
> configure:25468: gcc -c -g -O2 -Werror -Wno-non-literal-null-conversion
> conftest.c >&5
> configure:25468: $? = 0
> configure:25476: result: yes
> configure:25484: checking what extra warning flags to pass to the C
> compiler
> configure:25547: gcc -c  -Wall -Wunused -Wmissing-prototypes
> -Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused -g -O2
> -Werror -D_FORTIFY_SOURCE=2  conftest.c >&5
> configure:25547: $? = 0
> configure:25560: result:  -Werror -Wdeclaration-after-statement
> -Wno-pointer-sign -D_FORTIFY_SOURCE=2
>

Regards,
> John Ralls
>

Thanks,
Sumit


On Sun, Jul 6, 2014 at 11:25 PM, John Ralls  wrote:

>
> On Jul 7, 2014, at 2:07 AM, Sumit Bhardwaj  wrote:
>
> Just a quick update so everyone is on the same page: problem is not with
> macro (autogen.sh) or configure. It seems the call for gfec.c mixes CFLAGS
> and CXXFLAGS and then cc1plus or cc1 throws error. Diagnosis below.
>
> I did have to make changes in macros/m4_ax_check_compile_flag.m4. I pushed
> those changes to my github as well.
>
> Next step will be to see how make is using/setting the flags. I will try
> to look at that later. Do let me know if I am going on wrong track. Any
> help in expediting appreciated.
>
>
> Thanks,
> Sumit
>
> Here is my attempt at getting to the bottom of the problem:
> g++   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
> -Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror
> -D_FORTIFY_SOURCE=2 helloworld.c
> throws error while
> gcc   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
> -Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror
> -D_FORTIFY_SOURCE=2 helloworld.c
> works correctly. Having helloworld.cpp for g++ doesn't change anything.
>
> Moreover, CFLAGS and CXXFLAGS are set correctly.
> AM_CFLAGS =  -Werror -Wdeclaration-after-statement -Wno-pointer-sign
> -D_FORTIFY_SOURCE=2  -Wall -Wunused -Wmissing-prototypes
> -Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused
> AM_CXXFLAGS =  -Werror  -Wall -Wno-unused -Wno-deprecated-register
>
>
> Sumit,
>
> I don't understand how you concluded that the AM_CXXFLAGS are being
> included when make builds gfec.c, nor do I understand why you think that
> it's using g++. The command make emitted when it failed was:
>
>  gcc -DHAVE_CONFIG_H -I. -I../.. -Wno-error=deprecated-declarations
> -I../../lib/libc -I../../src -I../../src -I../../src/gnc-module
> -I../../src/app-utils/calculation -I../../src/core-utils -I../../src/engine
> -I../../src/libqof/qof -I../../src/backend/xml -pthread
> -I/usr/include/guile/2.0 -pthread -I/usr/include/glib-2.0
> -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtk-2.0
> -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0
> -I/usr/

Re: gnucash master: Multiple changes pushed

2014-07-06 Thread John Ralls

On Jul 7, 2014, at 2:07 AM, Sumit Bhardwaj  wrote:

> Just a quick update so everyone is on the same page: problem is not with 
> macro (autogen.sh) or configure. It seems the call for gfec.c mixes CFLAGS 
> and CXXFLAGS and then cc1plus or cc1 throws error. Diagnosis below. 
> 
> I did have to make changes in macros/m4_ax_check_compile_flag.m4. I pushed 
> those changes to my github as well.
> 
> Next step will be to see how make is using/setting the flags. I will try to 
> look at that later. Do let me know if I am going on wrong track. Any help in 
> expediting appreciated.
> 
> Thanks,
> Sumit
> 
> Here is my attempt at getting to the bottom of the problem:
> g++   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations  
> -Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror 
> -D_FORTIFY_SOURCE=2 helloworld.c
> throws error while
> gcc   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations  
> -Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror 
> -D_FORTIFY_SOURCE=2 helloworld.c
> works correctly. Having helloworld.cpp for g++ doesn't change anything.
> 
> Moreover, CFLAGS and CXXFLAGS are set correctly.
> AM_CFLAGS =  -Werror -Wdeclaration-after-statement -Wno-pointer-sign 
> -D_FORTIFY_SOURCE=2  -Wall -Wunused -Wmissing-prototypes 
> -Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused
> AM_CXXFLAGS =  -Werror  -Wall -Wno-unused -Wno-deprecated-register

Sumit,

I don't understand how you concluded that the AM_CXXFLAGS are being included 
when make builds gfec.c, nor do I understand why you think that it's using g++. 
The command make emitted when it failed was:
>>  gcc -DHAVE_CONFIG_H -I. -I../.. -Wno-error=deprecated-declarations 
>> -I../../lib/libc -I../../src -I../../src -I../../src/gnc-module 
>> -I../../src/app-utils/calculation -I../../src/core-utils -I../../src/engine 
>> -I../../src/libqof/qof -I../../src/backend/xml -pthread 
>> -I/usr/include/guile/2.0 -pthread -I/usr/include/glib-2.0 
>> -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtk-2.0 
>> -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
>> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm 
>> -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 
>> -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
>> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
>> -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 
>> -I/usr/include/libxml2 -I/usr/include/libxml2 
>> -DG_LOG_DOMAIN=\"gnc.app-utils\" -Werror -Wdeclaration-after-statement 
>> -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes 
>> -Wmissing-declarations -Wno-non-lite!
 ral-null-conversion -Wno-unused -g -O2 -MT gfec.lo -MD -MP -MF .deps/gfec.Tpo 
-c gfec.c  -fPIC -DPIC -o .libs/gfec.o 

Clearly showing that it's calling gcc and clearly not including 
-Wno-deprecated-register.

What does the no-non-literal-null-conversion section of config.log look like 
with the modified AX_CHECK_COMPILE_FLAG?

Regards,
John Ralls

 
> 
> On Sun, Jul 6, 2014 at 10:09 AM, John Ralls  wrote:
> 
> On Jul 6, 2014, at 6:38 PM, Sumit Bhardwaj  wrote:
> 
>> Hi John,
>> 
>> That works - to an extent. gcc fails and the current configuration is:
>>  -Werror -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2
>> 
>> Configure doesn't fail, but that the flags are far fewer than earlier. Is 
>> this, what we want to go ahead with?
>> 
>> If anyone wants to look at the changes in macros/m4_ax_check_compile_flag.m4 
>> and configure.ac, I have pushed the changes to master  repo on my github 
>> (https://github.com/bhardwajs/gnucash).
>> 
>> Cheers,
>> Sumit
>> 
>> P.S. - Apologies for a two-month hiatus. Work drained a lot of time and 
>> energy. Should be better now. :)
> 
> Real life does have a nasty habit of intruding ;-)
> 
> Anyway, what do you mean by "works to an extent"? What we want is for that 
> test to fail in configure and for the rest of GC to compile correctly. If my 
> hack to AX_CHECK_COMPILE_FLAG does that, excellent, I'll push it. If not, 
> please post details so I can figure out the next thing to try -- or figure 
> out a fix yourself and make a patch for one of us to push on your behalf. We 
> can work with a github pull request if that's more convenient for you than a 
> BZ.
> 
> Regards,
> John Ralls
> 
> 

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-06 Thread Sumit Bhardwaj
Just a quick update so everyone is on the same page: problem is not with
macro (autogen.sh) or configure. It seems the call for gfec.c mixes CFLAGS
and CXXFLAGS and then cc1plus or cc1 throws error. Diagnosis below.

I did have to make changes in macros/m4_ax_check_compile_flag.m4. I pushed
those changes to my github as well.

Next step will be to see how make is using/setting the flags. I will try to
look at that later. Do let me know if I am going on wrong track. Any help
in expediting appreciated.

Thanks,
Sumit

Here is my attempt at getting to the bottom of the problem:
g++   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
-Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror
-D_FORTIFY_SOURCE=2 helloworld.c
throws error while
gcc   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
-Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror
-D_FORTIFY_SOURCE=2 helloworld.c
works correctly. Having helloworld.cpp for g++ doesn't change anything.

Moreover, CFLAGS and CXXFLAGS are set correctly.
AM_CFLAGS =  -Werror -Wdeclaration-after-statement -Wno-pointer-sign
-D_FORTIFY_SOURCE=2  -Wall -Wunused -Wmissing-prototypes
-Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused
AM_CXXFLAGS =  -Werror  -Wall -Wno-unused -Wno-deprecated-register

On Sun, Jul 6, 2014 at 10:09 AM, John Ralls  wrote:

>
> On Jul 6, 2014, at 6:38 PM, Sumit Bhardwaj  wrote:
>
> Hi John,
>
> That works - to an extent. gcc fails and the current configuration is:
>  -Werror -Wdeclaration-after-statement -Wno-pointer-sign
> -D_FORTIFY_SOURCE=2
>
> Configure doesn't fail, but that the flags are far fewer than earlier. Is
> this, what we want to go ahead with?
>
> If anyone wants to look at the changes in
> macros/m4_ax_check_compile_flag.m4 and configure.ac, I have pushed the
> changes to master  repo on my github (https://github.com/bhardwajs/gnucash
> ).
>
> Cheers,
> Sumit
>
> P.S. - Apologies for a two-month hiatus. Work drained a lot of time and
> energy. Should be better now. :)
>
>
> Real life does have a nasty habit of intruding ;-)
>
> Anyway, what do you mean by "works to an extent"? What we want is for that
> test to fail in configure and for the rest of GC to compile correctly. If
> my hack to AX_CHECK_COMPILE_FLAG does that, excellent, I'll push it. If
> not, please post details so I can figure out the next thing to try -- or
> figure out a fix yourself and make a patch for one of us to push on your
> behalf. We can work with a github pull request if that's more convenient
> for you than a BZ.
>
> Regards,
> John Ralls
>
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-06 Thread John Ralls

On Jul 6, 2014, at 7:15 PM, Geert Janssens  wrote:

> John,
>  
> I will be away on holidays soon. If you think my commit should be reverted, 
> feel free to do so. I doubt I will have much online time available while I'm 
> gone.

Geert,

Yeah, you're not likely to have good connectivity. No worries, enjoy your trip. 
We had a lovely day at the Brussels and Chocolate Museums at the Gross Markt, 
finishing up at Delerium. It didn't start to rain seriously until we got back 
to the apartment.

I hope to keep the change to configure.ac and fix m4_ax_check_compile_flag; 
once it works reliably we'll want everything that's wrapped in "if gcc" to use 
it instead, because it's much better practice to test the feature than to rely 
on compiler/version settings.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-06 Thread Geert Janssens
John,

I will be away on holidays soon. If you think my commit should be reverted, 
feel free to do so. I 
doubt I will have much online time available while I'm gone.

Geert

On Sunday 06 July 2014 10:05:27 John Ralls wrote:
> On Jul 5, 2014, at 11:34 PM, Sumit Bhardwaj  wrote:
> > Sure, John. Here you go. Interestingly, I didn't find conftest.c in
> > the directory tree.
> > 
> > 'tree | grep conftest.c' gave no output.
> > 
> > Thanks,
> > Sumit
> > 
> > configure:25408: checking whether C++ compiler accepts
> > -Wno-deprecated-register configure:25427: g++ -c -g -O2
> > -std=gnu++11 -Werror -Wno-deprecated-register  conftest.cpp >&5
> > configure:25427: $? = 0
> > configure:25435: result: yes
> > configure:25449: checking whether C compiler accepts
> > -Wno-non-literal-null-conversion configure:25468: gcc -c -g -O2
> > -Werror -Wno-non-literal-null-conversion  conftest.c >&5
> > configure:25468: $? = 0
> > configure:25476: result: yes
> > configure:25484: checking what extra warning flags to pass to the C
> > compiler configure:25547: gcc -c  -Wall -Wunused
> > -Wmissing-prototypes -Wmissing-declarations 
> > -Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror
> > -D_FORTIFY_SOURCE=2  conftest.c >&5 configure:25547: $? = 0
> > configure:25560: result:  -Werror -Wdeclaration-after-statement
> > -Wno-pointer-sign -D_FORTIFY_SOURCE=2 configure:25697: checking
> > that generated files are newer than configure configure:25703:
> > result: done
> > configure:25835: creating ./config.status
> 
> Interesting. I suspect that AX_CHECK_COMPILE_FLAG isn't getting cc1
> invoked, only cpp, because it passes in an effectively empty program.
> 
> Try editing macros/m4_ax_check_compile_flag.m4 so that
>   AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
> becomes
>   AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM(
>   [[const char hw[] = "Hello, World\n";]],
> [[fputs (hw, stdout);]])]))])],
> 
> and see if that will get it to fail in configure. You'll need to
> re-run autogen.sh to pull the modified macro into configure.
> 
> Regards,
> John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-06 Thread John Ralls

On Jul 6, 2014, at 6:38 PM, Sumit Bhardwaj  wrote:

> Hi John,
> 
> That works - to an extent. gcc fails and the current configuration is:
>  -Werror -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2
> 
> Configure doesn't fail, but that the flags are far fewer than earlier. Is 
> this, what we want to go ahead with?
> 
> If anyone wants to look at the changes in macros/m4_ax_check_compile_flag.m4 
> and configure.ac, I have pushed the changes to master  repo on my github 
> (https://github.com/bhardwajs/gnucash).
> 
> Cheers,
> Sumit
> 
> P.S. - Apologies for a two-month hiatus. Work drained a lot of time and 
> energy. Should be better now. :)

Real life does have a nasty habit of intruding ;-)

Anyway, what do you mean by "works to an extent"? What we want is for that test 
to fail in configure and for the rest of GC to compile correctly. If my hack to 
AX_CHECK_COMPILE_FLAG does that, excellent, I'll push it. If not, please post 
details so I can figure out the next thing to try -- or figure out a fix 
yourself and make a patch for one of us to push on your behalf. We can work 
with a github pull request if that's more convenient for you than a BZ.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-06 Thread Sumit Bhardwaj
Hi John,

That works - to an extent. gcc fails and the current configuration is:
 -Werror -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2

Configure doesn't fail, but that the flags are far fewer than earlier. Is
this, what we want to go ahead with?

If anyone wants to look at the changes in
macros/m4_ax_check_compile_flag.m4 and configure.ac, I have pushed the
changes to master  repo on my github (https://github.com/bhardwajs/gnucash).

Cheers,
Sumit

P.S. - Apologies for a two-month hiatus. Work drained a lot of time and
energy. Should be better now. :)

On Sun, Jul 6, 2014 at 1:05 AM, John Ralls  wrote:

>
> On Jul 5, 2014, at 11:34 PM, Sumit Bhardwaj  wrote:
>
> > Sure, John. Here you go. Interestingly, I didn't find conftest.c in the
> directory tree.
> >
> > 'tree | grep conftest.c' gave no output.
> >
> > Thanks,
> > Sumit
> >
> > configure:25408: checking whether C++ compiler accepts
> -Wno-deprecated-register
> > configure:25427: g++ -c -g -O2 -std=gnu++11 -Werror
> -Wno-deprecated-register  conftest.cpp >&5
> > configure:25427: $? = 0
> > configure:25435: result: yes
> > configure:25449: checking whether C compiler accepts
> -Wno-non-literal-null-conversion
> > configure:25468: gcc -c -g -O2 -Werror -Wno-non-literal-null-conversion
>  conftest.c >&5
> > configure:25468: $? = 0
> > configure:25476: result: yes
> > configure:25484: checking what extra warning flags to pass to the C
> compiler
> > configure:25547: gcc -c  -Wall -Wunused -Wmissing-prototypes
> -Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused -g -O2
> -Werror -D_FORTIFY_SOURCE=2  conftest.c >&5
> > configure:25547: $? = 0
> > configure:25560: result:  -Werror -Wdeclaration-after-statement
> -Wno-pointer-sign -D_FORTIFY_SOURCE=2
> > configure:25697: checking that generated files are newer than configure
> > configure:25703: result: done
> > configure:25835: creating ./config.status
>
> Interesting. I suspect that AX_CHECK_COMPILE_FLAG isn't getting cc1
> invoked, only cpp, because it passes in an effectively empty program.
>
> Try editing macros/m4_ax_check_compile_flag.m4 so that
>   AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
> becomes
>   AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM(
> [[const char hw[] = "Hello, World\n";]],
> [[fputs (hw, stdout);]])]))])],
>
> and see if that will get it to fail in configure. You'll need to re-run
> autogen.sh to pull the modified macro into configure.
>
> Regards,
> John Ralls
>
>
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-06 Thread John Ralls

On Jul 5, 2014, at 11:34 PM, Sumit Bhardwaj  wrote:

> Sure, John. Here you go. Interestingly, I didn't find conftest.c in the 
> directory tree.
> 
> 'tree | grep conftest.c' gave no output.
> 
> Thanks,
> Sumit
> 
> configure:25408: checking whether C++ compiler accepts 
> -Wno-deprecated-register
> configure:25427: g++ -c -g -O2 -std=gnu++11 -Werror -Wno-deprecated-register  
> conftest.cpp >&5
> configure:25427: $? = 0
> configure:25435: result: yes
> configure:25449: checking whether C compiler accepts 
> -Wno-non-literal-null-conversion
> configure:25468: gcc -c -g -O2 -Werror -Wno-non-literal-null-conversion  
> conftest.c >&5
> configure:25468: $? = 0
> configure:25476: result: yes
> configure:25484: checking what extra warning flags to pass to the C compiler
> configure:25547: gcc -c  -Wall -Wunused -Wmissing-prototypes 
> -Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused -g -O2 
> -Werror -D_FORTIFY_SOURCE=2  conftest.c >&5
> configure:25547: $? = 0
> configure:25560: result:  -Werror -Wdeclaration-after-statement 
> -Wno-pointer-sign -D_FORTIFY_SOURCE=2
> configure:25697: checking that generated files are newer than configure
> configure:25703: result: done
> configure:25835: creating ./config.status

Interesting. I suspect that AX_CHECK_COMPILE_FLAG isn't getting cc1 invoked, 
only cpp, because it passes in an effectively empty program. 

Try editing macros/m4_ax_check_compile_flag.m4 so that
  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
becomes
  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM(
[[const char hw[] = "Hello, World\n";]],
[[fputs (hw, stdout);]])]))])],

and see if that will get it to fail in configure. You'll need to re-run 
autogen.sh to pull the modified macro into configure.

Regards,
John Ralls



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-05 Thread Sumit Bhardwaj
Sure, John. Here you go. Interestingly, I didn't find conftest.c in the
directory tree.

'tree | grep conftest.c' gave no output.

Thanks,
Sumit

configure:25408: checking whether C++ compiler accepts
-Wno-deprecated-register
configure:25427: g++ -c -g -O2 -std=gnu++11 -Werror
-Wno-deprecated-register  conftest.cpp >&5
configure:25427: $? = 0
configure:25435: result: yes
configure:25449: checking whether C compiler accepts
-Wno-non-literal-null-conversion
configure:25468: gcc -c -g -O2 -Werror -Wno-non-literal-null-conversion
conftest.c >&5
configure:25468: $? = 0
configure:25476: result: yes
configure:25484: checking what extra warning flags to pass to the C compiler
configure:25547: gcc -c  -Wall -Wunused -Wmissing-prototypes
-Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused -g -O2
-Werror -D_FORTIFY_SOURCE=2  conftest.c >&5
configure:25547: $? = 0
configure:25560: result:  -Werror -Wdeclaration-after-statement
-Wno-pointer-sign -D_FORTIFY_SOURCE=2
configure:25697: checking that generated files are newer than configure
configure:25703: result: done
configure:25835: creating ./config.status

On Sat, Jul 5, 2014 at 12:17 PM, jra...@ceridwen.us 
wrote:

>
>
> On July 5, 2014 at 11:35 AM Sumit Bhardwaj  wrote:
>
>   Hi John,
>
>  It fails in first C compilation. I do have to do a "make disclean" to get
> the error. Rebuilding with just uncommenting in configure doesn't throw
> error which is why I didn't see it earlier. I have pasted the error stack
> below.
>
> Do let me know if you want me to do any more experiments. For now, I will
> comment that line in configure.ac and rebuild the master.
>
>  Thanks,
> Sumit
>
> /bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I../..  -Wno-error=deprecated-declarations -I../../lib/libc -I../../src
> -I../../src -I../../src/gnc-module -I../../src/app-utils/calculation
> -I../../src/core-utils -I../../src/engine -I../../src/libqof/qof
> -I../../src/backend/xml -pthread -I/usr/include/guile/2.0   -pthread
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -pthread
> -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
> -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
> -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libxml2
> -DG_LOG_DOMAIN=\"gnc.app-utils\"  -Werror -Wdeclaration-after-statement
> -Wno-pointer-sign -D_FORTIFY_SOURCE=2  -Wall -Wunused -Wmissing-prototypes
> -Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused -g -O2
> -MT gfec.lo -MD -MP -MF .deps/gfec.Tpo -c -o gfec.lo gfec.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../..
> -Wno-error=deprecated-declarations -I../../lib/libc -I../../src -I../../src
> -I../../src/gnc-module -I../../src/app-utils/calculation
> -I../../src/core-utils -I../../src/engine -I../../src/libqof/qof
> -I../../src/backend/xml -pthread -I/usr/include/guile/2.0 -pthread
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread
> -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
> -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
> -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libxml2
> -DG_LOG_DOMAIN=\"gnc.app-utils\" -Werror -Wdeclaration-after-statement
> -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes
> -Wmissing-declarations -Wno-non-literal-null-conversion -Wno-unused -g -O2
> -MT gfec.lo -MD -MP -MF .deps/gfec.Tpo -c gfec.c  -fPIC -DPIC -o
> .libs/gfec.o
> gfec.c: In function 'gfec_catcher':
> gfec.c:79:13: warning: 'scm_internal_stack_catch' is deprecated (declared
> at /usr/include/guile/2.0/libguile/deprecated.h:648)
> [-Wdeprecated-declarations]
>  scm_internal_stack_catch(SCM_BOOL_T,
>  ^
> gfec.c: In function 'gfec_eval_file':
> gfec.c:135:5: warning: 'scm_internal_stack_catch' is deprecated (declared
> at /usr/include/guile/2.0/libguile/deprecated.h:648)
> [-Wdeprecated-declarations]
>  result = scm_internal_stack_catch(SCM_BOOL_T,
>  ^
> gfec.c: In function 'gfec_eval_string':
> gfec.c:173:5: warning: 'scm_internal_stack_catch' is deprecated (declared
> at /usr/include/guile/2.0/libguile/deprecated.h:648)
> [-Wdeprecated-declarations]
>  result = scm_internal_stack_catch(SCM_BOOL_T,
>  ^
> gfec.c: In function 'gfec_apply':
> gfec.c:216:5: warning: 'scm_internal_stack_catch' is deprecated (declared
> at /usr/include/guile/2.0/libguile/deprecated.h:648)
> [-Wdeprecated-declarations]
>  result 

Re: gnucash master: Multiple changes pushed

2014-07-05 Thread jra...@ceridwen.us


> On July 5, 2014 at 11:35 AM Sumit Bhardwaj  wrote:
> 
>  Hi John,
> 
>  It fails in first C compilation. I do have to do a "make disclean" to get the
> error. Rebuilding with just uncommenting in configure doesn't throw error
> which is why I didn't see it earlier. I have pasted the error stack below.
> 
>  Do let me know if you want me to do any more experiments. For now, I will
> comment that line in and rebuild the master.
> 
>  Thanks,
>  Sumit
> 
>  /bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I../..  -Wno-error=deprecated-declarations -I../../lib/libc -I../../src
> -I../../src -I../../src/gnc-module -I../../src/app-utils/calculation
> -I../../src/core-utils -I../../src/engine -I../../src/libqof/qof
> -I../../src/backend/xml -pthread -I/usr/include/guile/2.0   -pthread
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -pthread
> -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0
> -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1
> -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
> -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libxml2
>  -DG_LOG_DOMAIN=\"gnc.app-utils\"  -Werror -Wdeclaration-after-statement
> -Wno-pointer-sign -D_FORTIFY_SOURCE=2  -Wall -Wunused -Wmissing-prototypes
> -Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused -g -O2
> -MT gfec.lo -MD -MP -MF .deps/gfec.Tpo -c -o gfec.lo gfec.c
>  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../..
> -Wno-error=deprecated-declarations -I../../lib/libc -I../../src -I../../src
> -I../../src/gnc-module -I../../src/app-utils/calculation
> -I../../src/core-utils -I../../src/engine -I../../src/libqof/qof
> -I../../src/backend/xml -pthread -I/usr/include/guile/2.0 -pthread
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread
> -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0
> -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1
> -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
> -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libxml2
> -DG_LOG_DOMAIN=\"gnc.app-utils\" -Werror -Wdeclaration-after-statement
> -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes
> -Wmissing-declarations -Wno-non-literal-null-conversion -Wno-unused -g -O2 -MT
> gfec.lo -MD -MP -MF .deps/gfec.Tpo -c gfec.c  -fPIC -DPIC -o .libs/gfec.o
>  gfec.c: In function 'gfec_catcher':
>  gfec.c:79:13: warning: 'scm_internal_stack_catch' is deprecated (declared at
> /usr/include/guile/2.0/libguile/deprecated.h:648) [-Wdeprecated-declarations]
>   scm_internal_stack_catch(SCM_BOOL_T,
>   ^
>  gfec.c: In function 'gfec_eval_file':
>  gfec.c:135:5: warning: 'scm_internal_stack_catch' is deprecated (declared at
> /usr/include/guile/2.0/libguile/deprecated.h:648) [-Wdeprecated-declarations]
>   result = scm_internal_stack_catch(SCM_BOOL_T,
>   ^
>  gfec.c: In function 'gfec_eval_string':
>  gfec.c:173:5: warning: 'scm_internal_stack_catch' is deprecated (declared at
> /usr/include/guile/2.0/libguile/deprecated.h:648) [-Wdeprecated-declarations]
>   result = scm_internal_stack_catch(SCM_BOOL_T,
>   ^
>  gfec.c: In function 'gfec_apply':
>  gfec.c:216:5: warning: 'scm_internal_stack_catch' is deprecated (declared at
> /usr/include/guile/2.0/libguile/deprecated.h:648) [-Wdeprecated-declarations]
>   result = scm_internal_stack_catch(SCM_BOOL_T,
>   ^
>  gfec.c: At top level:
>  cc1: error: unrecognized command line option
> "-Wno-non-literal-null-conversion" [-Werror]
>  cc1: all warnings being treated as errors
>  make[4]: *** [gfec.lo] Error 1
>  make[4]: Leaving directory `/home/bhardwajs/ac/devel/gnucash/src/app-utils'
>  make[3]: *** [all-recursive] Error 1
>  make[3]: Leaving directory `/home/bhardwajs/ac/devel/gnucash/src/app-utils'
>  make[2]: *** [all-recursive] Error 1
>  make[2]: Leaving directory `/home/bhardwajs/ac/devel/gnucash/src'
>  make[1]: *** [all-recursive] Error 1
>  make[1]: Leaving directory `/home/bhardwajs/ac/devel/gnucash'
>  make: *** [all] Error 2
> 

Sumit,

That's kind of interesting. It should error out on the deprecated declarations,
since -Werror is in the options. That aside, the fact that it's getting past the
check for -Wno-non-literal-null-conversion in configure and then barfing during
build is what we're really interested in.

Can you find the part of config.log with the -Wno-non-literal-null-conversion
check and post it here?

Regards,
John Ralls
___
gnucash-devel mailing 

Re: gnucash master: Multiple changes pushed

2014-07-05 Thread Sumit Bhardwaj
Hi John,

It fails in first C compilation. I do have to do a "make disclean" to get
the error. Rebuilding with just uncommenting in configure doesn't throw
error which is why I didn't see it earlier. I have pasted the error stack
below.

Do let me know if you want me to do any more experiments. For now, I will
comment that line in configure.ac and rebuild the master.

Thanks,
Sumit

/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I../..  -Wno-error=deprecated-declarations -I../../lib/libc -I../../src
-I../../src -I../../src/gnc-module -I../../src/app-utils/calculation
-I../../src/core-utils -I../../src/engine -I../../src/libqof/qof
-I../../src/backend/xml -pthread -I/usr/include/guile/2.0   -pthread
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -pthread
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libxml2
-DG_LOG_DOMAIN=\"gnc.app-utils\"  -Werror -Wdeclaration-after-statement
-Wno-pointer-sign -D_FORTIFY_SOURCE=2  -Wall -Wunused -Wmissing-prototypes
-Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused -g -O2
-MT gfec.lo -MD -MP -MF .deps/gfec.Tpo -c -o gfec.lo gfec.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../..
-Wno-error=deprecated-declarations -I../../lib/libc -I../../src -I../../src
-I../../src/gnc-module -I../../src/app-utils/calculation
-I../../src/core-utils -I../../src/engine -I../../src/libqof/qof
-I../../src/backend/xml -pthread -I/usr/include/guile/2.0 -pthread
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libxml2
-DG_LOG_DOMAIN=\"gnc.app-utils\" -Werror -Wdeclaration-after-statement
-Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes
-Wmissing-declarations -Wno-non-literal-null-conversion -Wno-unused -g -O2
-MT gfec.lo -MD -MP -MF .deps/gfec.Tpo -c gfec.c  -fPIC -DPIC -o
.libs/gfec.o
gfec.c: In function 'gfec_catcher':
gfec.c:79:13: warning: 'scm_internal_stack_catch' is deprecated (declared
at /usr/include/guile/2.0/libguile/deprecated.h:648)
[-Wdeprecated-declarations]
 scm_internal_stack_catch(SCM_BOOL_T,
 ^
gfec.c: In function 'gfec_eval_file':
gfec.c:135:5: warning: 'scm_internal_stack_catch' is deprecated (declared
at /usr/include/guile/2.0/libguile/deprecated.h:648)
[-Wdeprecated-declarations]
 result = scm_internal_stack_catch(SCM_BOOL_T,
 ^
gfec.c: In function 'gfec_eval_string':
gfec.c:173:5: warning: 'scm_internal_stack_catch' is deprecated (declared
at /usr/include/guile/2.0/libguile/deprecated.h:648)
[-Wdeprecated-declarations]
 result = scm_internal_stack_catch(SCM_BOOL_T,
 ^
gfec.c: In function 'gfec_apply':
gfec.c:216:5: warning: 'scm_internal_stack_catch' is deprecated (declared
at /usr/include/guile/2.0/libguile/deprecated.h:648)
[-Wdeprecated-declarations]
 result = scm_internal_stack_catch(SCM_BOOL_T,
 ^
gfec.c: At top level:
cc1: error: unrecognized command line option
"-Wno-non-literal-null-conversion" [-Werror]
cc1: all warnings being treated as errors
make[4]: *** [gfec.lo] Error 1
make[4]: Leaving directory `/home/bhardwajs/ac/devel/gnucash/src/app-utils'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/bhardwajs/ac/devel/gnucash/src/app-utils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/bhardwajs/ac/devel/gnucash/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bhardwajs/ac/devel/gnucash'
make: *** [all] Error 2


On Sat, Jul 5, 2014 at 12:09 AM, jra...@ceridwen.us 
wrote:

>
>
> On July 5, 2014 at 2:43 AM Sumit Bhardwaj  wrote:
>
>   Just a quick note on my problems with compiling master today with
> Wno-non-literal-null-conversion.
>
>  Compile kept on failing with the error message "gcc error: unrecognized
> command line option" referring to the Wno-non-literal-null-conversion flag.
> My gcc version is 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC)
>  Commenting out this warning gave me a clean build. For now, I have
> commented this in my local gnucash and in the local github directory.
>#AX_CHECK_COMPILE_FLAG([-Wno-non-literal-null-conversion],
> #[AM_CFLAGS="${AM_CFLAGS} -Wno-non-literal-null-conversion"],
> #[], [-Werror])
>
>  gcc 

Re: gnucash master: Multiple changes pushed

2014-07-05 Thread jra...@ceridwen.us


> On July 5, 2014 at 2:43 AM Sumit Bhardwaj  wrote:
> 
>  Just a quick note on my problems with compiling master today with
> Wno-non-literal-null-conversion.
> 
>  Compile kept on failing with the error message "gcc error: unrecognized
> command line option" referring to the Wno-non-literal-null-conversion flag. My
> gcc version is 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC)
>  Commenting out this warning gave me a clean build. For now, I have commented
> this in my local gnucash and in the local github directory.
>  #AX_CHECK_COMPILE_FLAG([-Wno-non-literal-null-conversion],
>  #[AM_CFLAGS="${AM_CFLAGS} -Wno-non-literal-null-conversion"],
>  #[], [-Werror])
> 
>  gcc man page doesn't list this warning as an option either. Not sure what's
> going on. Will try to look tomorrow.
> 
>  Thanks,
>  Sumit
> 
>  P.S. - maint had same problem.
> 

Sumit,

Did it fail in configure or at the first C compilation? If the latter, please
find the section in config.log that shows the compile-flag test and post it
here.

Regards,

John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-04 Thread Sumit Bhardwaj
Just a quick note on my problems with compiling master today with
Wno-non-literal-null-conversion.

Compile kept on failing with the error message "gcc error: unrecognized
command line option" referring to the Wno-non-literal-null-conversion flag.
My gcc version is 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC)

Commenting out this warning gave me a clean build. For now, I have
commented this in my local gnucash and in the local github directory.
#AX_CHECK_COMPILE_FLAG([-Wno-non-literal-null-conversion],
#[AM_CFLAGS="${AM_CFLAGS} -Wno-non-literal-null-conversion"],
#[], [-Werror])

gcc man page doesn't list this warning as an option either. Not sure what's
going on. Will try to look tomorrow.

Thanks,
Sumit

P.S. - maint had same problem.

On Fri, Jul 4, 2014 at 7:30 AM, Geert Janssens 
wrote:

> On Friday 04 July 2014 03:03:27 jra...@ceridwen.us wrote:
> > > On July 3, 2014 at 5:22 PM Geert Janssens 
> wrote:
> > >  On Thursday 03 July 2014 20:07:46 John Ralls wrote:
> > >  > On Jul 3, 2014, at 7:25 PM, Geert Janssens
> > >  > >  >
> > >  > wrote:
> > >  > > Same issue but this time it may need some more careful testing.
> > >  > > TXN_TYPE_NONE may be used in other locations where '\0' is
> > >  > > assumed
> > >  > > instead of NULL (guile comes to mind). I don't have time to go
> > >  > > deeper into this right now so I'll just revert back to gcc for
> > >  > > the
> > >  > > time being.
> > >  > >
> > >  > > John, you don't *have* to fix this while you're on holidays :).
> > >  > > There is an easy alternative and you can revisit it later if
> > >  > > you
> > >  > > like.
> > >  > >
> > >  > > Oh, just a side question: do we want maint to be buildable with
> > >  > > clang as well ? If so we may need to backport (cherry-pick) the
> > >  > > current round of fixes.
> > >  >
> > >  > Maybe you should just add -Wno-non-literal-null-conversion to
> > >  > CFLAGS.
> > >  > Copy the code I wrote yesterday for -Wno-deprecated-register
> > >  > without
> > >  > the AC_LANG([C++]) block.
> > >
> > >  I could do that but prefer not to until we know for sure the
> > >  warning is>
> > > irrelevant. I can imagine clang doesn't throw this warning just for
> > > fun. Perhaps what we did was generally accepted before but is now
> > > considered risky ? I don't know. If we can avoid the warnings by
> > > small code modifications I'd prefer that approach.
> 
> >
> > That's one way of looking at it, though there have been complaints
> > that Clang enforces a particular coding style via somewhat bogus
> > errors and warnings. In C 0, '\0', FALSE, and NULL are just different
> > ways of saying the same thing; in C++11 we should say nullptr when we
> > mean a null pointer, but for C code I think it's an unnecessary
> > exercise to go through the code to make sure we always use NULL.
> >
> With that you just did the analysis I was suggesting. I think you are
> right that in this case
> the warning is just too cautious and not useful in our code.
>
> So I have chosen to disable it (on condition the current compiler
> understands it) as you
> proposed.
>
> The maint backporting still needs to be done though.
>
> Geert
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-04 Thread Geert Janssens
On Friday 04 July 2014 03:03:27 jra...@ceridwen.us wrote:
> > On July 3, 2014 at 5:22 PM Geert Janssens  wrote:
> >  On Thursday 03 July 2014 20:07:46 John Ralls wrote:
> >  > On Jul 3, 2014, at 7:25 PM, Geert Janssens
> >  > >  > 
> >  > wrote:
> >  > > Same issue but this time it may need some more careful testing.
> >  > > TXN_TYPE_NONE may be used in other locations where '\0' is
> >  > > assumed
> >  > > instead of NULL (guile comes to mind). I don't have time to go
> >  > > deeper into this right now so I'll just revert back to gcc for
> >  > > the
> >  > > time being.
> >  > > 
> >  > > John, you don't *have* to fix this while you're on holidays :).
> >  > > There is an easy alternative and you can revisit it later if
> >  > > you
> >  > > like.
> >  > > 
> >  > > Oh, just a side question: do we want maint to be buildable with
> >  > > clang as well ? If so we may need to backport (cherry-pick) the
> >  > > current round of fixes.
> >  > 
> >  > Maybe you should just add -Wno-non-literal-null-conversion to
> >  > CFLAGS.
> >  > Copy the code I wrote yesterday for -Wno-deprecated-register
> >  > without
> >  > the AC_LANG([C++]) block.
> >  
> >  I could do that but prefer not to until we know for sure the
> >  warning is> 
> > irrelevant. I can imagine clang doesn't throw this warning just for
> > fun. Perhaps what we did was generally accepted before but is now
> > considered risky ? I don't know. If we can avoid the warnings by
> > small code modifications I'd prefer that approach.

> 
> That's one way of looking at it, though there have been complaints
> that Clang enforces a particular coding style via somewhat bogus
> errors and warnings. In C 0, '\0', FALSE, and NULL are just different
> ways of saying the same thing; in C++11 we should say nullptr when we
> mean a null pointer, but for C code I think it's an unnecessary
> exercise to go through the code to make sure we always use NULL.
> 
With that you just did the analysis I was suggesting. I think you are right 
that in this case 
the warning is just too cautious and not useful in our code.

So I have chosen to disable it (on condition the current compiler understands 
it) as you 
proposed.

The maint backporting still needs to be done though.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-04 Thread jra...@ceridwen.us


> On July 3, 2014 at 5:22 PM Geert Janssens  wrote:
> 
>  On Thursday 03 July 2014 20:07:46 John Ralls wrote:
>  > On Jul 3, 2014, at 7:25 PM, Geert Janssens 
>  > wrote:
>  > > Same issue but this time it may need some more careful testing.
>  > > TXN_TYPE_NONE may be used in other locations where '\0' is assumed
>  > > instead of NULL (guile comes to mind). I don't have time to go
>  > > deeper into this right now so I'll just revert back to gcc for the
>  > > time being.
>  > >
>  > > John, you don't *have* to fix this while you're on holidays :).
>  > > There is an easy alternative and you can revisit it later if you
>  > > like.
>  > >
>  > > Oh, just a side question: do we want maint to be buildable with
>  > > clang as well ? If so we may need to backport (cherry-pick) the
>  > > current round of fixes.
>  > Maybe you should just add -Wno-non-literal-null-conversion to CFLAGS.
>  > Copy the code I wrote yesterday for -Wno-deprecated-register without
>  > the AC_LANG([C++]) block.
>  >
>  I could do that but prefer not to until we know for sure the warning is
> irrelevant. I can imagine clang doesn't throw this warning just for fun.
> Perhaps what we did was generally accepted before but is now considered risky
> ? I don't know. If we can avoid the warnings by small code modifications I'd
> prefer that approach.
> 
>  > I hadn't thought about maint. Up to now everything has been related to
>  > C++, which doesn't apply to maint. Let's try to remember to look at
>  > that again in August when we're both back from holiday. I'll need to
>  > get serious about OSX 10.10 testing then, too, and it has a more
>  > current version of Clang than I've been using so more of these issues
>  > might apply there as well.
>  >
>  Ok, I'll mark this as a TODO in my mailbox.
> 

That's one way of looking at it, though there have been complaints that Clang
enforces a particular coding style via somewhat bogus errors and warnings. In C
0, '\0', FALSE, and NULL are just different ways of saying the same thing; in
C++11 we should say nullptr when we mean a null pointer, but for C code I think
it's an unnecessary exercise to go through the code to make sure we always use
NULL.

Regards,
John Ralls
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-03 Thread Geert Janssens
On Thursday 03 July 2014 20:07:46 John Ralls wrote:
> On Jul 3, 2014, at 7:25 PM, Geert Janssens  wrote:
> > Same issue but this time it may need some more careful testing.
> > TXN_TYPE_NONE may be used in other locations where '\0' is assumed
> > instead of NULL (guile comes to mind). I don't have time to go
> > deeper into this right now so I'll just revert back to gcc for the
> > time being.
> > 
> > John, you don't *have* to fix this while you're on holidays :).
> > There is an easy alternative and you can revisit it later if you
> > like.
> > 
> > Oh, just a side question: do we want maint to be buildable with
> > clang as well ? If so we may need to backport (cherry-pick) the
> > current round of fixes.
> Maybe you should just add -Wno-non-literal-null-conversion to CFLAGS.
> Copy the code I wrote yesterday for -Wno-deprecated-register without
> the AC_LANG([C++]) block.
> 
I could do that but prefer not to until we know for sure the warning is 
irrelevant. I can 
imagine clang doesn't throw this warning just for fun. Perhaps what we did was 
generally 
accepted before but is now considered risky ? I don't know. If we can avoid the 
warnings by 
small code modifications I'd prefer that approach.

> I hadn't thought about maint. Up to now everything has been related to
> C++, which doesn't apply to maint. Let's try to remember to look at
> that again in August when we're both back from holiday. I'll need to
> get serious about OSX 10.10 testing then, too, and it has a more
> current version of Clang than I've been using so more of these issues
> might apply there as well.
> 
Ok, I'll mark this as a TODO in my mailbox.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-03 Thread John Ralls

On Jul 3, 2014, at 7:25 PM, Geert Janssens  wrote:

>  
> I have fixed these as they were fairly trivial. clang next chokes in 
> gnc-tree-view-split-reg.c:
>  
> /kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/gnome-utils/gnc-tree-view-split-reg.c:5309:33:
>  error: expression which evaluates to zero treated as a null pointer constant 
> of type 'const gchar *' (aka 'const char *')
>   [-Werror,-Wnon-literal-null-conversion]
> result  = g_strdup (TXN_TYPE_NONE);
> ^
> /kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/engine/Transaction.h:119:24:
>  note: expanded from macro 'TXN_TYPE_NONE'
> #define TXN_TYPE_NONE'\0' /**< No transaction type   */
>  ^~~~
> 1 error generated.
> make[5]: *** [gnc-tree-view-split-reg.lo] Error 1
> make[5]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/gnome-utils'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/gnome-utils'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/gnome-utils'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master'
> make: *** [all] Error 2
>  
>  
> Same issue but this time it may need some more careful testing. TXN_TYPE_NONE 
> may be used in other locations where '\0' is assumed instead of NULL (guile 
> comes to mind). I don't have time to go deeper into this right now so I'll 
> just revert back to gcc for the time being.
>  
> John, you don't *have* to fix this while you're on holidays :). There is an 
> easy alternative and you can revisit it later if you like.
>  
> Oh, just a side question: do we want maint to be buildable with clang as well 
> ? If so we may need to backport (cherry-pick) the current round of fixes.
>  
> 

Maybe you should just add -Wno-non-literal-null-conversion to CFLAGS. Copy the 
code I wrote yesterday for -Wno-deprecated-register without the AC_LANG([C++]) 
block.

I hadn't thought about maint. Up to now everything has been related to C++, 
which doesn't apply to maint. Let's try to remember to look at that again in 
August when we're both back from holiday. I'll need to get serious about OSX 
10.10 testing then, too, and it has a more current version of Clang than I've 
been using so more of these issues might apply there as well.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-03 Thread John Ralls

On Jul 3, 2014, at 6:04 PM, Geert Janssens  wrote:

> On Thursday 03 July 2014 17:51:42 John Ralls wrote:
> > On Jul 3, 2014, at 4:16 PM, Geert Janssens  
> > wrote:
> > > On Thursday 03 July 2014 16:09:28 John Ralls wrote:
> > > > On Jul 3, 2014, at 3:58 PM, Geert Janssens  
> > > > wrote:
> > > > > Hmm, my previous mail got truncated by the list server
> > > > > for some reason. Anyway the errors continue for a while
> > > > > with yet more undefined references to std::xyz functions.
> > > > > 
> > > > > This was with a clean autogen/configure/make sequence
> > > > > in an empty build directory.
> > > > > 
> > > > > If I do the same with gcc it works fine.
> > > > 
> > > > Interesting. What version of Clang? What happens if you add
> > > > -stdlib=libstdc++ to CXXFLAGS?
> > > > 
> > > > Regards,
> > > > John Ralls
> > > 
> > > $ clang --version
> > > clang version 3.4 (tags/RELEASE_34/final)
> > > Target: x86_64-redhat-linux-gnu
> > > Thread model: posix
> > > 
> > > I have appended "CXXFLAGS=-stdlib=libstdc++" (without the quotes) to
> > > my configure run. The error I get now is:
> > > 
> > > /bin/sh ../../../../libtool  --tag=CXX   --mode=link clang -Werror 
> > > -Wall -Wno-unused -Wno-deprecated-register -stdlib=libstdc++
> > > -std=gnu++11 -g   -g  -o test-qof test_qof-test-gnc-date.o
> > > test_qof-test-qof.o test_qof-test-qofbook.o
> > > test_qof-test-qofinstance.o test_qof-test-kvp_frame.o
> > > test_qof-test-qofobject.o test_qof-test-qofsession.o
> > > test_qof-test-qof-string-cache.o test_qof-test-gnc-guid.o
> > > test_qof-unittest-support.o
> > > ../../../../src/libqof/qof/libgnc-qof.la -lgio-2.0 -lgthread-2.0
> > > -pthread -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread
> > > -lglib-2.0  -lm libtool: link: clang -Werror -Wall -Wno-unused
> > > -Wno-deprecated-register -stdlib=libstdc++ -std=gnu++11 -g -g -o
> > > .libs/test-qof test_qof-test-gnc-date.o test_qof-test-qof.o
> > > test_qof-test-qofbook.o test_qof-test-qofinstance.o
> > > test_qof-test-kvp_frame.o test_qof-test-qofobject.o
> > > test_qof-test-qofsession.o test_qof-test-qof-string-cache.o
> > > test_qof-test-gnc-guid.o test_qof-unittest-support.o -pthread
> > > -Wl,--export-dynamic -pthread 
> > > ../../../../src/libqof/qof/.libs/libgnc-qof.so -L/usr/lib64
> > > -lgio-2.0 -lgthread-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lm
> > > -pthread -Wl,-rpath
> > > -Wl,/home/janssege/Development/Installs/gnucash-f20-master/lib64
> > > clang: error: argument unused during compilation:
> > > '-stdlib=libstdc++' make[5]: *** [test-qof] Error 1
> > > make[5]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/libq
> > > of/qof/test' make[4]: *** [all-recursive] Error 1
> > > make[4]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/libq
> > > of/qof' make[3]: *** [all-recursive] Error 1
> > > make[3]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/libq
> > > of' make[2]: *** [all-recursive] Error 1
> > > make[2]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src'
> > > make[1]: *** [all-recursive] Error 1
> > > make[1]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master' make:
> > > *** [all] Error 2
> > 
> > Oh, well. Seems libc++ is working only on OSX, so it's still libstdc++
> > on Linux, so that's not it... or maybe it is. The libstdc++ shipped
> > with Xcode is the last GPLV2 one and doesn't support C++11, so I
> > can't test against it to see if that's the problem.
> > 
> > Maybe this is the problem:
> > https://bbs.archlinux.org/viewtopic.php?id=135667 Apparently clang
> > isn't smart enough to figure out that it should compile a C++ file as
> > C++, so you need to set $CXX=clang++.
> > 
> Bingo. If I define CXX=clang++ it passes qof. I removed the CXXFLAGS at the 
> same time. They don't seem to be necessary.
>  
> I'm hitting the non-literal-null-conversion warning turned error in 
> gnc-slots-sql.c:
>  
> /kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/backend/sql/gnc-slots-sql.c:712:90:
>  error: expression which evaluates to zero treated as a null pointer constant 
> of type 'const gchar *' (aka 'const char *')
>   [-Werror,-Wnon-literal-null-conversion]
> slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, 
> g_string_new('\0') };
>   
>^~~~
> /kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/backend/sql/gnc-slots-sql.c:739:90:
>  error: expression which evaluates to zero treated as a null pointer constant 
> of type 'const gchar *' (aka 'const char *')
>   [-Werror,-Wnon-literal-null-conversion]
> slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, 
> g_string_new('\0') };
>   
>   

Re: gnucash master: Multiple changes pushed

2014-07-03 Thread Geert Janssens
On Thursday 03 July 2014 18:04:25 Geert Janssens wrote:
> On Thursday 03 July 2014 17:51:42 John Ralls wrote:
> > On Jul 3, 2014, at 4:16 PM, Geert Janssens  
> > wrote:
> > > On Thursday 03 July 2014 16:09:28 John Ralls wrote:
> > > > On Jul 3, 2014, at 3:58 PM, Geert Janssens  
> > > > wrote:
> > > > > Hmm, my previous mail got truncated by the list server
> > > > > for some reason. Anyway the errors continue for a while
> > > > > with yet more undefined references to std::xyz functions.
> > > > > 
> > > > > This was with a clean autogen/configure/make sequence
> > > > > in an empty build directory.
> > > > > 
> > > > > If I do the same with gcc it works fine.
> > > > 
> > > > Interesting. What version of Clang? What happens if you add
> > > > -stdlib=libstdc++ to CXXFLAGS?
> > > > 
> > > > Regards,
> > > > John Ralls
> > > 
> > > $ clang --version
> > > clang version 3.4 (tags/RELEASE_34/final)
> > > Target: x86_64-redhat-linux-gnu
> > > Thread model: posix
> > > 
> > > I have appended "CXXFLAGS=-stdlib=libstdc++" (without the quotes)
> > > to
> > > my configure run. The error I get now is:
> > > 
> > > /bin/sh ../../../../libtool  --tag=CXX   --mode=link clang -Werror
> > > -Wall -Wno-unused -Wno-deprecated-register -stdlib=libstdc++
> > > -std=gnu++11 -g   -g  -o test-qof test_qof-test-gnc-date.o
> > > test_qof-test-qof.o test_qof-test-qofbook.o
> > > test_qof-test-qofinstance.o test_qof-test-kvp_frame.o
> > > test_qof-test-qofobject.o test_qof-test-qofsession.o
> > > test_qof-test-qof-string-cache.o test_qof-test-gnc-guid.o
> > > test_qof-unittest-support.o
> > > ../../../../src/libqof/qof/libgnc-qof.la -lgio-2.0 -lgthread-2.0
> > > -pthread -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread
> > > -lglib-2.0  -lm libtool: link: clang -Werror -Wall -Wno-unused
> > > -Wno-deprecated-register -stdlib=libstdc++ -std=gnu++11 -g -g -o
> > > .libs/test-qof test_qof-test-gnc-date.o test_qof-test-qof.o
> > > test_qof-test-qofbook.o test_qof-test-qofinstance.o
> > > test_qof-test-kvp_frame.o test_qof-test-qofobject.o
> > > test_qof-test-qofsession.o test_qof-test-qof-string-cache.o
> > > test_qof-test-gnc-guid.o test_qof-unittest-support.o -pthread
> > > -Wl,--export-dynamic -pthread
> > > ../../../../src/libqof/qof/.libs/libgnc-qof.so -L/usr/lib64
> > > -lgio-2.0 -lgthread-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lm
> > > -pthread -Wl,-rpath
> > > -Wl,/home/janssege/Development/Installs/gnucash-f20-master/lib64
> > > clang: error: argument unused during compilation:
> > > '-stdlib=libstdc++' make[5]: *** [test-qof] Error 1
> > > make[5]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/lib
> > > q
> > > of/qof/test' make[4]: *** [all-recursive] Error 1
> > > make[4]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/lib
> > > q
> > > of/qof' make[3]: *** [all-recursive] Error 1
> > > make[3]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/lib
> > > q
> > > of' make[2]: *** [all-recursive] Error 1
> > > make[2]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src'
> > > make[1]: *** [all-recursive] Error 1
> > > make[1]: Leaving directory
> > > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master' make:
> > > *** [all] Error 2
> > 
> > Oh, well. Seems libc++ is working only on OSX, so it's still
> > libstdc++ on Linux, so that's not it... or maybe it is. The
> > libstdc++ shipped with Xcode is the last GPLV2 one and doesn't
> > support C++11, so I can't test against it to see if that's the
> > problem.
> > 
> > Maybe this is the problem:
> > https://bbs.archlinux.org/viewtopic.php?id=135667 Apparently clang
> > isn't smart enough to figure out that it should compile a C++ file
> > as
> > C++, so you need to set $CXX=clang++.
> 
> Bingo. If I define CXX=clang++ it passes qof. I removed the CXXFLAGS
> at the same time. They don't seem to be necessary.
> 
> I'm hitting the non-literal-null-conversion warning turned error in
> gnc-slots-sql.c:
> 
> /kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/backend
> /sql/gnc-slots- sql.c:712:90: error: expression which evaluates to
> zero treated as a null pointer constant of type 'const gchar *' (aka
> 'const char *')
>   [-Werror,-Wnon-literal-null-conversion]
> slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME,
> NULL, g_string_new('\0') }; ^~~~
> /kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/backen
> d/sql/gnc-slots- sql.c:739:90: error: expression which evaluates to
> zero treated as a null pointer constant of type 'const gchar *' (aka
> 'const char *')
>   [-Werror,-Wnon-literal-null-conversion]
> slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME,
> NULL, g_string_new('\0') }; ^~~~
> /kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/backen
> d/sql/gnc-slots- sql.c:821:85: error: expression which evaluates to
> zero t

Re: gnucash master: Multiple changes pushed

2014-07-03 Thread Geert Janssens
On Thursday 03 July 2014 17:51:42 John Ralls wrote:
> On Jul 3, 2014, at 4:16 PM, Geert Janssens  wrote:
> > On Thursday 03 July 2014 16:09:28 John Ralls wrote:
> > > On Jul 3, 2014, at 3:58 PM, Geert Janssens  
> > > wrote:
> > > > Hmm, my previous mail got truncated by the list server
> > > > for some reason. Anyway the errors continue for a while
> > > > with yet more undefined references to std::xyz functions.
> > > > 
> > > > This was with a clean autogen/configure/make sequence
> > > > in an empty build directory.
> > > > 
> > > > If I do the same with gcc it works fine.
> > > 
> > > Interesting. What version of Clang? What happens if you add
> > > -stdlib=libstdc++ to CXXFLAGS?
> > > 
> > > Regards,
> > > John Ralls
> > 
> > $ clang --version
> > clang version 3.4 (tags/RELEASE_34/final)
> > Target: x86_64-redhat-linux-gnu
> > Thread model: posix
> > 
> > I have appended "CXXFLAGS=-stdlib=libstdc++" (without the quotes) to
> > my configure run. The error I get now is:
> > 
> > /bin/sh ../../../../libtool  --tag=CXX   --mode=link clang -Werror 
> > -Wall -Wno-unused -Wno-deprecated-register -stdlib=libstdc++
> > -std=gnu++11 -g   -g  -o test-qof test_qof-test-gnc-date.o
> > test_qof-test-qof.o test_qof-test-qofbook.o
> > test_qof-test-qofinstance.o test_qof-test-kvp_frame.o
> > test_qof-test-qofobject.o test_qof-test-qofsession.o
> > test_qof-test-qof-string-cache.o test_qof-test-gnc-guid.o
> > test_qof-unittest-support.o
> > ../../../../src/libqof/qof/libgnc-qof.la -lgio-2.0 -lgthread-2.0
> > -pthread -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread
> > -lglib-2.0  -lm libtool: link: clang -Werror -Wall -Wno-unused
> > -Wno-deprecated-register -stdlib=libstdc++ -std=gnu++11 -g -g -o
> > .libs/test-qof test_qof-test-gnc-date.o test_qof-test-qof.o
> > test_qof-test-qofbook.o test_qof-test-qofinstance.o
> > test_qof-test-kvp_frame.o test_qof-test-qofobject.o
> > test_qof-test-qofsession.o test_qof-test-qof-string-cache.o
> > test_qof-test-gnc-guid.o test_qof-unittest-support.o -pthread
> > -Wl,--export-dynamic -pthread 
> > ../../../../src/libqof/qof/.libs/libgnc-qof.so -L/usr/lib64
> > -lgio-2.0 -lgthread-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lm
> > -pthread -Wl,-rpath
> > -Wl,/home/janssege/Development/Installs/gnucash-f20-master/lib64
> > clang: error: argument unused during compilation:
> > '-stdlib=libstdc++' make[5]: *** [test-qof] Error 1
> > make[5]: Leaving directory
> > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/libq
> > of/qof/test' make[4]: *** [all-recursive] Error 1
> > make[4]: Leaving directory
> > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/libq
> > of/qof' make[3]: *** [all-recursive] Error 1
> > make[3]: Leaving directory
> > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/libq
> > of' make[2]: *** [all-recursive] Error 1
> > make[2]: Leaving directory
> > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory
> > `/kobaltnet/janssege/Development/Builds/gnucash-f20-master' make:
> > *** [all] Error 2
> 
> Oh, well. Seems libc++ is working only on OSX, so it's still libstdc++
> on Linux, so that's not it... or maybe it is. The libstdc++ shipped
> with Xcode is the last GPLV2 one and doesn't support C++11, so I
> can't test against it to see if that's the problem.
> 
> Maybe this is the problem:
> https://bbs.archlinux.org/viewtopic.php?id=135667 Apparently clang
> isn't smart enough to figure out that it should compile a C++ file as
> C++, so you need to set $CXX=clang++.
> 
Bingo. If I define CXX=clang++ it passes qof. I removed the CXXFLAGS at the 
same time. They 
don't seem to be necessary.

I'm hitting the non-literal-null-conversion warning turned error in 
gnc-slots-sql.c:

/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/backend/sql/gnc-slots-
sql.c:712:90: error: expression which evaluates to zero treated as a null 
pointer constant of 
type 'const gchar *' (aka 'const char *')
  [-Werror,-Wnon-literal-null-conversion]
slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, 
g_string_new('\0') };

 ^~~~
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/backend/sql/gnc-slots-
sql.c:739:90: error: expression which evaluates to zero treated as a null 
pointer constant of 
type 'const gchar *' (aka 'const char *')
  [-Werror,-Wnon-literal-null-conversion]
slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, 
g_string_new('\0') };

 ^~~~
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/backend/sql/gnc-slots-
sql.c:821:85: error: expression which evaluates to zero treated as a null 
pointer constant of 
type 'const gchar *' (aka 'const char *')
  [-Werror,-Wnon-litera

Re: gnucash master: Multiple changes pushed

2014-07-03 Thread John Ralls

On Jul 3, 2014, at 4:16 PM, Geert Janssens  wrote:

> On Thursday 03 July 2014 16:09:28 John Ralls wrote:
> > On Jul 3, 2014, at 3:58 PM, Geert Janssens  
> > wrote:
> > > Hmm, my previous mail got truncated by the list server
> > > for some reason. Anyway the errors continue for a while
> > > with yet more undefined references to std::xyz functions.
> > > 
> > > This was with a clean autogen/configure/make sequence
> > > in an empty build directory.
> > > 
> > > If I do the same with gcc it works fine.
> > 
> > Interesting. What version of Clang? What happens if you add
> > -stdlib=libstdc++ to CXXFLAGS?
> > 
> > Regards,
> > John Ralls
>  
> $ clang --version
> clang version 3.4 (tags/RELEASE_34/final)
> Target: x86_64-redhat-linux-gnu
> Thread model: posix
>  
> I have appended "CXXFLAGS=-stdlib=libstdc++" (without the quotes) to my 
> configure run. The error I get now is:
>  
> /bin/sh ../../../../libtool  --tag=CXX   --mode=link clang -Werror  -Wall 
> -Wno-unused -Wno-deprecated-register -stdlib=libstdc++ -std=gnu++11 -g   -g  
> -o test-qof test_qof-test-gnc-date.o test_qof-test-qof.o 
> test_qof-test-qofbook.o test_qof-test-qofinstance.o test_qof-test-kvp_frame.o 
> test_qof-test-qofobject.o test_qof-test-qofsession.o 
> test_qof-test-qof-string-cache.o test_qof-test-gnc-guid.o 
> test_qof-unittest-support.o ../../../../src/libqof/qof/libgnc-qof.la 
> -lgio-2.0 -lgthread-2.0 -pthread -lgobject-2.0 -Wl,--export-dynamic 
> -lgmodule-2.0 -pthread -lglib-2.0  -lm
> libtool: link: clang -Werror -Wall -Wno-unused -Wno-deprecated-register 
> -stdlib=libstdc++ -std=gnu++11 -g -g -o .libs/test-qof 
> test_qof-test-gnc-date.o test_qof-test-qof.o test_qof-test-qofbook.o 
> test_qof-test-qofinstance.o test_qof-test-kvp_frame.o 
> test_qof-test-qofobject.o test_qof-test-qofsession.o 
> test_qof-test-qof-string-cache.o test_qof-test-gnc-guid.o 
> test_qof-unittest-support.o -pthread -Wl,--export-dynamic -pthread  
> ../../../../src/libqof/qof/.libs/libgnc-qof.so -L/usr/lib64 -lgio-2.0 
> -lgthread-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lm -pthread -Wl,-rpath 
> -Wl,/home/janssege/Development/Installs/gnucash-f20-master/lib64
> clang: error: argument unused during compilation: '-stdlib=libstdc++'
> make[5]: *** [test-qof] Error 1
> make[5]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/libqof/qof/test'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/libqof/qof'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/libqof'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory 
> `/kobaltnet/janssege/Development/Builds/gnucash-f20-master'
> make: *** [all] Error 2

Oh, well. Seems libc++ is working only on OSX, so it's still libstdc++ on 
Linux, so that's not it... or maybe it is. The libstdc++ shipped with Xcode is 
the last GPLV2 one and doesn't support C++11, so I can't test against it to see 
if that's the problem.

Maybe this is the problem: https://bbs.archlinux.org/viewtopic.php?id=135667 
Apparently clang isn't smart enough to figure out that it should compile a C++ 
file as C++, so you need to set $CXX=clang++.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-03 Thread Geert Janssens
On Thursday 03 July 2014 16:09:28 John Ralls wrote:
> On Jul 3, 2014, at 3:58 PM, Geert Janssens  wrote:
> > Hmm, my previous mail got truncated by the list server
> > for some reason. Anyway the errors continue for a while
> > with yet more undefined references to std::xyz functions.
> > 
> > This was with a clean autogen/configure/make sequence
> > in an empty build directory.
> > 
> > If I do the same with gcc it works fine.
> 
> Interesting. What version of Clang? What happens if you add
> -stdlib=libstdc++ to CXXFLAGS?
> 
> Regards,
> John Ralls

$ clang --version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix

I have appended "CXXFLAGS=-stdlib=libstdc++" (without the quotes) to my 
configure run. The 
error I get now is:

/bin/sh ../../../../libtool  --tag=CXX   --mode=link clang -Werror  -Wall 
-Wno-unused -Wno-
deprecated-register -stdlib=libstdc++ -std=gnu++11 -g   -g  -o test-qof 
test_qof-test-gnc-
date.o test_qof-test-qof.o test_qof-test-qofbook.o test_qof-test-qofinstance.o 
test_qof-test-
kvp_frame.o test_qof-test-qofobject.o test_qof-test-qofsession.o 
test_qof-test-qof-string-cache.o 
test_qof-test-gnc-guid.o test_qof-unittest-support.o 
../../../../src/libqof/qof/libgnc-qof.la -lgio-2.0 -
lgthread-2.0 -pthread -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread 
-lglib-2.0  -lm
libtool: link: clang -Werror -Wall -Wno-unused -Wno-deprecated-register 
-stdlib=libstdc++ -
std=gnu++11 -g -g -o .libs/test-qof test_qof-test-gnc-date.o 
test_qof-test-qof.o test_qof-test-
qofbook.o test_qof-test-qofinstance.o test_qof-test-kvp_frame.o 
test_qof-test-qofobject.o 
test_qof-test-qofsession.o test_qof-test-qof-string-cache.o 
test_qof-test-gnc-guid.o test_qof-
unittest-support.o -pthread -Wl,--export-dynamic -pthread  
../../../../src/libqof/qof/.libs/libgnc-
qof.so -L/usr/lib64 -lgio-2.0 -lgthread-2.0 -lgobject-2.0 -lgmodule-2.0 
-lglib-2.0 -lm -pthread -Wl,-
rpath -Wl,/home/janssege/Development/Installs/gnucash-f20-master/lib64
clang: error: argument unused during compilation: '-stdlib=libstdc++'
make[5]: *** [test-qof] Error 1
make[5]: Leaving directory `/kobaltnet/janssege/Development/Builds/gnucash-f20-
master/src/libqof/qof/test'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/kobaltnet/janssege/Development/Builds/gnucash-f20-
master/src/libqof/qof'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/kobaltnet/janssege/Development/Builds/gnucash-f20-
master/src/libqof'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/kobaltnet/janssege/Development/Builds/gnucash-f20-master'
make: *** [all] Error 2


Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-03 Thread John Ralls

On Jul 3, 2014, at 3:58 PM, Geert Janssens  wrote:

> Hmm, my previous mail got truncated by the list server 
> for some reason. Anyway the errors continue for a while 
> with yet more undefined references to std::xyz functions.
> 
> This was with a clean autogen/configure/make sequence 
> in an empty build directory.
> 
> If I do the same with gcc it works fine.

Interesting. What version of Clang? What happens if you add -stdlib=libstdc++ 
to CXXFLAGS?

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-03 Thread Geert Janssens
Hmm, my previous mail got truncated by the list server 
for some reason. Anyway the errors continue for a while 
with yet more undefined references to std::xyz functions.

This was with a clean autogen/configure/make sequence 
in an empty build directory.

If I do the same with gcc it works fine.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-07-03 Thread Geert Janssens
On Wednesday 02 July 2014 17:01:10 John Ralls wrote:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/29923b1f
> (commit) via  https://github.com/Gnucash/gnucash/commit/773326b7
> (commit) from  https://github.com/Gnucash/gnucash/commit/d3389828
> (commit)
> 
> 
> 
> commit 29923b1fd9676123411ec69a271e4b5801e8ad92
> Author: John Ralls 
> Date:   Wed Jul 2 22:55:36 2014 +0200
> 
> Replace '\0' with NULL as char* argument, avoiding warning.
> 
> commit 773326b7c554df5ea3e6f3255d7bed4480587273
> Author: John Ralls 
> Date:   Wed Jul 2 22:54:39 2014 +0200
> 
> Fix typo from 859866a.
> 
> 
> 
> Summary of changes:
>  configure.ac   | 10 ++
>  src/libqof/qof/test/test-qofbook.c |  6 +++---
>  2 files changed, 9 insertions(+), 7 deletions(-)
> 
> ___
> gnucash-patches mailing list
> gnucash-patc...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches

John, with commit 22923b1 I get a bit further with clang, but still the build 
errors out in qof/test:

/bin/sh ../../../../libtool  --tag=CXX   --mode=link clang -Werror  -Wall 
-Wno-unused -Wno-
deprecated-register -g  -std=gnu++11 -g   -g  -o test-qof 
test_qof-test-gnc-date.o test_qof-test-
qof.o test_qof-test-qofbook.o test_qof-test-qofinstance.o 
test_qof-test-kvp_frame.o test_qof-test-
qofobject.o test_qof-test-qofsession.o test_qof-test-qof-string-cache.o 
test_qof-test-gnc-guid.o 
test_qof-unittest-support.o ../../../../src/libqof/qof/libgnc-qof.la -lgio-2.0 
-lgthread-2.0 -pthread -
lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0  -lm
libtool: link: clang -Werror -Wall -Wno-unused -Wno-deprecated-register -g 
-std=gnu++11 -g -g -
o .libs/test-qof test_qof-test-gnc-date.o test_qof-test-qof.o 
test_qof-test-qofbook.o test_qof-test-
qofinstance.o test_qof-test-kvp_frame.o test_qof-test-qofobject.o 
test_qof-test-qofsession.o 
test_qof-test-qof-string-cache.o test_qof-test-gnc-guid.o 
test_qof-unittest-support.o -pthread -
Wl,--export-dynamic -pthread  ../../../../src/libqof/qof/.libs/libgnc-qof.so 
-L/usr/lib64 -lgio-2.0 -
lgthread-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lm -pthread -Wl,-rpath -
Wl,/home/janssege/Development/Installs/gnucash-f20-master/lib64
test_qof-test-gnc-guid.o: In function `test_gnc_guid_to_string()':
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:74: undefined reference to `std::allocator::allocator()'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:74: undefined reference to `std::basic_string, 
std::allocator >::basic_string(char const*, std::allocator const&)'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:74: undefined reference to `std::allocator::~allocator()'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:76: undefined reference to `std::allocator::allocator()'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:76: undefined reference to `std::basic_string, 
std::allocator >::basic_string(char const*, std::allocator const&)'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:76: undefined reference to `std::allocator::~allocator()'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:77: undefined reference to `std::string::size() const'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:91: undefined reference to `std::allocator::~allocator()'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:91: undefined reference to `std::allocator::~allocator()'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:78: undefined reference to `std::string::operator+=(std::string 
const&)'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:79: undefined reference to `std::string::c_str() const'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:80: undefined reference to `std::string::operator=(char const*)'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:84: undefined reference to `std::allocator::allocator()'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:84: undefined reference to `std::basic_string, 
std::allocator >::basic_string(char const*, std::allocator const&)'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:84: undefined reference to `std::allocator::~allocator()'
/kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/libqof/qof/test/test-gnc-
guid.cpp:85: undefined reference

Re: gnucash master: Multiple changes pushed

2014-07-02 Thread Mike Alexander
--On July 2, 2014 at 5:01:10 PM -0400 John Ralls 
 wrote:



Updated  via  https://github.com/Gnucash/gnucash/commit/29923b1f
(commit) via  https://github.com/Gnucash/gnucash/commit/773326b7
(commit)from  https://github.com/Gnucash/gnucash/commit/d3389828
(commit)



commit 29923b1fd9676123411ec69a271e4b5801e8ad92
Author: John Ralls 
Date:   Wed Jul 2 22:55:36 2014 +0200

Replace '\0' with NULL as char* argument, avoiding warning.

commit 773326b7c554df5ea3e6f3255d7bed4480587273
Author: John Ralls 
Date:   Wed Jul 2 22:54:39 2014 +0200

Fix typo from 859866a.


Why did you put the two calls to AC_MSG_RESULT back?  They don't match 
any calls to AC_MSG_CHECKING so they just print "OK" or "No" without 
any apparent reason.  The action-if-true and action-if-false parameters 
to AC_COMPILE_IFELSE are optional according to the writeup and my 
testing.


  Mike

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-06-12 Thread Aaron Laws
I just updated guid.cpp to use boost, and I was very pleased at the
lack of explosions :-)  I issued a pull request to jralls, but for
general perusal, you can see it here:
https://github.com/limitedAtonement/gnucash/commit/3dc5159cb57f25dc606416263bee8b23da3e6ffe

In Christ,
Aaron Laws


On Mon, Apr 28, 2014 at 2:06 PM, John Ralls  wrote:
>
> On Apr 28, 2014, at 10:55 AM, Mike Alexander  wrote:
>
>> --On April 28, 2014 9:04:06 AM -0700 John Ralls  wrote:
>>
>>>
>>> On Apr 28, 2014, at 8:51 AM, Mike Alexander  wrote:
>>>
 --On April 28, 2014 7:47:07 AM -0700 John Ralls 
 wrote:

> I'll make gnucash-bin.cpp after that.

 Why not do it first?  It needs to be done sooner or later and that
 might avoid some of the explosions.
>>>
>>> I *want* the explosions. Think of it as test-driven development on a
>>> larger scale: You can't see what effect a fix has if you don't break
>>> it first. OTOH, if it breaks and you fix it, then the next time you
>>> see similar symptoms you already know how to deal with it.
>>
>> If that's what you want, that's ok with me.  Having lived through that 
>> particular set of explosions once I'm not particularly interested in doing 
>> it again, so I'll wait for the dust to settle.
>
> And I’ll try to keep the dust to myself, unlike last weekend.
>
> Regards,
> John Ralls
>
>
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-04-29 Thread Geert Janssens
I noticed this as well with John's c++ related commits. It appears that the 
mail script will only 
print diffs for commits that are pushed directly to a branch and not for 
commits that get 
merged in.

I seem to remember this was explained in the beginning of these mails before 
John reduced the 
verbosity.

We may want to change this. Particularly for John's work which happens on a 
private branch and 
only gets merged into our public repo.

Geert

On Tuesday 29 April 2014 11:02:08 Derek Atkins wrote:
> Any reason why the email script didn't print out a 'diff' for this
> changeset?
> 
> -derek
> 
> Geert Janssens  writes:
> > Updated  via  https://github.com/Gnucash/gnucash/commit/8784b944
> > (commit)> 
> >  via  https://github.com/Gnucash/gnucash/commit/c4bbd145 (commit)
> > 
> > from  https://github.com/Gnucash/gnucash/commit/5bc25031 (commit)
> > 
> > Summary of changes:
> >  configure.ac | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > ___
> > gnucash-changes mailing list
> > gnucash-chan...@gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-changes

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-04-29 Thread Derek Atkins
Any reason why the email script didn't print out a 'diff' for this
changeset?

-derek

Geert Janssens  writes:

> Updatedvia  https://github.com/Gnucash/gnucash/commit/8784b944 
> (commit)
>via  https://github.com/Gnucash/gnucash/commit/c4bbd145 (commit)
>   from  https://github.com/Gnucash/gnucash/commit/5bc25031 (commit)
>
>
>
>
>
> Summary of changes:
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> ___
> gnucash-changes mailing list
> gnucash-chan...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-changes
>
>

-- 
   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
   warl...@mit.eduPGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-28 Thread John Ralls

On Apr 28, 2014, at 10:55 AM, Mike Alexander  wrote:

> --On April 28, 2014 9:04:06 AM -0700 John Ralls  wrote:
> 
>> 
>> On Apr 28, 2014, at 8:51 AM, Mike Alexander  wrote:
>> 
>>> --On April 28, 2014 7:47:07 AM -0700 John Ralls 
>>> wrote:
>>> 
 I'll make gnucash-bin.cpp after that.
>>> 
>>> Why not do it first?  It needs to be done sooner or later and that
>>> might avoid some of the explosions.
>> 
>> I *want* the explosions. Think of it as test-driven development on a
>> larger scale: You can't see what effect a fix has if you don't break
>> it first. OTOH, if it breaks and you fix it, then the next time you
>> see similar symptoms you already know how to deal with it.
> 
> If that's what you want, that's ok with me.  Having lived through that 
> particular set of explosions once I'm not particularly interested in doing it 
> again, so I'll wait for the dust to settle.

And I’ll try to keep the dust to myself, unlike last weekend.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-28 Thread Mike Alexander
--On April 28, 2014 9:04:06 AM -0700 John Ralls  
wrote:




On Apr 28, 2014, at 8:51 AM, Mike Alexander  wrote:


--On April 28, 2014 7:47:07 AM -0700 John Ralls 
wrote:


I'll make gnucash-bin.cpp after that.


Why not do it first?  It needs to be done sooner or later and that
might avoid some of the explosions.


I *want* the explosions. Think of it as test-driven development on a
larger scale: You can't see what effect a fix has if you don't break
it first. OTOH, if it breaks and you fix it, then the next time you
see similar symptoms you already know how to deal with it.


If that's what you want, that's ok with me.  Having lived through that 
particular set of explosions once I'm not particularly interested in 
doing it again, so I'll wait for the dust to settle.


  Mike

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-28 Thread John Ralls

On Apr 28, 2014, at 8:51 AM, Mike Alexander  wrote:

> --On April 28, 2014 7:47:07 AM -0700 John Ralls  wrote:
> 
>> I'll make gnucash-bin.cpp after that.
> 
> Why not do it first?  It needs to be done sooner or later and that might 
> avoid some of the explosions.

I *want* the explosions. Think of it as test-driven development on a larger 
scale: You can't see what effect a fix has if you don't break it first. OTOH, 
if it breaks and you fix it, then the next time you see similar symptoms you 
already know how to deal with it.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-28 Thread Mike Alexander
--On April 28, 2014 7:47:07 AM -0700 John Ralls  
wrote:



I'll make gnucash-bin.cpp after that.


Why not do it first?  It needs to be done sooner or later and that 
might avoid some of the explosions.


 Mike

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-28 Thread John Ralls

On Apr 27, 2014, at 7:58 PM, Mike Alexander  wrote:

> On Apr 27, 2014, at 5:15 PM, John Ralls  wrote:
>> 
>> However, I don’t think changing files one by one is wise: It will result in 
>> libraries with objects compiled with different compilers, and I worry that 
>> that will introduce difficult to understand bugs. That’s not a matter for 
>> immediate concern, though, as I expect libqof will consume several months 
>> before I’ll start on another directory.
> 
> I don't think that will be as big a problem as you are afraid it will be.  
> For 10 years or so I worked on a program about the same size as GnuCash that 
> we gradually converted from C to C++.  Mixing the languages in a library or 
> between libraries didn't seem to be a problem.  We had some new libraries 
> that were entirely C++, some that were a mixture, and some that never got 
> touched and stayed in C.
> 
> However, there is one thing I wonder about.  When we first started the 
> conversion one of the first things we had to do was add a new main program 
> written in C++ that did a minimal amount of initialization and then called 
> the old main program (renamed appropriately).  Many C++ features didn't work 
> right without that, although the basic stuff worked ok.  I think we should do 
> the same thing in GnuCash as soon as possible to avoid problems.

I agree, though I want to see what happens when I start introducing templated 
code at the library level. My next experiment will be to replace the guts of 
GncGUID with boost::guid, which should be pretty simple. Just about everything 
in GnuCash uses it, so it has a nice potential for spectacular explosions that 
will tell me if this approach is going to work out. Kind of a "Mythbusters" 
approach to programming. ;-)

I'll make gnucash-bin.cpp after that.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-27 Thread Mike Alexander
On Apr 27, 2014, at 5:15 PM, John Ralls  wrote:
> 
> However, I don’t think changing files one by one is wise: It will result in 
> libraries with objects compiled with different compilers, and I worry that 
> that will introduce difficult to understand bugs. That’s not a matter for 
> immediate concern, though, as I expect libqof will consume several months 
> before I’ll start on another directory.

I don't think that will be as big a problem as you are afraid it will be.  For 
10 years or so I worked on a program about the same size as GnuCash that we 
gradually converted from C to C++.  Mixing the languages in a library or 
between libraries didn't seem to be a problem.  We had some new libraries that 
were entirely C++, some that were a mixture, and some that never got touched 
and stayed in C.

However, there is one thing I wonder about.  When we first started the 
conversion one of the first things we had to do was add a new main program 
written in C++ that did a minimal amount of initialization and then called the 
old main program (renamed appropriately).  Many C++ features didn't work right 
without that, although the basic stuff worked ok.  I think we should do the 
same thing in GnuCash as soon as possible to avoid problems.

 Mike
 

smime.p7s
Description: S/MIME cryptographic signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-27 Thread John Ralls

On Apr 27, 2014, at 2:15 PM, John Ralls  wrote:

> 
> On Apr 27, 2014, at 2:01 PM, Mike Alexander  wrote:
> 
>> --On April 27, 2014 10:06:24 PM +0200 Christian Stimming 
>>  wrote:
>> 
>>> Can we please trigger the switch from C to C++ by renaming the files,
>>> one by  one? This makes it clear which files have to adhere to C++
>>> rules and which  ones don't have to. Thanks!
>> 
>> I agree with this.  Compiling C files as C++ causes problems in configure 
>> too.  It tries to use the C compiler arguments for C++ programs.  In the 
>> changes I just pushed, I put a kluge into configure.ac to get around this, 
>> but it isn't very pretty.
> 
> OK, and I agree about the configure issues.
> 
> My intention was to change the suffix as I rewrote each file into proper C++, 
> but given Christian’s and your concerns, I’ll rename all of the files in 
> libqof as soon as I finish fixing up the Windows build.
> 
> However, I don’t think changing files one by one is wise: It will result in 
> libraries with objects compiled with different compilers, and I worry that 
> that will introduce difficult to understand bugs. That’s not a matter for 
> immediate concern, though, as I expect libqof will consume several months 
> before I’ll start on another directory.

Pushed to master as dbe336cd.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-27 Thread John Ralls

On Apr 27, 2014, at 2:01 PM, Mike Alexander  wrote:

> --On April 27, 2014 10:06:24 PM +0200 Christian Stimming 
>  wrote:
> 
>> Can we please trigger the switch from C to C++ by renaming the files,
>> one by  one? This makes it clear which files have to adhere to C++
>> rules and which  ones don't have to. Thanks!
> 
> I agree with this.  Compiling C files as C++ causes problems in configure 
> too.  It tries to use the C compiler arguments for C++ programs.  In the 
> changes I just pushed, I put a kluge into configure.ac to get around this, 
> but it isn't very pretty.

OK, and I agree about the configure issues.

My intention was to change the suffix as I rewrote each file into proper C++, 
but given Christian’s and your concerns, I’ll rename all of the files in libqof 
as soon as I finish fixing up the Windows build.

However, I don’t think changing files one by one is wise: It will result in 
libraries with objects compiled with different compilers, and I worry that that 
will introduce difficult to understand bugs. That’s not a matter for immediate 
concern, though, as I expect libqof will consume several months before I’ll 
start on another directory.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-27 Thread Mike Alexander
--On April 27, 2014 10:06:24 PM +0200 Christian Stimming 
 wrote:



Can we please trigger the switch from C to C++ by renaming the files,
one by  one? This makes it clear which files have to adhere to C++
rules and which  ones don't have to. Thanks!


I agree with this.  Compiling C files as C++ causes problems in 
configure too.  It tries to use the C compiler arguments for C++ 
programs.  In the changes I just pushed, I put a kluge into 
configure.ac to get around this, but it isn't very pretty.


   Mike

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

2014-04-27 Thread Christian Stimming
Hi John,

in bedf00a160669a86942a1b52f47c65b8c45c9552 you said you changed "LibQOF to be 
compiled as C++", which you did by adding "-xc++"  to the CFLAGS, but leaving 
the file suffixes as ".c".

This isn't nice. The convention throughout all projects that I know so far is 
that if the file ends in .c, it's a C file that gets compiled as C code, 
whereas if the file name ends in .cpp or .cc or whatever else is the preferred 
convention, it's a C++ file that gets compiled as C++. This is also what the 
CMake tools expect and use as heuristic for choosing to appropriate compiler, 
let alone any other build system out there.

If we want to switch all files from C to C++, can we please please also change 
the file name suffix accordingly? If we don't want to switch the files to C++, 
then just leave the name as is but also stick to compiling this as C. I 
consider the magic -xc++ switch by gcc to be some very unexpected workaround 
to trick a .c file into something else.

Can we please trigger the switch from C to C++ by renaming the files, one by 
one? This makes it clear which files have to adhere to C++ rules and which 
ones don't have to. Thanks!

Regards,

Christian

Am Freitag, 25. April 2014, 16:42:42 schrieb John Ralls:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/daf44808 
> (commit)
>via  https://github.com/Gnucash/gnucash/commit/bedf00a1 (commit)
>via  https://github.com/Gnucash/gnucash/commit/3abf8b47 (commit)
>   from  https://github.com/Gnucash/gnucash/commit/e6c36983 (commit)
> 
> 
> 
> 
> 
> Summary of changes:
>  po/POTFILES.in|   3 +-
>  src/backend/dbi/gnc-backend-dbi.c |   4 -
>  src/backend/xml/gnc-backend-xml.c |   2 -
>  src/backend/xml/sixtp-dom-generators.c|   3 +-
>  src/engine/engine-helpers.c   |   3 +-
>  src/engine/kvp-scm.c  |   4 +-
>  src/engine/test/Makefile.am   |   4 +-
>  src/engine/test/utest-Split.c |  36 ++--
>  src/libqof/qof/Makefile.am|  16 +-
>  src/libqof/qof/gnc-date.c |  44 +++--
>  src/libqof/qof/gnc-date.h |  10 +-
>  src/libqof/qof/{gnc-numeric.c => gnc-numeric.cpp} |  11 +-
>  src/libqof/qof/gnc-numeric.h  |   8 +
>  src/libqof/qof/guid.c |  18 +-
>  src/libqof/qof/guid.h |   9 +
>  src/libqof/qof/kvp-util-p.h   |   9 +
>  src/libqof/qof/kvp-util.c |  15 +-
>  src/libqof/qof/kvp-util.h |   9 +
>  src/libqof/qof/kvp_frame.c|  44 +++--
>  src/libqof/qof/kvp_frame.h|  10 ++
>  src/libqof/qof/qof-string-cache.c |  13 +-
>  src/libqof/qof/qof-string-cache.h |   9 +
>  src/libqof/qof/qof-win32.c|   9 +
>  src/libqof/qof/qof.h  |   1 -
>  src/libqof/qof/qofbackend-p.h |  17 +-
>  src/libqof/qof/qofbackend.c   |  12 +-
>  src/libqof/qof/qofbackend.h   |   8 +
>  src/libqof/qof/qofbook-p.h|   9 +
>  src/libqof/qof/qofbook.c  |  30 ++--
>  src/libqof/qof/qofbook.h  |  11 +-
>  src/libqof/qof/qofchoice.c|  18 +-
>  src/libqof/qof/qofchoice.h|   9 +
>  src/libqof/qof/qofclass.c |  33 ++--
>  src/libqof/qof/qofclass.h |   9 +
>  src/libqof/qof/qofevent.c |  18 +-
>  src/libqof/qof/qofevent.h |   9 +
>  src/libqof/qof/qofid-p.h  |   9 +
>  src/libqof/qof/qofid.c|  18 +-
>  src/libqof/qof/qofid.h|   9 +
>  src/libqof/qof/qofinstance-p.h|   9 +
>  src/libqof/qof/qofinstance.c  |  26 ++-
>  src/libqof/qof/qoflog.c   |  18 +-
>  src/libqof/qof/qoflog.h   |  13 +-
>  src/libqof/qof/qofobject-p.h  |   9 +
>  src/libqof/qof/qofobject.c|  48 --
>  src/libqof/qof/qofobject.h|   9 +
>  src/libqof/qof/qofquery-p.h   |   9 +
>  src/libqof/qof/qofquery.c | 190
> +++- src/libqof/qof/qofquery.h |  
> 9 +
>  src/libqof/qof/qofquerycore.c |  79 +
>  src/libqof/qof/qofquerycore.h |   9 +
>  src/libqof/qof/qofreference.c | 179 ---
> src/libqof/qof/qofreference.h | 200
> -- src/libqof/qof/qofsession-p.h | 
>  9 +
>  sr

Re: gnucash master: Multiple changes pushed

2014-03-31 Thread John Ralls

On Mar 31, 2014, at 1:51 PM, Christian Stimming  wrote:

> Hi John,
> 
> in the commit message you wrote "gwenhywfar-4.10.0 breaks the  build", but 
> have you actually checked 4.10.0?  I only have a mingw cross-compiler here 
> which runs fine with 4.10.0 but IIRC also did 4.11.0 correctly, so I'm not 
> sure whether you've observed something that I didn't. Surely 4.9.0 was fine, 
> but IMHO 4.10.0 should be, too.
> 
> However, the actual change that caused the error (in gwenhyfar/gui_be.h) was 
> introduced only between 4.10.0 and 4.11.0, so a pure gwenhywfar-4.10.0 
> installation will not run into this issue. However, the scripts might not 
> correctly remove an old version, which can cause problems when compiling 4.10 
> while 4.11 headers are already in the install prefix. Maybe this caused the 
> abort here? Or maybe all is fine now.
> 

Christian, I did try 4.10 and got the same error, or maybe a similar, error. I 
build using the packaging/win32 scripts, just like the buildbot, except I’m 
using Win7 HP instead of XP.

As it happened I wound up reverting that partial change because when building 
the release it failed at AQB for a too-old Gwen. 

You can see that the 4.9->4.11 change broke the trunk build from the day after 
it was committed.

Anyway, the solution is to go re-apply ae26a29 and figure out where that 
libintl_printf reference is coming from. It’s not actually in the Gwen code, so 
it must be coming from one of Martin’s macros.

Regards,
John Ralls



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnucash master: Multiple changes pushed

2014-03-31 Thread Christian Stimming
Hi John,

in the commit message you wrote "gwenhywfar-4.10.0 breaks the  build", but 
have you actually checked 4.10.0?  I only have a mingw cross-compiler here 
which runs fine with 4.10.0 but IIRC also did 4.11.0 correctly, so I'm not 
sure whether you've observed something that I didn't. Surely 4.9.0 was fine, 
but IMHO 4.10.0 should be, too.

However, the actual change that caused the error (in gwenhyfar/gui_be.h) was 
introduced only between 4.10.0 and 4.11.0, so a pure gwenhywfar-4.10.0 
installation will not run into this issue. However, the scripts might not 
correctly remove an old version, which can cause problems when compiling 4.10 
while 4.11 headers are already in the install prefix. Maybe this caused the 
abort here? Or maybe all is fine now.

Regards,

Christian


Am Samstag, 29. März 2014, 01:56:09 schrieb John Ralls:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/4e5e0621 
> (commit)
>via  https://github.com/Gnucash/gnucash/commit/1b269e17 (commit)
>via  https://github.com/Gnucash/gnucash/commit/963c8a00 (commit)
>   from  https://github.com/Gnucash/gnucash/commit/9293f480 (commit)
> 
> 
> 
> commit 4e5e0621322147ff6ada9d72ace36e213dec61c7
> Author: John Ralls 
> Date:   Fri Mar 28 22:52:45 2014 -0700
> 
> Win32: Roll back Gwenhywfar to 4.9.0 to resolve broken build.
> 
> cc1.exe: warnings being treated as errors
> In file included from
> c:/soft/aqbanking/include/aqbanking5/aqbanking/abgui.h:16:0, from
> ../../../../repos/src/import-export/aqb/gnc-ab-utils.c:52:
> c:/soft/gwenhywfar/include/gwenhywfar4/gwenhywfar/gui_be.h:60:10: error:
> 'libintl_printf' is an unrecognized format function type make[5]: ***
> [gnc-ab-utils.lo] Error 1
> 
> commit 1b269e17cd93085c25c5a4cab3b2c1e801e9
> Author: John Ralls 
> Date:   Fri Mar 28 21:47:41 2014 -0700
> 
> Ensure that the autoconf and automake checked are the ones we install
> 
> rather than some random one installed elsewhere on the path.
> 
> commit 963c8a0048c9bf9d1291962fc926e25788b7a19b
> Author: John Ralls 
> Date:   Fri Mar 28 21:46:26 2014 -0700
> 
> Update Active Perl version to the one current "community edition".
> 
> 
> 
> Summary of changes:
>  packaging/win32/defaults.sh | 4 ++--
>  packaging/win32/install-impl.sh | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> ___
> gnucash-patches mailing list
> gnucash-patc...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel