pkgsrc-Bugs archive

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

pkg/54368: audio/ladsap: install error with relative library path and fails to build on macosx



>Number:         54368
>Category:       pkg
>Synopsis:       audio/ladsap: install error with relative library path and fails to build on macosx
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 11 13:00:01 +0000 2019
>Originator:     Clement Bouvier
>Release:        current
>Organization:
>Environment:
macosx mojave 10.14.5
>Description:
audio/ldasap fails to build on macosx and install relative paths.

build error and macosx:
clang -O2 -pipe   -c -o applyplugin.o applyplugin.c
applyplugin.c:18:11: fatal error: 'sys/endian.h' file not found
# include <sys/endian.h>
          ^~~~~~~~~~~~~~
1 error generated.
gnumake: *** [applyplugin.o] Error 1

install error after success build:
ERROR: lib/ladspa/amp.so: relative library path: ../plugins/amp.so
ERROR: lib/ladspa/amp.so: missing library: ../plugins/amp.so
ERROR: lib/ladspa/delay.so: relative library path: ../plugins/delay.so
ERROR: lib/ladspa/delay.so: missing library: ../plugins/delay.so
ERROR: lib/ladspa/filter.so: relative library path: ../plugins/filter.so
ERROR: lib/ladspa/filter.so: missing library: ../plugins/filter.so
ERROR: lib/ladspa/noise.so: relative library path: ../plugins/noise.so
ERROR: lib/ladspa/noise.so: missing library: ../plugins/noise.so
ERROR: lib/ladspa/sine.so: relative library path: ../plugins/sine.so
*** Error code 1

>How-To-Repeat:
build and install audio/ladsap
>Fix:
About the build: endian header on macosx is at <machine/endian.h>

About the install: The project uses a non portable makefile to build the plugins and some binaries.
I have converted the makefile rules to libtools in order to avoid relative path and build the modules correctly on macosx.

I didn't check if the binaries are ok or if the modules are loaded correctly.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/audio/ladspa/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile	16 Nov 2017 15:05:31 -0000	1.14
+++ Makefile	11 Jul 2019 12:49:14 -0000
@@ -12,6 +12,8 @@
 COMMENT=	Linux Audio Developers Simple Plugin API
 LICENSE=	gnu-lgpl-v2.1
 
+USE_LIBTOOL=	yes
+
 WRKSRC=		${WRKDIR}/ladspa_sdk/src
 USE_TOOLS+=	gmake
 USE_LANGUAGES=	c c++
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/audio/ladspa/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- PLIST	14 Jun 2009 17:32:12 -0000	1.2
+++ PLIST	11 Jul 2019 12:49:14 -0000
@@ -3,8 +3,8 @@
 bin/applyplugin
 bin/listplugins
 include/ladspa.h
-lib/ladspa/amp.so
-lib/ladspa/delay.so
-lib/ladspa/filter.so
-lib/ladspa/noise.so
-lib/ladspa/sine.so
+lib/ladspa/amp.la
+lib/ladspa/delay.la
+lib/ladspa/filter.la
+lib/ladspa/noise.la
+lib/ladspa/sine.la
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/audio/ladspa/distinfo,v
retrieving revision 1.13
diff -u -r1.13 distinfo
--- distinfo	25 Nov 2017 11:57:28 -0000	1.13
+++ distinfo	11 Jul 2019 12:49:14 -0000
@@ -4,8 +4,8 @@
 RMD160 (ladspa_sdk_1.13.tgz) = e9eeae8edd24a6890fac3e34c4b55f844f44f8a0
 SHA512 (ladspa_sdk_1.13.tgz) = a1dab807fda58e08869d3f519be5fa91c394690eb13006fbe7f20b332548e4676b32b01273f5695bf36c8da72190c07618662a76d50f991b3f05068ac2b346ef
 Size (ladspa_sdk_1.13.tgz) = 70540 bytes
