zyn: Fix qtractor crash when loading sessions with zyn included

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2019-04-13 01:00:14 +02:00
parent acf20d1fc8
commit 363bcd8757
7 changed files with 115 additions and 171 deletions

View File

@@ -10,6 +10,8 @@ SRC_URI = " \
git://github.com/DISTRHO/DISTRHO-Ports.git \
file://0001-disable-pitchedDelay-it-uses-double-precision-SSE2-b.patch \
file://0002-Refine-Plugin-do-not-include-xmmintrin.h.patch \
file://0003-Fix-build-with-musl-by-removing-unused-SystemStats-g.patch \
file://0004-Further-musl-fix-by-removal-of-unused-function.patch \
\
http://linuxsynths.com/ObxdPatchesDemos/ObxdPatchesBrian-01.tar.gz;name=linuxsynths-obxd-patches1;subdir=linuxsynths-obxd-patches \
\
@@ -17,9 +19,9 @@ SRC_URI = " \
http://linuxsynths.com/VexPatchesDemos/VexPatches02.tar.gz;name=linuxsynths-vex-patches2;subdir=linuxsynths-vex-patches \
"
SRCREV = "a82fff059baafc03f7c0e8b9a99f383af7bfbd79"
SRCREV = "500ac85e3d10d82e1488d09f542daec424a60efd"
S = "${WORKDIR}/git"
PV = "2018-04-16"
PV = "2018-04-16+git${SRCPV}"
SRC_URI[linuxsynths-obxd-patches1.md5sum] = "32244f847a54a71ee3c25079df5c8b84"
SRC_URI[linuxsynths-obxd-patches1.sha256sum] = "246fccadd71bb9f0606a95bf7b0aee7807fd3a14f754367425423a51c31e160e"

View File

@@ -10,28 +10,9 @@ Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
Makefile | 6 +++---
src/utils/Makefile | 24 ++++++++----------------
2 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index c918fb11..282d590d 100644
--- a/Makefile
+++ b/Makefile
@@ -39,10 +39,10 @@ export CC = g++
export PHP = php
export LD = ld
export LDFLAGS = $(LD_ARCH) -L$(LD_PATH)
-export SO_FLAGS = $(CC_ARCH) -Wl,-rpath,$(LD_PATH) -Wl,-z,relro,-z,now -Wl,--gc-sections -shared -Llibrary -lc -fPIC
+export SO_FLAGS = $(CC_ARCH) -Wl,-z,relro,-z,now -Wl,--gc-sections -shared -Llibrary -lc -fPIC
export MERGE_FLAGS = $(LD_ARCH) -r
-export EXE_TEST_FLAGS = $(CC_ARCH) -Wl,-rpath,$(LD_PATH)
-export EXE_FLAGS = $(CC_ARCH) -Wl,-rpath,$(LD_PATH) -Wl,-z,relro,-z,now -Wl,--gc-sections
+export EXE_TEST_FLAGS = $(CC_ARCH)
+export EXE_FLAGS = $(CC_ARCH) -Wl,-z,relro,-z,now -Wl,--gc-sections
# Objects
export OBJ_CORE = $(OBJDIR)/core.o
diff --git a/src/utils/Makefile b/src/utils/Makefile
index 0d9b57f9..c372c850 100644
--- a/src/utils/Makefile

View File

@@ -16,15 +16,13 @@ DEPENDS += " \
lv2 \
"
SRC_URI += " \
file://0001-Makefile-align-for-oe-cross-build.patch \
"
SRC_URI += "file://0001-Makefile-align-for-oe-cross-build.patch"
ARM_INSTRUCTION_SET = "arm"
def profile_handler(d):
profile = d.getVar('DEFAULTTUNE', True)
features = d.getVar('TUNE_FEATURES', True).split()
profile = d.getVar('DEFAULTTUNE')
features = d.getVar('TUNE_FEATURES').split()
if 'armv7a' in features or 'armv7ve' in features:
profile = 'armv7a'
return profile
@@ -36,12 +34,10 @@ EXTRA_OEMAKE += " \
"
do_compile_prepend() {
export LDLDFLAGS="`echo $LDFLAGS | sed 's:-Wl,::g'`"
export CC="${CXX}"
export CC_ARCH="${CXXFLAGS}"
export LD_ARCH="`echo $LDFLAGS | sed 's:-Wl,::g'`"
}
do_install() {
${MAKE} ${EXTRA_OEMAKE} DESTDIR=${D} install
}

