#error "__WORDSIZE is not defined"

getting close to making iPlug2 build for Elk. It seems it is mixing up system and sourced headers and i get an error about WORDSIZE. Does anyone have any ideas why it pulls in stuff from /usr/include/c++/ and makes these errors?

did source /opt/elk/1.0/environment-setup-cortexa7t2hf-neon-vfpv4-elk-linux-gnueabi

oli@ubuntu:~/Dev/iPlug2/Examples/IPlugInstrument$ make vst3
cmake -S . -B build-linux -DCMAKE_BUILD_TYPE=Debug
Found path /home/oli/.vst and is_dir=1
– Configuring done
– Generating done
– Build files have been written to: /home/oli/Dev/iPlug2/Examples/IPlugInstrument/build-linux
cmake --build build-linux --config Debug --target IPlugInstrument-vst3
make[1]: Entering directory ‘/home/oli/Dev/iPlug2/Examples/IPlugInstrument/build-linux’
make[2]: Entering directory ‘/home/oli/Dev/iPlug2/Examples/IPlugInstrument/build-linux’
make[3]: Entering directory ‘/home/oli/Dev/iPlug2/Examples/IPlugInstrument/build-linux’
make[4]: Entering directory ‘/home/oli/Dev/iPlug2/Examples/IPlugInstrument/build-linux’
[ 3%] Generating IPlugInstrument.vst3/Contents/Resources/fonts/Roboto-Regular.ttf
Scanning dependencies of target IPlugInstrument-vst3
make[4]: Leaving directory ‘/home/oli/Dev/iPlug2/Examples/IPlugInstrument/build-linux’
make[4]: Entering directory ‘/home/oli/Dev/iPlug2/Examples/IPlugInstrument/build-linux’
[ 3%] Building CXX object CMakeFiles/IPlugInstrument-vst3.dir/IPlugInstrument.cpp.o
In file included from /opt/elk/1.0/sysroots/cortexa7t2hf-neon-vfpv4-elk-linux-gnueabi/usr/include/sys/cdefs.h:452,
from /opt/elk/1.0/sysroots/cortexa7t2hf-neon-vfpv4-elk-linux-gnueabi/usr/include/features.h:450,
from /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h:524,
from /usr/include/c++/9/cstdio:41,
from /home/oli/Dev/iPlug2/IPlug/IPlug_include_in_plug_hdr.h:20,
from /home/oli/Dev/iPlug2/Examples/IPlugInstrument/IPlugInstrument.h:3,
from /home/oli/Dev/iPlug2/Examples/IPlugInstrument/IPlugInstrument.cpp:1:
/opt/elk/1.0/sysroots/cortexa7t2hf-neon-vfpv4-elk-linux-gnueabi/usr/include/bits/wordsize.h:23:2: error: #error “__WORDSIZE is not defined”

Hi Oli!

Can you point us to the CMake file?

It’s probably something there that is not adapted for cross-compilation.

thanks @Stefano!

Hi @olilarkin,
sorry for the slow response.

My guess is that the culprit here is the VST3’s CMake, in the past we had some fixes that we had to do there and that now are merged in the latest Steinberg’s SDKs but could be an issue here.

The link to the VST3 CMake is not valid anymore and I can’t find it on Github (it was pointing to a directory under /blob/linux), can you tell me which branch / commit should I try to test building and if there are other dependencies we need to set up?

sorry that file has moved to a subfolder

if you checkout commit 468f95a8104303a1e155a7d4ef1748327c9df821

that is before the commit (b539a5f6ab4c58879bb906e6c697af2024f0db8b) that moved the cmake files.

it should be possible to build with make vst3/install inside the IPlugInstrument folder

Hi Oli,
I just checked out that commit but couldn’t find any CMake files under the IPlugInstrument folder.

The CMake files that I see from top-level repo are:


I also looked at makefiles but they all seem to be related to web-related stuff or am I missing something?

OK here is a branch

check that out and navigate to iPlug2/Examples/IPlugInstrument

type make vst3

here is the CMakeLists file for IPlugInstrument