Re: [GNC] Fail to build gnucash on MINGW32, gwenhywfar compile error

2024-08-12 Thread Hai Liang Wang
Still no luck, I believe this is related with gcc on MINGW i686 arch.
Some mistery about `__attribute__((stdcall))` -
https://github.com/msys2/MINGW-packages/issues/6481

Hope more help, thanks.

Cheers.
Hai Liang W.


On Mon, Aug 12, 2024 at 2:27 PM Hai Liang Wang 
wrote:

>
> The compiler fails, due to the type of the second argument, which here
> attached `__attribute__((stdcall))`.
> Where does this prefix come from? Is it only for building on i686 machine?
>
> *I wonder which msys2 arch is used for the nightly build  job of windows?*
> i686 or x86_64, is the CI Job script available?
> https://code.gnucash.org/builds/win32/stable/
>
>
> Cheers.
> Hai Liang W.
>
>
> On Mon, Aug 12, 2024 at 2:09 PM Hai Liang Wang 
> wrote:
>
>> John,
>>
>> Thanks for your quick response, it's not the same root cause.
>> I can not find the *cardsdialog.c,* *provider_request.c* as you
>> mentioned.
>>
>> The problem also exist on a previous version of gnucash modules, which
>> references gwenhywfar-5.10.2.tar.gz.
>>
>> https://github.com/Gnucash/gnucash-on-windows/blob/e9edf33a2dcd4cb03c6dc49730595d0e07c294d2/gnucash.modules
>>
>> As I rollback gnucash module as running build against it.
>> Same error happens on my machine.
>>
>> C:/gcdev64/gnucash/stable/src/gwenhywfar-5.10.2/tools/gcttool/main.c: In
>> function 'main':
>> C:/gcdev64/gnucash/stable/src/
>> *gwenhywfar-5.10.2/tools/gcttool/main.c:182:45*: error: passing argument
>> 2 of 'GWEN_Gui_SetKeyDataFromTextOpen
>> SslFn' from incompatible pointer type [-Wincompatible-pointer-types]
>>   182 |   GWEN_Gui_SetKeyDataFromTextOpenSslFn(gui,
>> getKeyDataFromTextOpenSSL);
>>   |
>>  ^
>>   | |
>>   | int (*)(GWEN_GUI *,
>> const char *, unsigned char *, unsigned int)
>> In file included from
>> C:/gcdev64/gnucash/stable/src/gwenhywfar-5.10.2/tools/gcttool/main.c:37:
>> ../../gwenhywfar5/gwenhywfar/gui_be.h:297:110: note: expected
>> 'GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN' {aka 'int (__attribute__((stdcall)) *)
>> (GWEN_GUI *, const char *, unsigned char *, unsigned int)'} but argument
>> is of type 'int (*)(GWEN_GUI *, const char *, unsigned char *, un
>> signed int)'
>>   297 |
>> GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN f);
>>   |
>> ^
>> make[3]: *** [Makefile:653: main.o] Error 1
>> make[3]: *** Waiting for unfinished jobs
>>
>> Note, this time, I switch to mingw64.exe,  my mingw64 is based
>> on msys2-base-i686,
>>
>> Cheers.
>> Hai Liang W.
>>
>>
>> On Mon, Aug 12, 2024 at 12:57 PM John Ralls  wrote:
>>
>>> That’s https://aquamaniac.de/rdm/issues/306. Apply this patch:
>>>
>>>
>>> --- a/src/libs/plugins/backends/aqgivve/cardsdialog.c 2024-04-28
>>> 06:54:15.0 -0700
>>> +++ b/src/libs/plugins/backends/aqgivve/cardsdialog.c 2024-06-22
>>> 14:32:30.624058500 -0700
>>> @ -57,7 +57,7 @
>>>
>>> -void _freeData(void *bp, void *p)
>>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>>> AG_CARDS_DIALOG *xdlg;
>>>
>>> @ -88,7 +88,7 @
>>>
>>> -int _dlgSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const
>>> char *sender)
>>> +int GWENHYWFAR_CB _dlgSignalHandler(GWEN_DIALOG *dlg,
>>> GWEN_DIALOG_EVENTTYPE t, const char *sender) {
>>> switch (t) {
>>> case GWEN_DialogEvent_TypeInit :
>>>
>>> --- a/src/libs/plugins/backends/aqgivve/provider_request.c 2024-03-19
>>> 14:48:38.0 -0700
>>> +++ b/src/libs/plugins/backends/aqgivve/provider_request.c 2024-06-22
>>> 14:34:01.041737100 -0700
>>> @ -48,14 +48,14 @
>>>
>>> -void _freeData(void *bp, void *p)
>>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>>> free(p);
>>> }
>>>
>>> -int _cbInitSyncIo(GWEN_HTTP_SESSION *sess, GWEN_SYNCIO *sio)
>>> +int GWENHYWFAR_CB _cbInitSyncIo(GWEN_HTTP_SESSION *sess, GWEN_SYNCIO
>>> *sio) {
>>> AG_HTTP_SESSION_HEADER *xsess;
>>>
>>> --- a/src/libs/plugins/backends/aqgivve/userdialog.c 2024-01-07
>>> 11:29:43.0 -0800
>>> +++ b/src/libs/plugins/backends/aqgivve/userdialog.c 2024-06-22
>>> 14:35:30.632390300 -0700
>>> @ -42,7 +42,7 @
>>>
>>> -void _freeData(void *bp, void *p)
>>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>>> }
>>>
>>> @ -98,7 +98,7 @
>>>
>>> -int _dlgSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const
>>> char *sender)
>>> +int GWENHYWFAR_CB _dlgSignalHandler(GWEN_DIALOG *dlg,
>>> GWEN_DIALOG_EVENTTYPE t, const char *sender) {
>>> switch (t) {
>>> case GWEN_DialogEvent_TypeInit :
>>>
>>> Regards,
>>>
>>> John Ralls
>>>
>>>
>>>
>>> On Aug 11, 2024, at 20:04, Hai Liang Wang 
>>> wrote:
>>>
>>> Hi, folks
>>>
>>> After reading guide with
>>> https://wiki.gnucash.org/wiki/Building_on_Windows,
>>> I setup MINGW32 on my windows to build gnuash from sourcecodes.
>>>
>>> *Command I use to build binary installer.*
>>>
>>> cd /c/gcdev64/src/gnucash-on-windows.git
>>>
>>> TARGET=gnucash-stable jhbuild -f jhbuildrc build --nodeps
>>>
>>> *Come to below error:*
>>>
>>

Re: [GNC] Get Quotes hung

2024-08-12 Thread Fred Tydeman
The currency problem was my fault.
In moving to a newer Linux and Gnucash,
I forgot to set the Alphavantage key.
That part is working OK now.

On Sun, Aug 11, 2024 at 7:47 AM Fred Tydeman  wrote:

> Fedora Linux 40
> Gnucash 5.8
>
> Trying this on another file/book that has no stocks, but does have
> four currencies gets: Quote reported failure set no error.
> for all of them.
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Move working files

2024-08-12 Thread R Losey
On Sun, Aug 11, 2024 at 7:59 AM Michael or Penny Novack <
stepbystepf...@comcast.net> wrote:

> On 8/10/2024 10:15 PM, R Losey wrote:
>
> >
> > You misunderstood. I don't want a script to move the working files - I
> > was wondering if there were some setting that would put the working
> > files (the temporary .gnucash file and the logs) in a separate
> > directory.  It turns out there isn't, so I'll have to exclude the
> > files using the backup software.
> >
> > I didn't specify the software, as I was NOT asking how to configure it
> > to exclude files.
>
> And you misunderstood me also.
>
> I was not asking what software you were using to do the backup as much
> as how you invoked that software. And THAT does makes OS, relevant, for
> example:
>
> I would not expect a typical Windows user to be using scripts. But I
> would expect a typical 'nix user to be doing that or at least be willing
> to learn how.  So..
>
> If the script NOW (when executed) runs the backup not a big deal to make
> that first run the find and move script and then the backup part.
>
> Michael D Novack
>

Fair enough, but it's still not what I was after. I could easily write a
cron job to move the working files each day before the sync job runs, but
before I did that, it would be easier to exclude the working files from the
sync job, which is what I did.

The backup/sync is a gui that is scheduled to run in the wee hours. I
supposed it could be invoked by a script; I don't know.

I started to exclude files, and then thought that perhaps there is a way to
specify the directory for those "working" files, so I asked. Once I learned
that there wasn't, I continued with the task of excluding them... I checked
the next run, and it's working correctly.

Thanks

-- 
_
Richard Losey
rlo...@gmail.com
Micah 6:8
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Fail to build gnucash on MINGW32, gwenhywfar compile error

2024-08-12 Thread John Ralls
The 5.10.2 build problem is the same root cause and is fixed with 
https://github.com/Gnucash/gnucash-on-windows/blob/master/patches/gwenhywfar-bug-274.patch.
 That patch is applied in 5.11.2beta but the AQBanking developer made the same 
mistake when he created the argivve backend plugin, requiring the second patch.

You have to change directory to 
c:\gcdev64\gnucash\stable\src\gwenhjywvar-5.11.2beta. Patches are applied with 
-p1 following git standard practice so the rest of the path is relative to the 
source directory.

There’s no such thing as mingw64.exe, but as long as you’re using the Mingw32 
(i686) environment installed when you ran setup-mingw64.ps1 you’ll be OK. The 
Mingw64 (x86_64) won’t work because there’s no webkitgtk package for it.

Regards,
John Ralls


> On Aug 11, 2024, at 23:09, Hai Liang Wang  wrote:
> 
> John, 
> 
> Thanks for your quick response, it's not the same root cause.
> I can not find the cardsdialog.c, provider_request.c as you mentioned.
> 
> The problem also exist on a previous version of gnucash modules, which 
> references gwenhywfar-5.10.2.tar.gz.
> https://github.com/Gnucash/gnucash-on-windows/blob/e9edf33a2dcd4cb03c6dc49730595d0e07c294d2/gnucash.modules
> 
> As I rollback gnucash module as running build against it.
> Same error happens on my machine.
> 
> C:/gcdev64/gnucash/stable/src/gwenhywfar-5.10.2/tools/gcttool/main.c: In 
> function 'main':
> C:/gcdev64/gnucash/stable/src/gwenhywfar-5.10.2/tools/gcttool/main.c:182:45: 
> error: passing argument 2 of 'GWEN_Gui_SetKeyDataFromTextOpen
> SslFn' from incompatible pointer type [-Wincompatible-pointer-types]
>   182 |   GWEN_Gui_SetKeyDataFromTextOpenSslFn(gui, 
> getKeyDataFromTextOpenSSL);
>   | ^
>   | |
>   | int (*)(GWEN_GUI *, const 
> char *, unsigned char *, unsigned int)
> In file included from 
> C:/gcdev64/gnucash/stable/src/gwenhywfar-5.10.2/tools/gcttool/main.c:37:
> ../../gwenhywfar5/gwenhywfar/gui_be.h:297:110: note: expected 
> 'GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN' {aka 'int (__attribute__((stdcall)) *)
> (GWEN_GUI *, const char *, unsigned char *, unsigned int)'} but argument is 
> of type 'int (*)(GWEN_GUI *, const char *, unsigned char *, un
> signed int)'
>   297 |   
>GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN f);
>   |   
>^
> make[3]: *** [Makefile:653: main.o] Error 1
> make[3]: *** Waiting for unfinished jobs
> 
> Note, this time, I switch to mingw64.exe,  my mingw64 is based on 
> msys2-base-i686,
> 
> Cheers.
> Hai Liang W.
> 
> 
> On Mon, Aug 12, 2024 at 12:57 PM John Ralls  > wrote:
>> That’s https://aquamaniac.de/rdm/issues/306. Apply this patch:
>> 
>> 
>> --- a/src/libs/plugins/backends/aqgivve/cardsdialog.c 2024-04-28 
>> 06:54:15.0 -0700
>> +++ b/src/libs/plugins/backends/aqgivve/cardsdialog.c 2024-06-22 
>> 14:32:30.624058500 -0700
>> @ -57,7 +57,7 @
>> 
>> -void _freeData(void *bp, void *p)
>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>> AG_CARDS_DIALOG *xdlg;
>> 
>> @ -88,7 +88,7 @
>> 
>> -int _dlgSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char 
>> *sender)
>> +int GWENHYWFAR_CB _dlgSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE 
>> t, const char *sender) {
>> switch (t) {
>> case GWEN_DialogEvent_TypeInit :
>> 
>> --- a/src/libs/plugins/backends/aqgivve/provider_request.c 2024-03-19 
>> 14:48:38.0 -0700
>> +++ b/src/libs/plugins/backends/aqgivve/provider_request.c 2024-06-22 
>> 14:34:01.041737100 -0700
>> @ -48,14 +48,14 @
>> 
>> -void _freeData(void *bp, void *p)
>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>> free(p);
>> }
>> 
>> -int _cbInitSyncIo(GWEN_HTTP_SESSION *sess, GWEN_SYNCIO *sio)
>> +int GWENHYWFAR_CB _cbInitSyncIo(GWEN_HTTP_SESSION *sess, GWEN_SYNCIO *sio) {
>> AG_HTTP_SESSION_HEADER *xsess;
>> 
>> --- a/src/libs/plugins/backends/aqgivve/userdialog.c 2024-01-07 
>> 11:29:43.0 -0800
>> +++ b/src/libs/plugins/backends/aqgivve/userdialog.c 2024-06-22 
>> 14:35:30.632390300 -0700
>> @ -42,7 +42,7 @
>> 
>> -void _freeData(void *bp, void *p)
>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>> }
>> 
>> @ -98,7 +98,7 @
>> 
>> -int _dlgSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char 
>> *sender)
>> +int GWENHYWFAR_CB _dlgSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE 
>> t, const char *sender) {
>> switch (t) {
>> case GWEN_DialogEvent_TypeInit :
>> 
>> Regards,
>> 
>> John Ralls
>> 
>> 
>> 
>> 
>>> On Aug 11, 2024, at 20:04, Hai Liang Wang >> > wrote:
>>> 
>>> Hi, folks
>>> 
>>> After reading guide with https://wiki.gnucash.org/wiki/Building_on_Windows,
>>> I setup MI

[GNC] Python bindings ERROR g_variant_unref: assertion 'value != NULL' failed

2024-08-12 Thread Gere Kiss Zsolt
Hi all,

I've been using GnuCash for several years now and I'd like to try some
Python bindings to enter transactions programmatically.

I've browsed all the documentation I've seen on the topic. Unfortunately
all my attempts stop with an ERROR  g_variant_unref: assertion 'value
!= NULL' failed when trying to import gnucash. Here is my system info:

OS: Ubuntu 22.04.4 LTS

OS package gnucash installed with apt:

Package: gnucash
Version: 1:4.8-1build2
New: yes
State: installed
Automatically installed: no
Priority: extra
Section: universe/gnome
Maintainer: Ubuntu Developers 
Architecture: amd64
Uncompressed Size: 32,7 M
Depends: gnucash-common (= 1:4.8-1build2), guile-3.0-libs,
libaqbanking44 (>= 5.99.43), libboost-filesystem1.74.0 (>= 1.74.0),
libboost-locale1.74.0
 (>= 1.74.0), libboost-program-options1.74.0 (>= 1.74.0),
libboost-regex1.74.0-icu70, libc6 (>= 2.34), libcairo2 (>= 1.2.4),
libdbi1 (>=
 0.9.0), libgcc-s1 (>= 3.3.1), libgdk-pixbuf-2.0-0 (>=
2.22.0), libglib2.0-0 (>= 2.45.3), libgtk-3-0 (>= 3.21.5),
libgwengui-gtk3-79 (>=
 5.4.0~), libgwenhywfar79 (>= 4.1.0), libicu70 (>= 70.1-1~),
libofx7 (>= 0.9.14), libpango-1.0-0 (>= 1.18.0), libpangocairo-1.0-0
(>= 1.14.0),
 libpython3.10 (>= 3.10.0), libsecret-1-0 (>= 0.7), libstdc++6
(>= 11), libwebkit2gtk-4.0-37 (>= 2.30.1~), libxml2 (>= 2.7.4), zlib1g
(>=
 1:1.1.4), perl:any, guile-3.0 | guile-2.2 | guile-2.0,
libfinance-quote-perl, libwww-perl, libhtml-tree-perl,
libhtml-tableextract-perl,
 libcrypt-ssleay-perl, libdate-manip-perl
Recommends: gnucash-docs, python3-gnucash, yelp
Suggests: libdbd-mysql, libdbd-pgsql, libdbd-sqlite3
Breaks: gnucash-common (< 1:2.4.8-1~)
Replaces: gnucash-common (< 1:2.4.8-1~)

GnuCash version shown on the UI: 4.8 (but tried also 5.X, to no avail)

Other gnucash related OS packages:

   - gnucash-common
   - gnucash-docs
   - python3-gnucash

The package python3-gnucash contains the bindings shared libraries, like:

/usr/lib/python3/dist-packages/gnucash
/usr/lib/python3/dist-packages/gnucash/__init__.py
/usr/lib/python3/dist-packages/gnucash/_gnucash_core_c.cpython-310-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/gnucash/_sw_app_utils.cpython-310-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/gnucash/_sw_core_utils.cpython-310-x86_64-linux-gnu.so
...

and /usr/lib/python3/dist-packages is in the Python sys path. However:

Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gnucash
* 11:41:04 ERROR  g_variant_unref: assertion 'value != NULL' failed

Can somebody give a clue about why this happens?

Thank you,
   Zsolt

---
„We have two lives, and the second begins when we realize we only have one.”
-- Confucius
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Get Quotes hung

2024-08-12 Thread Fred Tydeman
After reading the wiki, I have tried:
  gnucash-cli --log gnc.price-quotes=debug --quotes get tybor.gnucash
It finished after 6.5 hours!  Why so long now? As before, it took about 5
minutes.
With this book, it did not crash (the crash I got before was with another
book).
It did find 5 securities with errors (no listing found).
It appears to have updated the book with the prices of the good securities.
I have about 85 securities.

On Sun, Aug 11, 2024 at 1:47 PM Fred Tydeman  wrote:

> Fedora Linux 40
> Gnucash 5.8
>
> Running Tools: Price Database: Get Quotes hangs or runs "forever"
> All my stocks are setup to get prices via Yahoo_Jason
> Today I am in Medellin, Colombia, and my internet is very fast.
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Fail to build gnucash on MINGW32, gwenhywfar compile error

2024-08-12 Thread Hai Liang Wang
I have switched to i686 mingw and gwenhywfar 5.11.2beta. Just
checked gwenhywfar 5.11.2beta codes, the codes are updated with
gwenhywfar-bug-274.patch

.
I still can not find the sourcecode file with the second path, the argivve
backend plugin.
But I think the problem is not the same as
https://aquamaniac.de/rdm/issues/306 in my case.
The error trace on my machine is not the same as Issue 306.

I would try to solve it today, any help is appreciated.

Cheers.
Hai Liang W.


On Tue, Aug 13, 2024 at 2:25 AM John Ralls  wrote:

> The 5.10.2 build problem is the same root cause and is fixed with
> https://github.com/Gnucash/gnucash-on-windows/blob/master/patches/gwenhywfar-bug-274.patch.
> That patch is applied in 5.11.2beta but the AQBanking developer made the
> same mistake when he created the argivve backend plugin, requiring the
> second patch.
>
> You have to change directory to
> c:\gcdev64\gnucash\stable\src\gwenhjywvar-5.11.2beta. Patches are applied
> with -p1 following git standard practice so the rest of the path is
> relative to the source directory.
>
> There’s no such thing as mingw64.exe, but as long as you’re using the
> Mingw32 (i686) environment installed when you ran setup-mingw64.ps1 you’ll
> be OK. The Mingw64 (x86_64) won’t work because there’s no webkitgtk package
> for it.
>
> Regards,
> John Ralls
>
>
> On Aug 11, 2024, at 23:09, Hai Liang Wang 
> wrote:
>
> John,
>
> Thanks for your quick response, it's not the same root cause.
> I can not find the *cardsdialog.c,* *provider_request.c* as you mentioned.
>
> The problem also exist on a previous version of gnucash modules, which
> references gwenhywfar-5.10.2.tar.gz.
>
> https://github.com/Gnucash/gnucash-on-windows/blob/e9edf33a2dcd4cb03c6dc49730595d0e07c294d2/gnucash.modules
>
> As I rollback gnucash module as running build against it.
> Same error happens on my machine.
>
> C:/gcdev64/gnucash/stable/src/gwenhywfar-5.10.2/tools/gcttool/main.c: In
> function 'main':
> C:/gcdev64/gnucash/stable/src/
> *gwenhywfar-5.10.2/tools/gcttool/main.c:182:45*: error: passing argument
> 2 of 'GWEN_Gui_SetKeyDataFromTextOpen
> SslFn' from incompatible pointer type [-Wincompatible-pointer-types]
>   182 |   GWEN_Gui_SetKeyDataFromTextOpenSslFn(gui,
> getKeyDataFromTextOpenSSL);
>   |
>  ^
>   | |
>   | int (*)(GWEN_GUI *,
> const char *, unsigned char *, unsigned int)
> In file included from
> C:/gcdev64/gnucash/stable/src/gwenhywfar-5.10.2/tools/gcttool/main.c:37:
> ../../gwenhywfar5/gwenhywfar/gui_be.h:297:110: note: expected
> 'GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN' {aka 'int (__attribute__((stdcall)) *)
> (GWEN_GUI *, const char *, unsigned char *, unsigned int)'} but argument
> is of type 'int (*)(GWEN_GUI *, const char *, unsigned char *, un
> signed int)'
>   297 |
>   GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN f);
>   |
>   ^
> make[3]: *** [Makefile:653: main.o] Error 1
> make[3]: *** Waiting for unfinished jobs
>
> Note, this time, I switch to mingw64.exe,  my mingw64 is based
> on msys2-base-i686,
>
> Cheers.
> Hai Liang W.
>
>
> On Mon, Aug 12, 2024 at 12:57 PM John Ralls  wrote:
>
>> That’s https://aquamaniac.de/rdm/issues/306. Apply this patch:
>>
>>
>> --- a/src/libs/plugins/backends/aqgivve/cardsdialog.c 2024-04-28
>> 06:54:15.0 -0700
>> +++ b/src/libs/plugins/backends/aqgivve/cardsdialog.c 2024-06-22
>> 14:32:30.624058500 -0700
>> @ -57,7 +57,7 @
>>
>> -void _freeData(void *bp, void *p)
>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>> AG_CARDS_DIALOG *xdlg;
>>
>> @ -88,7 +88,7 @
>>
>> -int _dlgSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const
>> char *sender)
>> +int GWENHYWFAR_CB _dlgSignalHandler(GWEN_DIALOG *dlg,
>> GWEN_DIALOG_EVENTTYPE t, const char *sender) {
>> switch (t) {
>> case GWEN_DialogEvent_TypeInit :
>>
>> --- a/src/libs/plugins/backends/aqgivve/provider_request.c 2024-03-19
>> 14:48:38.0 -0700
>> +++ b/src/libs/plugins/backends/aqgivve/provider_request.c 2024-06-22
>> 14:34:01.041737100 -0700
>> @ -48,14 +48,14 @
>>
>> -void _freeData(void *bp, void *p)
>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>> free(p);
>> }
>>
>> -int _cbInitSyncIo(GWEN_HTTP_SESSION *sess, GWEN_SYNCIO *sio)
>> +int GWENHYWFAR_CB _cbInitSyncIo(GWEN_HTTP_SESSION *sess, GWEN_SYNCIO
>> *sio) {
>> AG_HTTP_SESSION_HEADER *xsess;
>>
>> --- a/src/libs/plugins/backends/aqgivve/userdialog.c 2024-01-07
>> 11:29:43.0 -0800
>> +++ b/src/libs/plugins/backends/aqgivve/userdialog.c 2024-06-22
>> 14:35:30.632390300 -0700
>> @ -42,7 +42,7 @
>>
>> -void _freeData(void *bp, void *p)
>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>> }
>>
>> @ -98,7 +98,7 @
>>
>> -int _dlgSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const
>> char *sender)
>

