Project

General

Profile

Feature #214

Consider maintaining a vcpkg recipe

Added by wrobelda 10 months ago. Updated 20 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
AqBanking
Target version:
-
Start date:
06/20/2020
Due date:
% Done:

0%

Betriebssystem:
Linux, MacOSX, Windows
AqBanking-Version:
6.0.0
Anwendung:
GnuCash, KMyMoney
Version der Anwendung:

Description

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

History

#1 Updated by wrobelda about 1 month ago

Answering myself:

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

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

#2 Updated by wrobelda 25 days ago

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.

#3 Updated by ipwizard 25 days ago

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)

#4 Updated by wrobelda 20 days ago

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?

Also available in: Atom PDF