Bug 235600 - net/rdesktop: fails to build with OpenSSL 1.1.x
Summary: net/rdesktop: fails to build with OpenSSL 1.1.x
Status: Closed DUPLICATE of bug 229029
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-08 13:59 UTC by emz
Modified: 2019-02-08 15:04 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gregf)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emz 2019-02-08 13:59:33 UTC
rdesktop 1.8.3 is too old to support new openssl 1.1.x in base, so it crashes while building agains it:

===Cut===
[...]
cc -O2 -pipe  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing  -Wall -I/usr/lib/include -I/usr/local/include -D_THREAD_SAFE -pthread  -I/usr/local/include   -I/usr/local/include -DPACKAGE_NAME=\"rdesktop\" -DPACKAGE_TARNAME=\"rdesktop\" -DPACKAGE_VERSION=\"1.8.3\" -DPACKAGE_STRING=\"rdesktop\ 1.8.3\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DL_ENDIAN=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_FILIO_H=1 -DHAVE_LOCALE_H=1 -DHAVE_LANGINFO_H=1 -DHAVE_SYSEXITS_H=1 -Dssldir=\"/usr/lib\" -DHAVE_XRANDR=1 -DEGD_SOCKET=\"/var/run/egd-pool\" -DHAVE_LIBSAMPLERATE=1 -DWITH_RDPSND=1 -DRDPSND_OSS=1 -DHAVE_DIRENT_H=1 -DHAVE_DIRFD=1 -DHAVE_DECL_DIRFD=1 -DHAVE_ICONV_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_MOUNT_H=1 -DSTAT_STATVFS=1 -DHAVE_STRUCT_STATVFS_F_NAMEMAX=1 -DIPv6=1 -DKEYMAP_PATH=\"/usr/local/share/rdesktop/keymaps/\" -o ssl.o -c ssl.c
cc -O2 -pipe  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing  -Wall -I/usr/lib/include -I/usr/local/include -D_THREAD_SAFE -pthread  -I/usr/local/include   -I/usr/local/include -DPACKAGE_NAME=\"rdesktop\" -DPACKAGE_TARNAME=\"rdesktop\" -DPACKAGE_VERSION=\"1.8.3\" -DPACKAGE_STRING=\"rdesktop\ 1.8.3\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DL_ENDIAN=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_FILIO_H=1 -DHAVE_LOCALE_H=1 -DHAVE_LANGINFO_H=1 -DHAVE_SYSEXITS_H=1 -Dssldir=\"/usr/lib\" -DHAVE_XRANDR=1 -DEGD_SOCKET=\"/var/run/egd-pool\" -DHAVE_LIBSAMPLERATE=1 -DWITH_RDPSND=1 -DRDPSND_OSS=1 -DHAVE_DIRENT_H=1 -DHAVE_DIRFD=1 -DHAVE_DECL_DIRFD=1 -DHAVE_ICONV_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_MOUNT_H=1 -DSTAT_STATVFS=1 -DHAVE_STRUCT_STATVFS_F_NAMEMAX=1 -DIPv6=1 -DKEYMAP_PATH=\"/usr/local/share/rdesktop/keymaps/\" -o utils.o -c utils.c
ssl.c:91:9: error: variable has incomplete type 'BIGNUM' (aka 'struct bignum_st')
        BIGNUM mod, exp, x, y;
               ^
/usr/lib/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'struct bignum_st'
typedef struct bignum_st BIGNUM;
               ^
ssl.c:91:14: error: variable has incomplete type 'BIGNUM' (aka 'struct bignum_st')
        BIGNUM mod, exp, x, y;
                    ^
/usr/lib/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'struct bignum_st'
typedef struct bignum_st BIGNUM;
               ^
ssl.c:91:19: error: variable has incomplete type 'BIGNUM' (aka 'struct bignum_st')
        BIGNUM mod, exp, x, y;
                         ^
/usr/lib/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'struct bignum_st'
typedef struct bignum_st BIGNUM;
               ^
