pkgsrc-Bugs archive

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

pkg/56751: devel/libuv 1.44.1 Solaris 10 compile issues



>Number:         56751
>Category:       pkg
>Synopsis:       devel/libuv 1.44.1 Solaris 10 compile issues
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 14 18:50:00 +0000 2022
>Originator:     Claes Nästén
>Release:        trunk 2022-03-13
>Organization:
>Environment:
SunOS 5.10 sun4v sparc SUNW,SPARC-Enterprise-T2000

>Description:
After latest devel/libuv update it fails to build under Solaris 10
using GCC 8 with the following error:

In file included from /opt/local/gcc8/lib/gcc/sparc64-sun-solaris2.10/8.4.0/include-fixed/stdio.h:30,
                 from ./include/uv.h:57,
                 from src/random.c:22:
/opt/local/gcc8/lib/gcc/sparc64-sun-solaris2.10/8.4.0/include-fixed/sys/feature_tests.h:346:2: error: #error "Compiler or options invalid for pre-UN
IX 03 X/Open applications   and pre-2001 POSIX applications"
 #error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
  ^~~~~

>How-To-Repeat:
Build devel/libuv
>Fix:
diff --git a/devel/libuv/Makefile b/devel/libuv/Makefile
index d340e917bc2..5eba1210419 100644
--- a/devel/libuv/Makefile
+++ b/devel/libuv/Makefile
@@ -12,7 +12,6 @@ LICENSE=      mit AND 2-clause-bsd AND isc AND modified-bsd
 
 USE_LIBTOOL=   yes
 USE_TOOLS+=    autoconf automake pkg-config
-USE_FEATURES+= strnlen
 GNU_CONFIGURE= yes
 # 3 test failures as of 1.31.0
 # https://github.com/libuv/libuv/issues/2437
@@ -23,9 +22,14 @@ INSTALLATION_DIRS+=  include/uv
 
 .include "../../mk/bsd.prefs.mk"
 
-.if !empty(MACHINE_PLATFORM:MSunOS-5.[0-9]-*) || \
-    !empty(MACHINE_PLATFORM:MSunOS-5.10-*)
+BUILDLINK_TRANSFORM.SunOS+=    opt:-D_XOPEN_SOURCE=500:-D_XOPEN_SOURCE=600
+.if ${OPSYS} == "SunOS"
+.  if ${OPSYS_VERSION} < 051100
 CFLAGS+=       -DSUNOS_NO_IFADDRS
+.  endif
+.else
+# sunos code has compatability strnlen available
+USE_FEATURES+= strnlen
 .endif
 
 pre-configure:



Home | Main Index | Thread Index | Old Index