Projekt

Allgemein

Profil

Aktionen

Feature #214

offen

Consider maintaining a vcpkg recipe

Von wrobelda vor etwa 5 Jahren hinzugefügt. Vor fast 3 Jahren aktualisiert.

Status:
Feedback
Priorität:
Normal
Zugewiesen an:
-
Kategorie:
AqBanking
Zielversion:
-
Beginn:
20.06.2020
Abgabedatum:
% erledigt:

0%

Geschätzter Aufwand:
Betriebssystem:
Linux, MacOSX, Windows
AqBanking-Version:
6.0.0
Anwendung:
GnuCash, KMyMoney
Version der Anwendung:

Beschreibung

Hi,

Both GnuCash [1] and KMyMoney [2] have discussed potentially moving to vcpkg to maintain their dependencies.

Please do consider crating and requesting the addition of the build recipes for both libaqbanking and libgwenhywfar to the vcpkg repository: https://vcpkg.readthedocs.io/en/latest/maintainers/maintainer-guide/

This would tremendously reduce the effort required to maintain a consistent delivery of cross-platform builds of any of the software using your libraries.

[1] http://gnucash.1415818.n4.nabble.com/GNC-dev-Building-on-Windows-tp4712455p4712685.html
[2] https://invent.kde.org/office/kmymoney/-/issues/23

Aktionen #1

Von wrobelda vor mehr als 4 Jahren aktualisiert

Answering myself:

FYI, I am working on bringing both libs and their dependencies to vcpkg myself:

https://github.com/microsoft/vcpkg/pull/16810

Aktionen #2

Von wrobelda vor mehr als 4 Jahren aktualisiert

wrobelda schrieb:

https://github.com/microsoft/vcpkg/pull/16810

The port was merged upstream. Unfortunately, it doesn't seem to work properly. I tried to compile a simple test:

#include <gwenhywfar/gwenhywfar.h>
int main() {
GWEN_Init();
return 0;
}

with gcc test.c -I vcpkg/installed/x64-osx/include -L vcpkg/installed/x64-osx/lib -lgwenhywfar

Getting:
Undefined symbols for architecture x86_64:
"_gcry_check_version"
(...)
"_gnutls_bye", referenced from:
(...)
"_iconv", referenced from:

Vcpkg only supports static builds on macOS and Linux, but gwenhywfar apparently doesn't properly link its dependencies. A quick google got me to https://homebanking-hilfe.de/forum/topic.php?t=11759 , a post from 2010, which seems to indicate that static builds were not supported. is this still the case?

Not sure how relevant that is, but in the config log I see:

checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking if gcc static flag -static works... no
checking if g++ static flag -static works... no

I will appreciate your help investigating this.

Aktionen #3

Von ipwizard vor mehr als 4 Jahren aktualisiert

I did not know, that

Vcpkg only supports static builds on macOS and Linux.

Since the referenced article from 2010 clearly states, that AqBanking and Gwenyhwfar don't use and support static linking due to the dynamic plugin structure. AFAIR (and understood aquamaniac) that is still the case and won't change in the near future.

While not knowing anything about vcpkg, I found https://vcpkg.readthedocs.io/en/latest/examples/overlay-triplets-linux-dynamic/ . Again, I don't know if this helps here or not. Also, the same or similar mechanism seems to be available for MacOSX (https://github.com/microsoft/vcpkg/pull/10348)

Aktionen #4

Von wrobelda vor mehr als 4 Jahren aktualisiert

Since the referenced article from 2010 clearly states, that AqBanking and Gwenyhwfar don't use and support static linking due to the dynamic plugin structure. AFAIR (and understood aquamaniac) that is still the case and won't change in the near future.

Yes, I saw the plugins and that will most likely be a concern. Turns out, however, that the issue above was unrelated to gwenhywfar and had to do with -lhogweed I forgot to link to.

While not knowing anything about vcpkg, I found https://vcpkg.readthedocs.io/en/latest/examples/overlay-triplets-linux-dynamic/ . Again, I don't know if this helps here or not. Also, the same or similar mechanism seems to be available for MacOSX (https://github.com/microsoft/vcpkg/pull/10348)

Yes, dynamic linking can absolutely be enabled, but it is not officially supported. Their CI/CD infra also doesn't test for it. And AFIK you can't mix and match triplets – so once you choose dynamic linking, it would affect all of one's project's dependencies (ports) installed via vcpkg. So given how it's unsupported and that ports often just won't build with dynamic linking, almost no one would be using it this way.

