pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc on OpenBSD




On 04/04/18 00:19, Sevan Janiyan wrote:
> Hi Ryo,
> Thanks for the heads up. I confirmed the issues on 6.2, now to get it
> taken care of so it works out of the box. Give me a couple of days to
> look into it.

Ok, with the following 2 changes applied to your pkgsrc tree, it's
possible to bootstrap on OpenBSD 6.3.

Basically, we're in the scenario where a host will both clang & GCC in
base. We handle clang pretending to be gcc (check_compiler). I've not
tackled the problem of opting for a specific compiler so you have to be
explicit in the compiler you want to use and that is going to be clang.
There are further problems with building using GCC 4 which ships in base
and it also appear we alternate between compilers on different
components during bootstrap.

I've committed the change for pkcs7.c below, already. I'm waiting on
Joerg for ok about archive_openssl_hmac_private.h change to commit it.
Will then address the README.OpenBSD after.

Try
./bootstrap --compiler clang
After applying the following patches

Index: pkgtools/pkg_install/files/lib/pkcs7.c
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install/files/lib/pkcs7.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 pkcs7.c
--- pkgtools/pkg_install/files/lib/pkcs7.c	24 Oct 2017 15:54:31 -0000	1.6
+++ pkgtools/pkg_install/files/lib/pkcs7.c	5 Apr 2018 20:50:09 -0000
@@ -55,7 +55,8 @@ __RCSID("$NetBSD: pkcs7.c,v 1.6 2017/10/
 #define NS_ANY_CA		(NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA)
 #endif

-#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER <
0x10100000L)
+#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER <
0x10100000L) || \
+    defined(LIBRESSL_VERSION_NUMBER)
 #define X509_get_extended_key_usage(x) x->ex_xkusage
 #define X509_get_extension_flags(x) x->ex_flags
 #endif
Index: archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h
===================================================================
RCS file:
/cvsroot/pkgsrc/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 archive_openssl_hmac_private.h
--- archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h
1 Aug 2017 22:21:17 -0000	1.1.1.2
+++ archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h
5 Apr 2018 20:50:09 -0000
@@ -28,7 +28,8 @@
 #include <openssl/hmac.h>
 #include <openssl/opensslv.h>

-#if OPENSSL_VERSION_NUMBER < 0x10100000L ||
defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
+    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x2070000fL)
 #include <stdlib.h> /* malloc, free */
 #include <string.h> /* memset */
 static inline HMAC_CTX *HMAC_CTX_new(void)


Home | Main Index | Thread Index | Old Index