[OT] Question about the docker image

Hi,

I just tried to use http://wiki.moddevices.com/wiki/How_To_Use_Docker_Toolbox_With_MPB for trying to get my LV2 version of Dexed ported for the Mod-Duo. But following the instructions I got the imgae running and can attach to it, but I fail to install additional software (like apt-get install vim or git clone https://github.com/lvtk/lvtk.git). I even cannot find ifconfig or ping

Maybe it is easier to use the mod-plugin-builder? Has anyone a hint what maybe easier to use?

I need lvtk for the Dexed-port, so this would be the first goal to reach…

Regards, Holger

The linux inside docker toolbox is a very barebones one, with only the stuff needed to run docker.
Once you’re inside a docker instance you can install new stuff there (it uses ubuntu 16.04 as base)

lvtk is already provided as package for plugins to use in mod-plugin-builder.
You don’t need to build it manually.

Hi @falkTX,

thanks fo the fast answer! I will try to run mod-plugin-builder and use the lvtk package. I just found one problem with gcc-6 and mod-plugin-builder:
gcc-6 seems to have problems building the cross-compiler (you can find many patches for the problem), so I have installed gcc-5:

apt-get install gcc-5 g+±5
HOSTCC=/usr/bin/gcc-5 ./bootstrap.sh

Regards, Holger

Just following the wiki, building mod-plugin-builder wasn’t hard, just took a long time. Can’t comment on the other methods because I haven’t used them.

Why did “sudo apt-get install vim” not work ? What’s the error message ?

It did work for me… I’ve successfully built plugins in the Docker image and installing vim did work for me.

Ahhhh, had to do “apt-get update” before… now vim installs…

Regards, Holger

Hi all,

I tried a little bit to learn from other packages how to write a buildroot recipe for dexed but I am failing… Perhaps someone can tell me what I am doing wrong?

What I want to put in a dexed.mk is the following:

git clone https://github.com/dcoredump/dexed
cd dexed
git checkout native-lv2
cd src
make install

What I have done until now is:

DEXED_BUNDLES = dexed.lv2
DEXED_SITE = https://github.com/dcoredump/dexed
DEXED_SITE_METHOD = git
DEXED_DEPENDENCIES = lvtk

define DEXED_EXTRACT_CMDS
(cd $(@D) && git checkout native-lv2 &&
touch $(@D)/.stamp_downloaded)
endef

define DEXED_BUILD_CMDS
(cd $(@D)/src && make -j $(PARALLEL_JOBS) install)
endef

$(eval $(autotools-package))

If I run this with ./build dexed I am getting the problem that at some point buildroot tries to download something what really don’t exists: http://sources.buildroot.net/dexed-undefined.tar.gz

Cloning into bare repository ‘dexed-undefined’…
remote: Counting objects: 7404, done.
remote: Compressing objects: 100% (1094/1094), done.
remote: Total 7404 (delta 728), reused 0 (delta 0), pack-reused 6305
Receiving objects: 100% (7404/7404), 50.74 MiB | 3.42 MiB/s, done.
Resolving deltas: 100% (4730/4730), done.
Checking connectivity… done.
fatal: Not a valid object name
–2017-01-16 08:28:40-- http://sources.buildroot.net/dexed-undefined.tar.gz
Resolving sources.buildroot.net (sources.buildroot.net)… 176.9.16.109
Connecting to sources.buildroot.net (sources.buildroot.net)|176.9.16.109|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2017-01-16 08:28:40 ERROR 404: Not Found.

package/pkg-generic.mk:113: recipe for target ‘/home/builder/mod-workdir/plugins-dep/build/dexed-undefined/.stamp_downloaded’ failed
make: *** [/home/builder/mod-workdir/plugins-dep/build/dexed-undefined/.stamp_downloaded] Error 1

Hmmm - what am I doing wrong, has anybody an idea?

Thanks, Holger

You need to set your _SITE variable properly.
See this for a github repo example https://github.com/moddevices/mod-plugin-builder/blob/master/plugins/package/dpf-plugins/dpf-plugins.mk#L7
(_VERSION is the commit id, can be from any branch)

Then remove DEXED_EXTRACT_CMDS which does nothing.

Also DEXED_BUILD_CMDS shouldn’t be needed when using autotools.

Hi @falkTX,

many thanks! Now I got it… I made also the mistake to eval autotools, but I am using a generic make. Now I only have to setup the right installation places and test.

