Coder Social home page Coder Social logo

Comments (9)

turian avatar turian commented on June 26, 2024

I also try the standard Dockerfile for DawDreamer, even though it for i86, hoping to run through emulation mode.

But now I get this:

import dawdreamer
Traceback (most recent call last):
File "", line 1, in
File "/DawDreamer/dawdreamer/init.py", line 4, in
from .dawdreamer import *
ImportError: /DawDreamer/dawdreamer/dawdreamer.so: undefined symbol: PyThread_tss_create

[root@ad2496ee1c86 DawDreamer]# python
Python 2.7.5 (default, Nov 14 2023, 16:14:06)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import dawdreamer
Traceback (most recent call last):
File "", line 1, in
File "dawdreamer/init.py", line 4, in
from .dawdreamer import *
ImportError: dawdreamer/dawdreamer.so: undefined symbol: PyInstanceMethod_Type

from dawdreamer.

turian avatar turian commented on June 26, 2024

Perhaps I can disable Faust in DawDreamer? I am only interested in loading presets and running them

from dawdreamer.

DBraun avatar DBraun commented on June 26, 2024

I haven't tried it in a while, but you should be able to skip everything Faust related by removing the BUILD_DAWDREAMER_FAUST preprocessor in DawDreamer.jucer and regenerating the Makefiles. Editing the makefile by other means should be doable do. I think I'll try to do more architecture support toward the end of December.

from dawdreamer.

DBraun avatar DBraun commented on June 26, 2024

In your first post I noticed that the script uses both python3.10 and python 3.8. Your second post uses Python 2.7.

If that doesn't fix it, something could be going wrong with make -f Make.llvm.static, so running that in isolation and looking at debug print statements or logs could help.

from dawdreamer.

turian avatar turian commented on June 26, 2024

Sorry my mistake, I have been experimenting with ubuntu22.04 and 20.04 and python2 and python3 and experiencing no success.

But I have the same error that I originally posted, sorry for not rigorously testing what I commented. I have tried all variation though.

I can remove the BUILD_DAWDREAMER_FAUST in DawDreamer.jucer but I don't know how to regenerate the Makefiles.

from dawdreamer.

DBraun avatar DBraun commented on June 26, 2024

No worries. Can you try removing "-DBUILD_DAWDREAMER_FAUST" in https://github.com/DBraun/DawDreamer/blob/main/Builds/LinuxMakefile/Makefile

from dawdreamer.

turian avatar turian commented on June 26, 2024

I tried that but it still has a lot of faust stuff it's pulling in:

8746e3c89c10 ~/DawDreamer/Builds/LinuxMakefile # make
Linking DawDreamer - Dynamic Library
/usr/bin/aarch64-unknown-linux-gnu-ld.bfd: cannot find -lfaustwithllvm: No such file or directory
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:122: build/libdawdreamer.so] Error 1

I've even resorted to trying to make a Gentoo Dockerfile. But Gentoo doesn't want to build static LLVM:
https://discourse.llvm.org/t/llvm-static-libs/38255
https://lists.llvm.org/pipermail/llvm-dev/2015-September/090589.html

I would really love a way to build DawDreamer that doesn't depend upon faust, this has been really gnarly

from dawdreamer.

DBraun avatar DBraun commented on June 26, 2024

Sorry I overlooked another thing. Try removing -lfaustwithllvm from the Makefile too. If there are other issues just keep deleting anything Faust related from the Makefile.

from dawdreamer.

turian avatar turian commented on June 26, 2024

Okay so your suggestion helped. (p.s. building libfaustwithllvm is super gnarly and I couldn't figure it out after trying a variety of methods)

This Dockerfile builds and I can import dawdreamer:

# Using Ubuntu 22.04 as the base image
FROM ubuntu:22.04

LABEL maintainer="[email protected]" \
      version="0.1" \
      description=""

# Set the working directory
WORKDIR /root/

# Set the environment variables
ENV LANG=C.UTF-8 \
    TZ=Etc/UTC \
    DEBIAN_FRONTEND=noninteractive \
    PYTHONLIBPATH=/usr/lib/python3.10 \
    PYTHONINCLUDEPATH=/usr/include/python3.10

# Setting the timezone and installing essential packages
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
    && apt-get update \
    && apt-get install -y lsb-release software-properties-common wget python3-pip python3-dev git build-essential cmake g++ make nasm curl unzip libgl1-mesa-dev \
    && apt-get install -y lv2-c++-tools libgtkmm-2.4-1v5 pkg-config lv2-dev libgtkmm-2.4-dev \
       libsndfile1 libx11-dev libxrandr-dev libxinerama-dev libxrender-dev libxcomposite-dev libxcursor-dev libfreetype6-dev libsndfile1-dev \
       libvorbis-dev libopus-dev libflac-dev libasound2-dev alsa-utils
#    && bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" \

# Clone repositories and install Python packages
RUN git clone https://github.com/zynthian/moog.git \
    && pip3 install pedalboard \
    && git clone https://github.com/DBraun/DawDreamer.git \
    && cd DawDreamer \
    && git submodule init \
    && git submodule update

# Modify Makefile
RUN perl -i -pe 's/ -lfaustwithllvm//' DawDreamer/Builds/LinuxMakefile/Makefile
RUN perl -i -pe 's/ "-DBUILD_DAWDREAMER_FAUST"//' DawDreamer/Builds/LinuxMakefile/Makefile

# Build libsamplerate
RUN cd DawDreamer/thirdparty/libsamplerate && \
	cmake -DCMAKE_BUILD_TYPE=Release -Bbuild_release -DCMAKE_POSITION_INDEPENDENT_CODE=ON && \
	cd build_release && \
	make CONFIG=Release

# Build DawDreamer
RUN cd DawDreamer/Builds/LinuxMakefile \
    && make -j8 VERBOSE=1 CONFIG=Release LIBS="-lstdc++fs" CXXFLAGS="-I../../alsa-lib/include -I/usr/include/python3.10 -I$PYTHONINCLUDEPATH"  LDFLAGS="-L/__w/DawDreamer/DawDreamer/alsa-lib/src -L$PYTHONLIBPATH -L/root/faust-2.69.3/lib -L/root/faust-2.69.3/build/lib/"

# Move the built library
RUN cd DawDreamer/Builds/LinuxMakefile && mv build/libdawdreamer.so ../../dawdreamer/dawdreamer.so

RUN cd moog && CXXFLAGS="-I/usr/include/lv2-c++-tools" CFLAGS="-I/usr/include/lv2-c++-tools" make && make install

# Build and install the Python package
RUN cd DawDreamer && python3 setup.py build && python3 setup.py install

# Test import of DawDreamer
RUN { python3 -c "import dawdreamer"; }

from dawdreamer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.