ssl.c:91:22: error: variable has incomplete type 'BIGNUM' (aka 'struct bignum_st')
        BIGNUM mod, exp, x, y;
                            ^
/usr/lib/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'struct bignum_st'
typedef struct bignum_st BIGNUM;
               ^
ssl.c:101:2: warning: implicit declaration of function 'BN_init' is invalid in C99 [-Wimplicit-function-declaration]
        BN_init(&mod);
        ^
ssl.c:149:24: error: incomplete definition of type 'struct x509_st'
        nid = OBJ_obj2nid(cert->cert_info->key->algor->algorithm);
                          ~~~~^
/usr/lib/include/openssl/ossl_typ.h:120:16: note: forward declaration of 'struct x509_st'
typedef struct x509_st X509;
               ^
ssl.c:153:24: error: incomplete definition of type 'struct x509_st'
                ASN1_OBJECT_free(cert->cert_info->key->algor->algorithm);
                                 ~~~~^
/usr/lib/include/openssl/ossl_typ.h:120:16: note: forward declaration of 'struct x509_st'
typedef struct x509_st X509;
               ^
ssl.c:154:7: error: incomplete definition of type 'struct x509_st'
                cert->cert_info->key->algor->algorithm = OBJ_nid2obj(NID_rsaEncryption);
                ~~~~^
/usr/lib/include/openssl/ossl_typ.h:120:16: note: forward declaration of 'struct x509_st'
typedef struct x509_st X509;
               ^
ssl.c:204:24: error: incomplete definition of type 'struct rsa_st'
        if ((BN_num_bytes(rkey->e) > (int) max_exp_len) ||
                          ~~~~^
/usr/lib/include/openssl/bn.h:181:40: note: expanded from macro 'BN_num_bytes'
# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
                                       ^
/usr/lib/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
ssl.c:205:24: error: incomplete definition of type 'struct rsa_st'
            (BN_num_bytes(rkey->n) > (int) max_mod_len))
                          ~~~~^
/usr/lib/include/openssl/bn.h:181:40: note: expanded from macro 'BN_num_bytes'
# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
                                       ^
/usr/lib/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
ssl.c:209:22: error: incomplete definition of type 'struct rsa_st'
        len = BN_bn2bin(rkey->e, exponent);
                        ~~~~^
/usr/lib/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
ssl.c:211:22: error: incomplete definition of type 'struct rsa_st'
        len = BN_bn2bin(rkey->n, modulus);
                        ~~~~^
/usr/lib/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
ssl.c:232:11: error: variable has incomplete type 'HMAC_CTX' (aka 'struct hmac_ctx_st')
        HMAC_CTX ctx;
                 ^
/usr/lib/include/openssl/ossl_typ.h:102:16: note: forward declaration of 'struct hmac_ctx_st'
typedef struct hmac_ctx_st HMAC_CTX;
               ^
ssl.c:233:2: warning: implicit declaration of function 'HMAC_CTX_init' is invalid in C99
      [-Wimplicit-function-declaration]
        HMAC_CTX_init(&ctx);
        ^
ssl.c:235:2: warning: implicit declaration of function 'HMAC_CTX_cleanup' is invalid in C99
      [-Wimplicit-function-declaration]
        HMAC_CTX_cleanup(&ctx);
        ^
3 warnings and 12 errors generated.
gmake[2]: *** [Makefile:161: ssl.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory '/usr/ports/net/rdesktop/work/rdesktop-1.8.3'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/rdesktop
*** Error code 1

Stop.
make: stopped in /usr/ports/net/rdesktop

===>>> make build failed for net/rdesktop
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> net/rdesktop 

This command has been saved to /tmp/portmasterfail.txt
===Cut===

rdesktop 1.8.4, according to the upstream has all the fixes needed, please update.

see the Changes at https://github.com/rdesktop/rdesktop/commit/34b8a18fe5d4de795851defe34b3ad3e1f43532b
Comment 1 Walter Schwarzenfeld 2019-02-08 15:04:01 UTC

*** This bug has been marked as a duplicate of bug 229029 ***