Regards, Holger

Hmmm - nearly ready, but:

...
g++ -fPIC -DPIC -std=c++11 -I. -I/usr/local/include/lvtk-2 -DLVTK_DEBUG=false  -O3 -Wall -c dexed.cpp
dexed.cpp:3:26: fatal error: lvtk/synth.hpp: No such file or directory
compilation terminated.
Makefile:86: recipe for target 'dexed.o' failed
make[1]: *** [dexed.o] Error 1
make[1]: *** Waiting for unfinished jobs....
...

I have added DEXED_DEPENDENCIES = lvtk to dexed.mk but it seems that the headers are not found. How do I manage this?

Here is my actual dexed.mk:

######################################
#
# dexed
#
######################################

DEXED_DEPENDENCIES = lvtk
DEXED_VERSION = 9700333fbe2b1388963b32672c6966cf21fd6232 
DEXED_BUNDLES = dexed.lv2
DEXED_SITE = $(call github,dcoredump,dexed,$(DEXED_VERSION))

define DEXED_BUILD_CMDS
        (cd $(@D)/src && make -j $(PARALLEL_JOBS))
endef

define DEXED_INSTALL_TARGET_CMDS
        (cd $(@D)/src; cp -R dexed.lv2 $(TARGET_DIR)/usr/lib/lv2)
endef

$(eval $(generic-package))

Regards, Holger

that seems to be an issue within your own project setup.
you need to make sure it finds and uses lvtk pkg-config variables.

on the local system (non-cross-compile buildroot), this command produces some output:
pkg-config --cflags --libs lvtk-plugin-1

you need to allow your buildsystem (seems to be autotools), to find lvtk stuff.

Man thanks @falkTX. I will take a look at how to use pkgconfig in my project right.

Regards, Holger

Hi @ll,

I got my project fixed and now it uses pkg-config for the lvtk2 compile options. Runs fine for x86/Raspi. But I get stuck with compiling on docker-mpb:

...
g++ -ffast-math -fprefetch-loop-arrays -funroll-loops -funsafe-loop-optimizations -O3 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DPIC -std=c++11 -I. -I/home/builder/mod-workdir/plugins-dep/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/lvtk-2 -I/home/builder/mod-workdir/plugins-dep/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include   -DLVTK_DEBUG=false -O3 -Wall -c msfa/fm_core.cc
g++: error: unrecognized command line option '-mfpu=neon-vfpv4'
g++: error: unrecognized command line option '-mfloat-abi=hard'
g++: error: unrecognized command line option '-mvectorize-with-neon-quad'
Makefile:98: recipe for target 'fm_core.o' failed
 ...

This seems to be a problem with recognizing optimization flags for g++ that I found on http://wiki.moddevices.com/wiki/Developers. Without these flags the compiler complains about not finding gnu/stubs-soft.h

Any ideas?

Regards, Holger

yes, you’re not using the correct compiler.
g++ is your native one, you need to use the compiler/toolchain from mod-plugin-builder.

Hi @falkTX,

argh! I didn’t checked for other compilers and thought there is only the right one on the image. Now I got it!

######################################
#
# dexed
#
######################################

DEXED_DEPENDENCIES = lvtk
DEXED_VERSION = e95b8626cd2a6a3175df5238ca4efb05e470e4ef
DEXED_BUNDLES = dexed.lv2
DEXED_SITE = $(call github,dcoredump,dexed,$(DEXED_VERSION))
DEXED_TARGET_MAKE = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) MOD=1

define DEXED_BUILD_CMDS
        (cd $(@D)/src && $(DEXED_TARGET_MAKE) -j $(PARALLEL_JOBS))
endef

define DEXED_INSTALL_TARGET_CMDS
        (cd $(@D)/src; cp -R dexed.lv2 $(TARGET_DIR)/usr/lib/lv2)
endef

$(eval $(generic-package))

I will try to put Dexed on the Mod-Duo tomorrow - perhaps someone else has fun to try this before:

cd ~/mod-workdir/plugins/
tar cz dexed.lv2 | base64 | curl -F 'package=@-' http://192.168.51.1/sdk/install

Regards, Holger

1 Like

Hi @ll,

very nice: it works!!! :tada:

Sooooo nice! Is there anyone interested in testing? I can create a tarball for self-installing - but remember: Dexed this is not supported by MOD - and I cannot give guarantee for anything :wink:

Regards, Holger

1 Like