Re: [GNC] Fail to build gnucash on MINGW32, gwenhywfar compile error

2024-08-12 Thread Hai Liang Wang
I get a workaround, to cast the argument 2 as below.
Not sure the future impact, now it is compiled successfully.

*/c/gcdev64/gnucash/stable/src/gwenhywfar-5.11.2beta*
*# git diff*
*diff --git a/tools/gcttool/main.c b/tools/gcttool/main.c*
*index 970f3f9..ec21ecd 100644*
*--- a/tools/gcttool/main.c*
*+++ b/tools/gcttool/main.c*
*@@ -179,7 +179,7 @@ int main(int argc, char **argv)*
*   /* for conversion purposes */*
*   SSL_load_error_strings();*
*   SSL_library_init();*
*-  GWEN_Gui_SetKeyDataFromTextOpenSslFn(gui, getKeyDataFromTextOpenSSL);*
*+  GWEN_Gui_SetKeyDataFromTextOpenSslFn(gui,
(GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN)getKeyDataFromTextOpenSSL);*
* #endif*

*   GWEN_Logger_Open(GCT_LOGDOMAIN, "gct-tool", 0,*


Cheers.
Hai Liang W.


On Tue, Aug 13, 2024 at 8:42 AM Hai Liang Wang 
wrote:

> I have switched to i686 mingw and gwenhywfar 5.11.2beta. Just
> checked gwenhywfar 5.11.2beta codes, the codes are updated with
> gwenhywfar-bug-274.patch
> 
> .
> I still can not find the sourcecode file with the second path, the argivve
> backend plugin.
> But I think the problem is not the same as
> https://aquamaniac.de/rdm/issues/306 in my case.
> The error trace on my machine is not the same as Issue 306.
>
> I would try to solve it today, any help is appreciated.
>
> Cheers.
> Hai Liang W.
>
>
> On Tue, Aug 13, 2024 at 2:25 AM John Ralls  wrote:
>
>> The 5.10.2 build problem is the same root cause and is fixed with
>> https://github.com/Gnucash/gnucash-on-windows/blob/master/patches/gwenhywfar-bug-274.patch.
>> That patch is applied in 5.11.2beta but the AQBanking developer made the
>> same mistake when he created the argivve backend plugin, requiring the
>> second patch.
>>
>> You have to change directory to
>> c:\gcdev64\gnucash\stable\src\gwenhjywvar-5.11.2beta. Patches are applied
>> with -p1 following git standard practice so the rest of the path is
>> relative to the source directory.
>>
>> There’s no such thing as mingw64.exe, but as long as you’re using the
>> Mingw32 (i686) environment installed when you ran setup-mingw64.ps1 you’ll
>> be OK. The Mingw64 (x86_64) won’t work because there’s no webkitgtk package
>> for it.
>>
>> Regards,
>> John Ralls
>>
>>
>> On Aug 11, 2024, at 23:09, Hai Liang Wang 
>> wrote:
>>
>> John,
>>
>> Thanks for your quick response, it's not the same root cause.
>> I can not find the *cardsdialog.c,* *provider_request.c* as you
>> mentioned.
>>
>> The problem also exist on a previous version of gnucash modules, which
>> references gwenhywfar-5.10.2.tar.gz.
>>
>> https://github.com/Gnucash/gnucash-on-windows/blob/e9edf33a2dcd4cb03c6dc49730595d0e07c294d2/gnucash.modules
>>
>> As I rollback gnucash module as running build against it.
>> Same error happens on my machine.
>>
>> C:/gcdev64/gnucash/stable/src/gwenhywfar-5.10.2/tools/gcttool/main.c: In
>> function 'main':
>> C:/gcdev64/gnucash/stable/src/
>> *gwenhywfar-5.10.2/tools/gcttool/main.c:182:45*: error: passing argument
>> 2 of 'GWEN_Gui_SetKeyDataFromTextOpen
>> SslFn' from incompatible pointer type [-Wincompatible-pointer-types]
>>   182 |   GWEN_Gui_SetKeyDataFromTextOpenSslFn(gui,
>> getKeyDataFromTextOpenSSL);
>>   |
>>  ^
>>   | |
>>   | int (*)(GWEN_GUI *,
>> const char *, unsigned char *, unsigned int)
>> In file included from
>> C:/gcdev64/gnucash/stable/src/gwenhywfar-5.10.2/tools/gcttool/main.c:37:
>> ../../gwenhywfar5/gwenhywfar/gui_be.h:297:110: note: expected
>> 'GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN' {aka 'int (__attribute__((stdcall)) *)
>> (GWEN_GUI *, const char *, unsigned char *, unsigned int)'} but argument
>> is of type 'int (*)(GWEN_GUI *, const char *, unsigned char *, un
>> signed int)'
>>   297 |
>> GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN f);
>>   |
>> ^
>> make[3]: *** [Makefile:653: main.o] Error 1
>> make[3]: *** Waiting for unfinished jobs
>>
>> Note, this time, I switch to mingw64.exe,  my mingw64 is based
>> on msys2-base-i686,
>>
>> Cheers.
>> Hai Liang W.
>>
>>
>> On Mon, Aug 12, 2024 at 12:57 PM John Ralls  wrote:
>>
>>> That’s https://aquamaniac.de/rdm/issues/306. Apply this patch:
>>>
>>>
>>> --- a/src/libs/plugins/backends/aqgivve/cardsdialog.c 2024-04-28
>>> 06:54:15.0 -0700
>>> +++ b/src/libs/plugins/backends/aqgivve/cardsdialog.c 2024-06-22
>>> 14:32:30.624058500 -0700
>>> @ -57,7 +57,7 @
>>>
>>> -void _freeData(void *bp, void *p)
>>> +void GWENHYWFAR_CB _freeData(void *bp, void *p) {
>>> AG_CARDS_DIALOG *xdlg;
>>>
>>> @ -88,7 +88,7 @
>>>
>>> -int _dlgSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const
>>> char *sender)
>>> +int GWENHYWFAR_CB _dlgSignalHandler(GWEN_DIALOG *dlg,
>>> GWEN_DIALOG_EVENTTYPE t, const char *sender) {
>>> switch (t) {
>>> case GWEN_DialogEvent_TypeInit :
>>>
>>> --- a/

[GNC] fail to build libchipcard on MINGW32, build for windows installer

2024-08-12 Thread Hai Liang Wang
hi, Folks

Come to a problem with run `TARGET=gnucash-stable jhbuild -f jhbuildrc
build ` on MINGW32 environment.
The error trace is below.

*checking if gwenhywfar test desired... yes*
*checking for Gwenhywfar version >=4.99.8.0... found 5.11.2.0*
*checking whether local installation mode is wanted... yes*
*checking data search dir... share/chipcard*
*checking locale search dir... share/locale*
*checking cfg search dir... etc/chipcard*
*checking for dpkg-architecture... no*
*checking for multiarch paths... not found*
*checking for PCSCLITE... no*
*configure: error: Package requirements (libpcsclite) were not met:*

*Package 'libpcsclite' not found*

*Consider adjusting the PKG_CONFIG_PATH environment variable if you*
*installed software in a non-standard prefix.*

*Alternatively, you may set the environment variables PCSCLITE_CFLAGS*
*and PCSCLITE_LIBS to avoid the need to call pkg-config.*
*See the pkg-config man page for more details.*
* [1m*** Error during phase configure of libchipcard: ## Error
running /c/gcdev64/gnucash/stable/src/libchipcard-5.1.6/configure --prefix
/c/gcdev64/gnucash/stable/inst --disable-Werror --enable-local-install
PKG_CONFIG='pkg-config --dont-define-prefix' --build=x86_64-w64-mingw64
*** [4/14] [m *
---

Attached the full log.

So, what is the proper way to install *libpcsclite *on MINGW32 machine?
On the homepage, https://pcsclite.apdu.fr/, pcsclite does not support
MINGW32, right?

Cheers.
Hai Liang W.


build.2024081310-2.log
Description: Binary data
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.