NetBSD Problem Report #54416

From www@netbsd.org  Sun Jul 28 08:02:55 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D74AD7A18F
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Jul 2019 08:02:55 +0000 (UTC)
Message-Id: <20190728080254.EC7E37A1AA@mollari.NetBSD.org>
Date: Sun, 28 Jul 2019 08:02:54 +0000 (UTC)
From: clement.bouvier.europe@gmail.com
Reply-To: clement.bouvier.europe@gmail.com
To: gnats-bugs@NetBSD.org
Subject: audio/libvisual failed to build on macos sched_setscheduler not defined.
X-Send-Pr-Version: www-1.0

>Number:         54416
>Category:       pkg
>Synopsis:       audio/libvisual failed to build on macos sched_setscheduler not defined.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    macos-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 28 08:05:00 +0000 2019
>Closed-Date:    Wed Oct 23 00:13:57 +0000 2019
>Last-Modified:  Wed Oct 23 00:15:01 +0000 2019
>Originator:     Clement Bouvier
>Release:        current
>Organization:
>Environment:
macos mojave 10.14.6
>Description:
audio/libvisual failed to build on macos with undefined symbol sched_setscheduler

libtool: link: clang -dynamiclib  -o .libs/libvisual-0.4.0.dylib  .libs/lv_actor.o .libs/lv_input.o .libs/lv_event.o .libs/lv_bin.o .libs/lv_plugin.o .libs/lv_video.o .libs/lv_video_simd.o .libs/lv_mem.o .libs/lv_audio.o .libs/lv_fourier.o .libs/lv_list.o .libs/lv_log.o .libs/lv_palette.o .libs/lv_libvisual.o .libs/lv_songinfo.o .libs/lv_morph.o .libs/lv_bmp.o .libs/lv_param.o .libs/lv_cpu.o .libs/lv_color.o .libs/lv_time.o .libs/lv_random.o .libs/lv_error.o .libs/lv_ui.o .libs/lv_thread.o .libs/lv_object.o .libs/lv_transform.o .libs/lv_rectangle.o .libs/lv_config.o .libs/lv_ringbuffer.o .libs/lv_buffer.o .libs/lv_cache.o .libs/lv_hashmap.o .libs/lv_hashlist.o .libs/lv_collection.o .libs/lv_utils.o .libs/lv_os.o .libs/lv_math.o .libs/lv_gl.o   -L/Users/cbouvier/prj/pkgsrc/audio/libvisual/work/.buildlink/lib -lm -ldl -L. /Users/cbouvier/prj/pkgsrc/audio/libvisual/work/.buildlink/lib/libintl.dylib -liconv -lc  -O2 -Wl,-rpath -Wl,/Users/cbouvier/pkg/lib   -install_name  /Users/cbouvier/
 pkg/lib/libvisual-0.4.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-single_module
Undefined symbols for architecture x86_64:
  "_sched_setscheduler", referenced from:
      _visual_os_scheduler_realtime_start in lv_os.o
      _visual_os_scheduler_realtime_stop in lv_os.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1


>How-To-Repeat:
build audio/libvisual on macosx.
>Fix:
macos ox has header sched.h but does not provide the realtime function:

int sched_setscheduler(pid_t, int, const struct sched_param *);
(optional according to open group).

so it is necessary to force real time defined functions in the package are not supported on apple system.

patch:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/audio/libvisual/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- Makefile    4 Jul 2018 13:40:08 -0000       1.27
+++ Makefile    28 Jul 2019 07:58:17 -0000
@@ -2,7 +2,7 @@
 #

 DISTNAME=      libvisual-0.4.0
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    audio graphics
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=libvisual/}

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/audio/libvisual/distinfo,v
retrieving revision 1.14
diff -u -r1.14 distinfo
--- distinfo    3 Nov 2015 01:12:39 -0000       1.14
+++ distinfo    28 Jul 2019 07:58:17 -0000
@@ -9,4 +9,5 @@
 SHA1 (patch-ad) = e7b2493cf5880cea7497a1d8d6fb1ce4f856ba6d
 SHA1 (patch-ae) = 72affdd9a1302a16efe5f4ecaafbc37061e4db0c
 SHA1 (patch-libvisual_lv__defines.h) = 9b14140411ae426226318a0ccdbe64d905b7710c
+SHA1 (patch-libvisual_lv__os.c) = 66d812548e081d11ad874d5c57f84656e70a855f
 SHA1 (patch-libvisual_lv__types.h) = 3f2baa4861b50d3359cd9cdfa75898dfc6b5895d
Index: patches/patch-libvisual_lv__os.c
===================================================================
RCS file: patches/patch-libvisual_lv__os.c
diff -N patches/patch-libvisual_lv__os.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libvisual_lv__os.c    28 Jul 2019 07:58:17 -0000
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- libvisual/lv_os.c.orig     2006-01-26 15:13:37.000000000 +0000
++++ libvisual/lv_os.c
+@@ -31,7 +31,9 @@
+ #ifdef HAVE_SCHED_H
+ # include <sched.h>
+ # include <sys/types.h>
++#ifndef __APPLE__
+ # define HAVE_SCHED 1
++#endif
+ #elif defined HAVE_SYS_SCHED_H
+ # include <sys/sched.h>
+ # include <sys/types.h>

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->macos-pkg-people
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Sun, 28 Jul 2019 15:53:21 +0000
Responsible-Changed-Why:
macOS problem.


State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Wed, 23 Oct 2019 00:13:57 +0000
State-Changed-Why:
committed, thanks for the patch!


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54416 CVS commit: pkgsrc/audio/libvisual
Date: Wed, 23 Oct 2019 00:13:40 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Wed Oct 23 00:13:40 UTC 2019

 Modified Files:
 	pkgsrc/audio/libvisual: distinfo
 Added Files:
 	pkgsrc/audio/libvisual/patches: patch-libvisual_lv__os.c

 Log Message:
 libvisual: comment out HAVE_SCHED on macos. it is missing the optional
 sched_setscheduler needed by this package.

 XXX would be nicer to have done this via an upstream-friendly
 config test.

 Omitting PKGREVISION bump since it's a compile fix.

 From Clement Bouvier in PR pkg/54416.


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/audio/libvisual/distinfo
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/audio/libvisual/patches/patch-libvisual_lv__os.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.