flathub / com.github.Murmele.Gittyup

https://flathub.org/apps/details/com.github.Murmele.Gittyup
2 stars 4 forks source link

libssh2 fails to build #34

Closed bbhtt closed 6 months ago

bbhtt commented 1 year ago

I was trying to build the flatpak with the latest runtime 22.08

In file included from /run/build/Gittyup/dep/libssh2/libssh2/src/openssl.h:89:
/run/build/Gittyup/dep/openssl/openssl/include/openssl/md5.h:38:3: error: storage class specified for parameter ‘MD5_CTX’
   38 | } MD5_CTX;
      |   ^~~~~~~
/run/build/Gittyup/dep/openssl/openssl/include/openssl/md5.h:40:14: error: expected declaration specifiers or ‘...’ before ‘MD5_CTX’
   40 | int MD5_Init(MD5_CTX *c);
      |              ^~~~~~~
/run/build/Gittyup/dep/openssl/openssl/include/openssl/md5.h:41:16: error: expected declaration specifiers or ‘...’ before ‘MD5_CTX’
   41 | int MD5_Update(MD5_CTX *c, const void *data, size_t len);
      |                ^~~~~~~
/run/build/Gittyup/dep/openssl/openssl/include/openssl/md5.h:42:34: error: expected declaration specifiers or ‘...’ before ‘MD5_CTX’
   42 | int MD5_Final(unsigned char *md, MD5_CTX *c);
      |                                  ^~~~~~~
/run/build/Gittyup/dep/openssl/openssl/include/openssl/md5.h:44:20: error: expected declaration specifiers or ‘...’ before ‘MD5_CTX’
   44 | void MD5_Transform(MD5_CTX *c, const unsigned char *b);
      |                    ^~~~~~~