-SHA1 (patch-aa) = 80983955586f314e5e759516ae2c84d0933f1a0b
-SHA1 (patch-ab) = 1ad33baf6dcc4633e1459b6585cc8ccada57831f
+SHA1 (patch-aa) = 8716c9f1e6ae43097cbcfe5ac706d311125b0514
+SHA1 (patch-ab) = 71592140a92c3e8e602e1f25f5ce07bddc17e04a
 SHA1 (patch-ac) = 40108e5e4fdba9b2be322d0de532a97322d22325
 SHA1 (patch-plugins_amp.c) = e0336ff7fe078aa6b4e6b3d25b21b70ac6dc127d
 SHA1 (patch-plugins_delay.c) = ee551be35938b69d7b535640858d67ceeb261ee0
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/audio/ladspa/patches/patch-aa,v
retrieving revision 1.7
diff -u -r1.7 patch-aa
--- patches/patch-aa	25 Nov 2017 11:57:28 -0000	1.7
+++ patches/patch-aa	11 Jul 2019 12:49:14 -0000
@@ -50,14 +50,14 @@
  ../plugins/%.so:	plugins/%.c ladspa.h
 -	$(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
 -	$(LD) -o ../plugins/$*.so plugins/$*.o -shared
-+	$(CC) $(LOCAL_CPPFLAGS) $(LOCAL_CFLAGS) -o plugins/$*.o -c plugins/$*.c
-+	$(CC) -shared $(LOCAL_LDFLAGS) -o ../plugins/$*.so plugins/$*.o
++	${LIBTOOL} --mode=compile $(CC) $(LOCAL_CPPFLAGS) $(LOCAL_CFLAGS) -o plugins/$*.o -c plugins/$*.c
++	${LIBTOOL} --mode=link $(CC) $(LOCAL_LDFLAGS) -o ../plugins/$*.la plugins/$*.lo -rpath $(INSTALL_PLUGINS_DIR) -module -avoid-version
  
  ../plugins/%.so:	plugins/%.cpp ladspa.h
 -	$(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
 -	$(CPP) -o ../plugins/$*.so plugins/$*.o -shared
-+	$(CXX) $(LOCAL_CPPFLAGS) $(LOCAL_CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
-+	$(CXX) -shared $(LOCAL_LDFLAGS) -o ../plugins/$*.so plugins/$*.o
++	${LIBTOOL} --mode=compile $(CXX) $(LOCAL_CPPFLAGS) $(LOCAL_CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
++	${LIBTOOL} --mode=link $(CXX) $(LOCAL_LDFLAGS) -o ../plugins/$*.la plugins/$*.lo -rpath $(INSTALL_PLUGINS_DIR) -module -avoid-version
  
  ###############################################################################
  #
@@ -76,9 +76,9 @@
 +	$(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALL_PLUGINS_DIR)
 +	$(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALL_INCLUDE_DIR)
 +	$(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALL_BINARY_DIR)
-+	$(BSD_INSTALL_DATA) ../plugins/* ${DESTDIR}$(INSTALL_PLUGINS_DIR)
-+	$(BSD_INSTALL_DATA) ladspa.h ${DESTDIR}$(INSTALL_INCLUDE_DIR)
-+	$(BSD_INSTALL_PROGRAM) ../bin/* ${DESTDIR}$(INSTALL_BINARY_DIR)
++	${LIBTOOL} --mode=install $(BSD_INSTALL_LIB) ../plugins/*.la ${DESTDIR}$(INSTALL_PLUGINS_DIR)
++	${LIBTOOL} --mode=install $(BSD_INSTALL_DATA) ladspa.h ${DESTDIR}$(INSTALL_INCLUDE_DIR)
++	${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) ../bin/* ${DESTDIR}$(INSTALL_BINARY_DIR)
  
  /tmp/test.wav:	targets ../snd/noise.wav
  	../bin/listplugins
@@ -91,28 +91,38 @@
  
  ###############################################################################
  #
-@@ -90,17 +91,17 @@ targets:	$(PLUGINS) $(PROGRAMS)
+@@ -90,19 +91,21 @@ targets:	$(PLUGINS) $(PROGRAMS)
  #
  
  ../bin/applyplugin:	applyplugin.o load.o default.o
 -	$(CC) $(CFLAGS) $(LIBRARIES)					\
-+	$(CC) $(LOCAL_LDFLAGS) $(LIBRARIES)					\
- 		-o ../bin/applyplugin					\
- 		applyplugin.o load.o default.o
+-		-o ../bin/applyplugin					\
+-		applyplugin.o load.o default.o
++	${LIBTOOL} --mode=compile $(CC) -o applyplugin.o -c applyplugin.c
++	${LIBTOOL} --mode=compile $(CC) -o load.o -c load.c
++	${LIBTOOL} --mode=compile $(CC) -o default.o -c default.c
++	${LIBTOOL} --mode=link $(CC) $(LOCAL_LDFLAGS) -o ../bin/applyplugin applyplugin.lo load.lo default.lo $(LIBRARIES)					\
  
  ../bin/analyseplugin:	analyseplugin.o load.o default.o
 -	$(CC) $(CFLAGS) $(LIBRARIES)					\
-+	$(CC) $(LOCAL_LDFLAGS) $(LIBRARIES)					\
- 		-o ../bin/analyseplugin 				\
- 		analyseplugin.o load.o default.o
+-		-o ../bin/analyseplugin 				\
+-		analyseplugin.o load.o default.o
++	${LIBTOOL} --mode=compile $(CC) -o analyseplugin.o -c analyseplugin.c
++	${LIBTOOL} --mode=compile $(CC) -o load.o -c load.c
++	${LIBTOOL} --mode=compile $(CC) -o default.o -c default.c
++	${LIBTOOL} --mode=link $(CC) $(LOCAL_LDFLAGS) -o ../bin/analyseplugin analyseplugin.lo load.lo default.lo $(LIBRARIES)
  
  ../bin/listplugins:	listplugins.o search.o
 -	$(CC) $(CFLAGS) $(LIBRARIES)					\
-+	$(CC) $(LOCAL_LDFLAGS) $(LIBRARIES)					\
- 		-o ../bin/listplugins	 				\
- 		listplugins.o search.o
+-		-o ../bin/listplugins	 				\
+-		listplugins.o search.o
++	${LIBTOOL} --mode=compile $(CC) -o listplugins.o -c listplugins.c
++	${LIBTOOL} --mode=compile $(CC) -o search.o -c search.c
++	${LIBTOOL} --mode=link $(CC) $(LOCAL_LDFLAGS) -o ../bin/listplugins listplugins.lo search.lo $(LIBRARIES)
  
-@@ -123,4 +124,3 @@ backup:		clean
+ ###############################################################################
+ #
+@@ -123,4 +126,3 @@ backup:		clean
  	tar czf `date '+../backup/ladspa_sdk.%Y%m%d%H%M.tgz'` ladspa_sdk/)
  
  ###############################################################################
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/audio/ladspa/patches/patch-ab,v
retrieving revision 1.4
diff -u -r1.4 patch-ab
--- patches/patch-ab	11 Jan 2012 18:05:09 -0000	1.4
+++ patches/patch-ab	11 Jul 2019 12:49:14 -0000
@@ -2,7 +2,7 @@
 
 --- applyplugin.c.orig	2007-11-06 10:52:56.000000000 +0000
 +++ applyplugin.c
-@@ -6,7 +6,17 @@
+@@ -6,7 +6,19 @@
  /*****************************************************************************/
  
  #include <dlfcn.h>
@@ -15,6 +15,8 @@
 +#  define LITTLE_ENDIAN 1234
 +#  define BYTE_ORDER LITTLE_ENDIAN
 +# endif
++#elif defined(__APPLE__)
++# include <machine/endian.h>
 +#else
 +# include <sys/endian.h>
 +#endif


Home | Main Index | Thread Index | Old Index