I know they are going to eventually support it officially, but likely not soon.

How difficult would it be to enable plugins to build statically, or just add a config option to disable plugin support and amalgamate the code into the main library?

Aktionen #5

Von wrobelda vor etwa 4 Jahren aktualisiert

It seems that plugins load just fine even if compiled statically:

 cromo@Daves-Macbook-Air  ~  cat test.c  
 #include <gwenhywfar/gwenhywfar.h>
      int main()
      {
        GWEN_Init();
        return 0;
      }                                      
 cromo@Daves-Macbook-Air  ~  arch -x86_64 gcc test.c -I Documents/Sourcecode/vcpkg/installed/x64-osx/include/gwenhywfar5 -I Documents/Sourcecode/vcpkg/installed/x64-osx/include -L Documents/Sourcecode/vcpkg/installed/x64-osx/lib -framework Security -lhogweed -lgnutls -lintl -liconv -Wl,-framework -Wl,CoreFoundation -lgmp -lnettle -ltasn1 -lgcrypt -lgpg-error -lidn2 -lgwenhywfar
ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in ___gmpn_divexact_1 from Documents/Sourcecode/vcpkg/installed/x64-osx/lib/libgmp.a(dive_1.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
 cromo@Daves-Macbook-Air  ~  ./a.out  
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  248: Initializing I18N module
4:2021/05/20 19-49-10:gwen(72648):../.././../src/5.6.0-7b89005ea8.clean/src/base/i18n.c:  147: Could not bind textdomain (-68)
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  252: Initializing InetAddr module
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  256: Initializing Socket module
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  260: Initializing Libloader module
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  264: Initializing Crypt3 module
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  268: Initializing Process module
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  272: Initializing Plugin module
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  276: Initializing DataBase IO module
6:2021/05/20 19-49-10:gwen(72648):../.././../src/5.6.0-7b89005ea8.clean/src/base/plugin.c:  589: Plugin type "dbio" registered
6:2021/05/20 19-49-10:gwen(72648):../.././../src/5.6.0-7b89005ea8.clean/src/parser/dbio.c:  107: Adding plugin path [/Users/cromo/Documents/Sourcecode/vcpkg/installed/x64-osx/lib/gwenhywfar/plugins/79/dbio]
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  280: Initializing ConfigMgr module
6:2021/05/20 19-49-10:gwen(72648):../.././../src/5.6.0-7b89005ea8.clean/src/base/plugin.c:  589: Plugin type "configmgr" registered
6:2021/05/20 19-49-10:gwen(72648):../.././../src/5.6.0-7b89005ea8.clean/src/parser/configmgr.c:   81: Adding plugin path [/Users/cromo/Documents/Sourcecode/vcpkg/installed/x64-osx/lib/gwenhywfar/plugins/79/configmgr]
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  284: Initializing CryptToken2 module
6:2021/05/20 19-49-10:gwen(72648):../.././../src/5.6.0-7b89005ea8.clean/src/base/plugin.c:  589: Plugin type "ct" registered
6:2021/05/20 19-49-10:gwen(72648):../.././../src/5.6.0-7b89005ea8.clean/src/crypttoken/ctplugin.c:   66: Adding plugin path [/Users/cromo/Documents/Sourcecode/vcpkg/installed/x64-osx/lib/gwenhywfar/plugins/79/ct]
7:2021/05/20 19-49-10:gwen(72648):.././../src/5.6.0-7b89005ea8.clean/src/gwenhywfar.c:  288: Initializing GUI module
Aktionen #6

Von wrobelda vor fast 3 Jahren aktualisiert

FYI, I managed to build gwenhywfar using vcpkg with clang-cl under Windows, with some substantial patching. I will post the patches to the mailing list, as well as send a few emails regarding the changes that I hacked, but otherwise need a more systematic approach.

Aktionen #7

Von martin vor fast 3 Jahren aktualisiert

  • Status wurde von New zu Feedback geändert

Hi,
thanks for the feedback! Adding patches here would be better than sending them to the mailinglist because on the list they might get forgotten about...

Patches here would be a constant reminder that there are patches to be applied.

Regards
Martin

Aktionen #8

Von wrobelda vor fast 3 Jahren aktualisiert

Fair enough. I'll post them here.

Aktionen

Auch abrufbar als: Atom PDF