View File

@@ -3,9 +3,12 @@ HOMEPAGE = "http://lsp-plug.in/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3000208d539ec061b899bce1d9ce9404"
SRC_URI = "git://github.com/sadko4u/lsp-plugins.git"
SRCREV = "1d41a52f6b2236f38670c2d3a28ab97c419a4754"
SRC_URI = " \
git://github.com/sadko4u/lsp-plugins.git \
file://0001-Remove-RPATHs.patch \
"
SRCREV = "04cc45a4aee3bd3a46ecbd0a9160d0d87f8f8a32"
S = "${WORKDIR}/git"
PV = "1.1.5"
PV = "1.1.9"
do_configure[noexec] = "1"

View File

@@ -7,39 +7,15 @@ Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
Makefile | 19 ++++++++-----------
scripts/make/configure.mk | 7 -------
src/core/Makefile | 2 +-
src/dsp/Makefile | 2 +-
src/metadata/Makefile | 2 +-
src/plugins/Makefile | 2 +-
src/test/Makefile | 2 +-
src/ui/ws/x11/Makefile | 2 +-
8 files changed, 14 insertions(+), 24 deletions(-)
Makefile | 10 ++++----
scripts/make/configure.mk | 52 ---------------------------------------
3 files changed, 8 insertions(+), 60 deletions(-)
diff --git a/Makefile b/Makefile
index c918fb1..2f20248 100644
index 314efa06..4f8ad82a 100644
--- a/Makefile
+++ b/Makefile
@@ -35,14 +35,11 @@ export BASEDIR = ${CURDIR}
export INCLUDE = ${INC_FLAGS}
export MAKE_OPTS = -s
export CFLAGS = $(CC_ARCH) -std=c++98 -fdata-sections -pthread -ffunction-sections -fno-exceptions -fno-asynchronous-unwind-tables -Wall -pipe -fno-rtti $(CC_FLAGS) -DLSP_MAIN_VERSION=\"$(VERSION)\" -DLSP_INSTALL_PREFIX=\"$(PREFIX)\"
-export CC = g++
export PHP = php
-export LD = ld
-export LDFLAGS = $(LD_ARCH) -L$(LD_PATH)
-export SO_FLAGS = $(CC_ARCH) -Wl,-rpath,$(LD_PATH) -Wl,-z,relro,-z,now -Wl,--gc-sections -shared -Llibrary -lc -fPIC
+export SO_FLAGS = $(CC_ARCH) $(LDFLAGS) -Wl,-z,relro,-z,now -Wl,--gc-sections -shared -Llibrary -lc -fPIC
export MERGE_FLAGS = $(LD_ARCH) -r
-export EXE_TEST_FLAGS = $(CC_ARCH) -Wl,-rpath,$(LD_PATH)
-export EXE_FLAGS = $(CC_ARCH) -Wl,-rpath,$(LD_PATH) -Wl,-z,relro,-z,now -Wl,--gc-sections
+export EXE_TEST_FLAGS = $(CC_ARCH)
+export EXE_FLAGS = $(CC_ARCH) $(LDFLAGS) -Wl,-z,relro,-z,now -Wl,--gc-sections
# Objects
export OBJ_CORE = $(OBJDIR)/core.o
@@ -69,11 +66,11 @@ export BIN_PROFILE = $(OBJDIR)/$(ARTIFACT_ID)-profile
@@ -61,11 +61,11 @@ export BIN_PROFILE = $(OBJDIR)/$(ARTIFACT_ID)-profile
export BIN_TEST = $(OBJDIR)/$(ARTIFACT_ID)-test
# Utils
@@ -57,125 +33,68 @@ index c918fb1..2f20248 100644
# Files
diff --git a/scripts/make/configure.mk b/scripts/make/configure.mk
index 5603a8f..498a5e5 100644
index 47aa3bd4..50d0b34b 100644
--- a/scripts/make/configure.mk
+++ b/scripts/make/configure.mk
@@ -53,12 +53,10 @@ export RELEASES
@@ -50,58 +50,6 @@ export INSTALLATIONS
export UNINSTALLATIONS
export RELEASES
# Configure compiler and linker flags
LD_ARCH =
-# Configure compiler and linker flags
-LD_ARCH =
-CC_ARCH =
LD_PATH =
# Build profile
ifeq ($(BUILD_PROFILE),i586)
-LD_PATH =
-
-# Build profile
-ifeq ($(BUILD_PROFILE),i586)
- CC_ARCH = -m32
ifeq ($(BUILD_PLATFORM), Linux)
LD_ARCH = -m elf_i386
endif
@@ -69,7 +67,6 @@ ifeq ($(BUILD_PROFILE),i586)
endif
ifeq ($(BUILD_PROFILE),x86_64)
- ifeq ($(BUILD_PLATFORM), Linux)
- LD_ARCH = -m elf_i386
- endif
- ifeq ($(BUILD_PLATFORM), BSD)
- LD_ARCH = -m elf_i386_fbsd
- endif
- LD_PATH = /usr/lib:/lib:/usr/local/lib
-endif
-
-ifeq ($(BUILD_PROFILE),x86_64)
- CC_ARCH = -m64
ifeq ($(BUILD_PLATFORM), Linux)
LD_ARCH = -m elf_x86_64
endif
@@ -80,21 +77,17 @@ ifeq ($(BUILD_PROFILE),x86_64)
endif
ifeq ($(BUILD_PROFILE),armv6a)
- CC_ARCH = -march=armv6-a
LD_PATH = /usr/lib64:/lib64:/usr/local/lib64
endif
ifeq ($(BUILD_PROFILE),armv7a)
- CC_ARCH = -march=armv7-a
LD_PATH = /usr/lib64:/lib64:/usr/local/lib64
endif
ifeq ($(BUILD_PROFILE),armv8a)
- ifeq ($(BUILD_PLATFORM), Linux)
- LD_ARCH = -m elf_x86_64
- endif
- ifeq ($(BUILD_PLATFORM), BSD)
- LD_ARCH = -m elf_x86_64_fbsd
- endif
- LD_PATH = /usr/lib:/lib:/usr/local/lib
-endif
-
-ifeq ($(BUILD_PROFILE),armv6a)
- CC_ARCH = -march=armv6-a -marm
- LD_PATH = /usr/lib64:/lib64:/usr/local/lib64
-endif
-
-ifeq ($(BUILD_PROFILE),armv7a)
- CC_ARCH = -march=armv7-a -marm
- LD_PATH = /usr/lib64:/lib64:/usr/local/lib64
-endif
-
-ifeq ($(BUILD_PROFILE),armv8a)
- CC_ARCH = -march=armv7-a -marm
- LD_PATH = /usr/lib64:/lib64:/usr/local/lib64
-endif
-
-ifeq ($(BUILD_PROFILE),aarch64)
- CC_ARCH = -march=armv8-a
LD_PATH = /usr/lib:/lib:/usr/local/lib
endif
- LD_PATH = /usr/lib:/lib:/usr/local/lib
-endif
-
-export CC_ARCH
export LD_ARCH
export LD_PATH
-export LD_ARCH
-export LD_PATH
-
diff --git a/src/core/Makefile b/src/core/Makefile
index 1db8603..33aa15d 100644
--- a/src/core/Makefile
+++ b/src/core/Makefile
@@ -13,4 +13,4 @@ $(FILES):
$(OBJ_CORE): $(FILES)
@echo " $(LD) $(notdir $(OBJ_CORE))"
- @$(LD) -o $(OBJ_CORE) -r $(LDFLAGS) $(FILES)
+ @$(LD) -o $(OBJ_CORE) -r $(LDLDFLAGS) $(FILES)
diff --git a/src/dsp/Makefile b/src/dsp/Makefile
index 97ed47f..7e099cd 100644
--- a/src/dsp/Makefile
+++ b/src/dsp/Makefile
@@ -42,7 +42,7 @@ all: $(OBJ_DSP)
$(OBJ_DSP): $(LINK_OBJECTS)
@echo " $(LD) $(notdir $(OBJ_DSP))"
- @$(LD) -o $(OBJ_DSP) -r $(LDFLAGS) $(LINK_OBJECTS)
+ @$(LD) -o $(OBJ_DSP) -r $(LDLDFLAGS) $(LINK_OBJECTS)
$(DSP_IMPL) $(BITS_IMPL) $(NATIVE_IMPL) $(X86_IMPL) $(ARM_IMPL):
@echo " $(CC) $(FILE)"
diff --git a/src/metadata/Makefile b/src/metadata/Makefile
index b3206ed..1f840de 100644
--- a/src/metadata/Makefile
+++ b/src/metadata/Makefile
@@ -10,7 +10,7 @@ target: all
$(OBJ_METADATA): $(FILES)
@echo " $(LD) $(notdir $(OBJ_METADATA))"
- @$(LD) -o $(OBJ_METADATA) -r $(LDFLAGS) $(FILES)
+ @$(LD) -o $(OBJ_METADATA) -r $(LDLDFLAGS) $(FILES)
$(FILES):
@echo " $(CC) $(FILE)"
diff --git a/src/plugins/Makefile b/src/plugins/Makefile
index 09bc4ce..7295c0f 100644
--- a/src/plugins/Makefile
+++ b/src/plugins/Makefile
@@ -8,7 +8,7 @@ all: $(OBJ_PLUGINS)
$(OBJ_PLUGINS): $(FILES) $(SUBDIRS)
@echo " $(LD) $(notdir $(OBJ_PLUGINS))"
- @$(LD) -o $(OBJ_PLUGINS) -r $(LDFLAGS) $(FILES)
+ @$(LD) -o $(OBJ_PLUGINS) -r $(LDLDFLAGS) $(FILES)
$(FILES):
@echo " $(CC) $(FILE)"
diff --git a/src/test/Makefile b/src/test/Makefile
index 4f225d0..fe5d5b2 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -13,5 +13,5 @@ $(FILES):
$(OBJ_TEST_CORE): $(FILES)
@echo " $(LD) $(notdir $(OBJ_TEST_CORE))"
- @$(LD) -o $(OBJ_TEST_CORE) -r $(LDFLAGS) $(FILES)
+ @$(LD) -o $(OBJ_TEST_CORE) -r $(LDLDFLAGS) $(FILES)
diff --git a/src/ui/ws/x11/Makefile b/src/ui/ws/x11/Makefile
index 649c6a4..5e45dd2 100644
--- a/src/ui/ws/x11/Makefile
+++ b/src/ui/ws/x11/Makefile
@@ -8,7 +8,7 @@ all: $(OBJ_WS_X11_CORE)
$(OBJ_WS_X11_CORE): $(FILES)
@echo " $(LD) $(notdir $(@))"
- @$(LD) -o $(OBJ_WS_X11_CORE) $(LDFLAGS) -r $(FILES)
+ @$(LD) -o $(OBJ_WS_X11_CORE) $(LDLDFLAGS) -r $(FILES)
$(FILES):
@echo " $(CC) $(FILE)"
# Dependencies: compile headers and linkage libraries
ifeq ($(BUILD_SYSTEM),Windows)
--
2.20.1