In file included from /run/build/Gittyup/dep/libssh2/libssh2/src/openssl.h:92:
/run/build/Gittyup/dep/openssl/openssl/include/openssl/hmac.h:30:1: error: expected declaration specifiers before ‘DEPRECATEDIN_1_1_0’
   30 | DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
      | ^~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/openssl.h:341:13: error: storage class specified for parameter ‘_libssh2_openssl_crypto_init’
  341 | extern void _libssh2_openssl_crypto_init(void);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/openssl.h:342:13: error: storage class specified for parameter ‘_libssh2_openssl_crypto_exit’
  342 | extern void _libssh2_openssl_crypto_exit(void);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/openssl.h:364:1: error: storage class specified for parameter ‘libssh2_curve_type’
  364 | libssh2_curve_type;
      | ^~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/openssl.h:425:13: error: storage class specified for parameter ‘_libssh2_dh_init’
  425 | extern void _libssh2_dh_init(_libssh2_dh_ctx *dhctx);
      |             ^~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/openssl.h:426:12: error: storage class specified for parameter ‘_libssh2_dh_key_pair’
  426 | extern int _libssh2_dh_key_pair(_libssh2_dh_ctx *dhctx, _libssh2_bn *public,
      |            ^~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/openssl.h:430:12: error: storage class specified for parameter ‘_libssh2_dh_secret’
  430 | extern int _libssh2_dh_secret(_libssh2_dh_ctx *dhctx, _libssh2_bn *secret,
      |            ^~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/openssl.h:433:13: error: storage class specified for parameter ‘_libssh2_dh_dtor’
  433 | extern void _libssh2_dh_dtor(_libssh2_dh_ctx *dhctx);
      |             ^~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/crypto.h:149:42: error: expected declaration specifiers or ‘...’ before ‘libssh2_curve_type’
  149 |                                          libssh2_curve_type type);
      |                                          ^~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/crypto.h:167:27: error: expected declaration specifiers or ‘...’ before ‘libssh2_curve_type’
  167 |                           libssh2_curve_type curve_type);
      |                           ^~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/crypto.h:185:1: error: expected declaration specifiers before ‘libssh2_curve_type’
  185 | libssh2_curve_type
      | ^~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/crypto.h:190:37: error: expected declaration specifiers or ‘...’ before ‘libssh2_curve_type’
  190 |                                     libssh2_curve_type *out_type);
      |                                     ^~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:213:36: error: storage class specified for parameter ‘LIBSSH2_KEX_METHOD’
  213 | typedef struct _LIBSSH2_KEX_METHOD LIBSSH2_KEX_METHOD;
      |                                    ^~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:214:40: error: storage class specified for parameter ‘LIBSSH2_HOSTKEY_METHOD’
  214 | typedef struct _LIBSSH2_HOSTKEY_METHOD LIBSSH2_HOSTKEY_METHOD;
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:215:38: error: storage class specified for parameter ‘LIBSSH2_CRYPT_METHOD’
  215 | typedef struct _LIBSSH2_CRYPT_METHOD LIBSSH2_CRYPT_METHOD;
      |                                      ^~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:216:37: error: storage class specified for parameter ‘LIBSSH2_COMP_METHOD’
  216 | typedef struct _LIBSSH2_COMP_METHOD LIBSSH2_COMP_METHOD;
      |                                     ^~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:218:32: error: storage class specified for parameter ‘LIBSSH2_PACKET’
  218 | typedef struct _LIBSSH2_PACKET LIBSSH2_PACKET;
      |                                ^~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:239:3: error: storage class specified for parameter ‘libssh2_nonblocking_states’
  239 | } libssh2_nonblocking_states;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:243:5: error: expected specifier-qualifier-list before ‘libssh2_nonblocking_states’
  243 |     libssh2_nonblocking_states state;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:245:3: error: storage class specified for parameter ‘packet_require_state_t’
  245 | } packet_require_state_t;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:250:3: error: storage class specified for parameter ‘packet_requirev_state_t’
  250 | } packet_requirev_state_t;
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:254:5: error: expected specifier-qualifier-list before ‘libssh2_nonblocking_states’
  254 |     libssh2_nonblocking_states state;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:277:3: error: storage class specified for parameter ‘kmdhgGPshakex_state_t’
  277 | } kmdhgGPshakex_state_t;
      |   ^~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:281:5: error: expected specifier-qualifier-list before ‘libssh2_nonblocking_states’
  281 |     libssh2_nonblocking_states state;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:298:3: error: storage class specified for parameter ‘key_exchange_state_low_t’
  298 | } key_exchange_state_low_t;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:302:5: error: expected specifier-qualifier-list before ‘libssh2_nonblocking_states’
  302 |     libssh2_nonblocking_states state;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:309:3: error: storage class specified for parameter ‘key_exchange_state_t’
  309 | } key_exchange_state_t;
      |   ^~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:315:5: error: expected specifier-qualifier-list before ‘libssh2_nonblocking_states’
  315 |     libssh2_nonblocking_states state;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:327:3: error: storage class specified for parameter ‘packet_queue_listener_state_t’
  327 | } packet_queue_listener_state_t;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:333:5: error: expected specifier-qualifier-list before ‘libssh2_nonblocking_states’
  333 |     libssh2_nonblocking_states state;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:342:3: error: storage class specified for parameter ‘packet_x11_open_state_t’
  342 | } packet_x11_open_state_t;
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:344:1: warning: empty declaration
  344 | struct _LIBSSH2_PACKET
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:367:3: error: storage class specified for parameter ‘libssh2_channel_data’
  367 | } libssh2_channel_data;
      |   ^~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:382:5: error: expected specifier-qualifier-list before ‘libssh2_channel_data’
  382 |     libssh2_channel_data local, remote;
      |     ^~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:369:1: warning: empty declaration
  369 | struct _LIBSSH2_CHANNEL
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:484:5: error: expected specifier-qualifier-list before ‘libssh2_nonblocking_states’
  484 |     libssh2_nonblocking_states chanFwdCncl_state;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:468:1: warning: empty declaration
  468 | struct _LIBSSH2_LISTENER
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:496:32: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘*’ token
  496 |     const LIBSSH2_CRYPT_METHOD *crypt;
      |                                ^
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:511:3: error: storage class specified for parameter ‘libssh2_endpoint_data’
  511 | } libssh2_endpoint_data;
      |   ^~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:515:1: warning: empty declaration
  515 | struct transportpacket
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:556:5: error: expected specifier-qualifier-list before ‘libssh2_nonblocking_states’
  556 |     libssh2_nonblocking_states receive_state;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:550:1: warning: empty declaration
  550 | struct _LIBSSH2_PUBLICKEY
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:580:1: warning: empty declaration
  580 | struct flags {
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:612:30: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘*’ token
  612 |     const LIBSSH2_KEX_METHOD *kex;
      |                              ^
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:585:1: warning: empty declaration
  585 | struct _LIBSSH2_SESSION
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:895:27: error: expected declaration specifiers or ‘...’ before ‘key_exchange_state_low_t’
  895 |                           key_exchange_state_low_t * key_state);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:888:1: warning: empty declaration
  888 | struct _LIBSSH2_KEX_METHOD
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:900:1: warning: empty declaration
  900 | struct _LIBSSH2_HOSTKEY_METHOD
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:940:24: warning: type defaults to ‘int’ in declaration of ‘LIBSSH2_CRYPT_METHOD’ [-Wimplicit-int]
  940 |                  const LIBSSH2_CRYPT_METHOD * method, unsigned char *iv,
      |                        ^~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:940:45: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
  940 |                  const LIBSSH2_CRYPT_METHOD * method, unsigned char *iv,
      |                                             ^
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:926:1: warning: empty declaration
  926 | struct _LIBSSH2_CRYPT_METHOD
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:950:1: warning: empty declaration
  950 | struct _LIBSSH2_COMP_METHOD
      | ^~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:1085:27: error: expected declaration specifiers or ‘...’ before ‘key_exchange_state_t’
 1085 |                           key_exchange_state_t * state);
      |                           ^~~~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:1088:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 1088 | const LIBSSH2_CRYPT_METHOD **libssh2_crypt_methods(void);
      |                            ^
