All examples throwing this error: terminate called after throwing an instance of 'std::length_error'

After installing(building) all depends on a FreeBSD based linux(Biasilinux) was able to compile newest OF for armv7l and in a seperate directory armv6l on a Raspberry Pi4.

All examples and an app that previously ran without issues on a Raspberry Pi3B throw this error:

# ./polygonExample
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
Aborted

gdb of any of the example binarys yields this

(gdb) r
Starting program: /opt/openFrameWorks6/examples/graphics/polygonExample/bin/polygonExample

Program received signal SIGILL, Illegal instruction.
_dl_debug_initialize (ldbase=1, ns=195720) at dl-debug.c:47
47      dl-debug.c: No such file or directory.
(gdb) bt
#0  _dl_debug_initialize (ldbase=1, ns=195720) at dl-debug.c:47
#1  0xb6fd1fcc in dl_main (phdr=<optimized out>, phdr@entry=0x10034,
    phnum=3070228800, user_entry=0x1, user_entry@entry=0xbefff9a4,
    auxv=0xb6fff050 <_rtld_local>) at rtld.c:1462
#2  0xb6fe5844 in _dl_sysdep_start (
    start_argptr=start_argptr@entry=0xbefffca0, dl_main=0x64)
    at ../elf/dl-sysdep.c:249
#3  0xb6fd3e58 in _dl_start_final (arg=arg@entry=0xbefffca0, info=0xbefffa20,
    info@entry=0xbefffa18) at rtld.c:308
#4  0xb6fd40e0 in _dl_start (arg=0xbefffca0) at rtld.c:416
#5  0xb6fcfe60 in _start () from /lib/ld-linux-armhf.so.3
#6  0xb6fcfe60 in _start () from /lib/ld-linux-armhf.so.3
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

gcc --version

gcc (GCC) 7.3.0

g++ --version

g++ (GCC) 7.3.0

uname -a

Linux 4.19.71±7l #2 SMP Thu Sep 26 19:04:32 UTC 2019 armv7l GNU/Linux

cat /proc/cpuinfo

processor : 0
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 270.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 1
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 270.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 2
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 270.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 3
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 270.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

Hardware : BCM2835
Revision : c03111
Serial : 1000000083b8c4af
Model : Raspberry Pi 4 Model B Rev 1.1

Using config.linuxarmv7l.default.mk modified from the armv7 OF build as such:

#PLATFORM_CFLAGS += -mcpu=cortex-a72
PLATFORM_CFLAGS += -march=armv7
#PLATFORM_CFLAGS += -mtune=cortex-a8
PLATFORM_CFLAGS += -mtune=cortex-a72
#PLATFORM_CFLAGS += -mfpu=neon
PLATFORM_CFLAGS += -mfpu=neon-fp-armv8
PLATFORM_CFLAGS += -mfloat-abi=hard
PLATFORM_CFLAGS += -fPIC
PLATFORM_CFLAGS += -ftree-vectorize
PLATFORM_CFLAGS += -Wno-psabi
PLATFORM_CFLAGS += -pipe

Using config.linuxarmv6l.default.mk unmodified for the armv6 OF build. Had to make copies of linuxarmv6l folder and rename to linuxarmv7l, same for the config.linuxarmv6l.default.mk → config.linuxarmv7l.default.mk to be able to compile the armv6 OF build on my Pi4.

As stated i am not using Raspbian.

Not sure where this error is coming from???

Solved:
https://docs.computecanada.ca/wiki/GCC_C%2B%2B_Dual_ABI

Thus, to link to binaries compiled using the old ABI when using GCC v5.1 or higher, one will need to specify _GLIBCXX_USE_CXX11_ABI=0 when compiling the C++ code.

In case anyone runs into this experimenting with non-Raspbian armv7l .