View File

@@ -29,6 +29,7 @@ SRC_URI = " \
file://0002-Controller-Spliter-align-Makefiles-for-cross-compili.patch \
file://0003-Nio.cpp-Do-not-use-ps-aux-to-find-jack-busybox-s-ps-.patch \
file://0004-Keep-our-build-flags.patch \
file://0005-Fix-crash-with-mxml-V3.patch \
"
SRCREV = "576f1371b44db44865d57bbd50609e906bd2bfd7"
PV = "3.0.4+git${SRCPV}"

View File

@@ -0,0 +1,42 @@
From 81cf94ea9300b1093b552f69d2eb43f02f80274d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Fri, 12 Apr 2019 23:24:52 +0200
Subject: [PATCH] Fix crash with mxml V3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Loading my old qtractor-sessions started to crash on my Raspi. A remote debug
session lead to zynaddsubfx and the point of code.
Wih this modification the sessions load again without issues.
Upstream-Status: Submitted [1]
[1] https://github.com/zynaddsubfx/zynaddsubfx/pull/27
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/Misc/XMLwrapper.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/Misc/XMLwrapper.cpp b/src/Misc/XMLwrapper.cpp
index 64c7fd6d..b4bd2325 100644
--- a/src/Misc/XMLwrapper.cpp
+++ b/src/Misc/XMLwrapper.cpp
@@ -688,8 +688,11 @@ std::vector<XmlNode> XMLwrapper::getBranch(void) const
XmlNode n(mxmlGetElement(current));
int count = mxmlElementGetAttrCount(current);
const char *name;
+ const char *attrib;
for(int i = 0; i < count; ++i) {
- n[name] = mxmlElementGetAttrByIndex(current, i, &name);
+ attrib = mxmlElementGetAttrByIndex(current, i, &name);
+ if(name)
+ n[name] = attrib;
}
#else
auto elm = current->value.element;
--
2.20.1