/run/build/Gittyup/dep/libssh2/libssh2/src/libssh2_priv.h:1089:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 1089 | const LIBSSH2_HOSTKEY_METHOD **libssh2_hostkey_methods(void);
      |                              ^
In file included from /run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:45:
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.h:42:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
   42 | const LIBSSH2_COMP_METHOD **_libssh2_comp_methods(LIBSSH2_SESSION *session);
      |                           ^
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:63:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
   63 | {
      | ^
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:86:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
   86 | {
      | ^
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:97:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘comp_method_none’
   97 | static const LIBSSH2_COMP_METHOD comp_method_none = {
      |                                  ^~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:105:2: error: expected declaration specifiers before ‘;’ token
  105 | };
      |  ^
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:355:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
  355 | static const LIBSSH2_COMP_METHOD *comp_methods[] = {
      |                                  ^
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:362:2: error: expected declaration specifiers before ‘;’ token
  362 | };
      |  ^
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:365:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
  365 | static const LIBSSH2_COMP_METHOD *no_comp_methods[] = {
      |                                  ^
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:368:2: error: expected declaration specifiers before ‘;’ token
  368 | };
      |  ^
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:370:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
  370 | const LIBSSH2_COMP_METHOD **
      |                           ^
/run/build/Gittyup/dep/openssl/openssl/include/openssl/bio.h:686:1: error: old-style parameter declarations in prototyped function definition
  686 | DEPRECATEDIN_1_1_0(struct hostent *BIO_gethostbyname(const char *name))
      | ^~~~~~~~~~~~~~~~~~
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:378: error: expected ‘{’ at end of input
/run/build/Gittyup/dep/libssh2/libssh2/src/comp.c:378: warning: control reaches end of non-void function [-Wreturn-type]
ninja: build stopped: subcommand failed.
Error: module Gittyup: Child process exited with code 1

Probably needs to be updated to the latest tag, because libssh2 seperately builds fine for me.

Also any reason these are not built in the flatpak manifest but through submodules? I think it'd be easier to include the dependecies here because issues in dependecies won't need to wait for a fix/new commit in gittyup.

Thanks!

Murmele commented 1 year ago

@bbhtt thanks I will check it out. Maybe it is already installed and therefore not really needed to be build separately

bbhtt commented 1 year ago

No libssh2 isn't in the runtime. You need to build it separately. I just had to build it for gitg https://github.com/flathub/org.gnome.gitg/pull/27/commits/8402508cceb5ab871ebe3d26e7724ca3ea8a2e58

bbhtt commented 1 year ago

I forked the main repo to update the various submodules to their respective latest tags but libssh2 to fails to build at this line https://github.com/libssh2/libssh2/blob/master/src/CMakeLists.txt#L188 Looks like it can't find the libssh2.pc.in file in the source repo. My guess is it is because of the unusual folder structure here that makes something go wrong.

It'd be easier to add all the dependencies in the flatpak manifest and add a disable-submodules, with -DUSE_SYSTEM_* build args.

Murmele commented 1 year ago

We will shortly update to Qt6 so this is not relevant anymore

Murmele commented 6 months ago

Can you try again?

bbhtt commented 6 months ago

Seems not relevant anymore, the runtime was updated to 5.15-23.08.