grrrr / flext Goto Github PK
View Code? Open in Web Editor NEWflext – C++ development layer for Pure Data and Max
Home Page: http://grrrr.org/research/software/flext
License: Other
flext – C++ development layer for Pure Data and Max
Home Page: http://grrrr.org/research/software/flext
License: Other
trying to install Flext in Mac OS Mojave I have having this error:
When I run this command in terminal bash build.sh pd gcc
/Library/Developer/CommandLineTools/usr/bin/make -f ./buildsys/gnumake-sub.mak PLATFORM=mac RTSYS=pd COMPILER=gcc BUILDPATH=./buildsys/ PKGINFO=package.txt BUILDCLASS=flext USRCONFIG=config.txt USRMAKE=build/gnumake-mac-gcc.inc TARGETMODE=release TARGETTYPE=single _build_
buildsys/mac/gnumake-gcc-targets.inc:22: warning: overriding commands for target `pd-darwin/release-single'
buildsys/mac/gnumake-gcc-targets.inc:18: warning: ignoring old commands for target `pd-darwin/release-single'
mkdir -p pd-darwin/release-single/
c++ -c -ffast-math -mmacosx-version-min=10.6 -O3 -mtune=native -DFLEXT_USE_SIMD -DNDEBUG -DFLEXT_EXPORTS -DFLEXT_SYS=2 -DPD -I/Applications/Pd-0.42-5.app/Contents/Resources/src -I/Applications/Pd-0.42-5.app/Contents/Resources/include -I/Applications/Pd-0.42-5.app/Contents/Resources/include/pd source/flext.h -o pd-darwin/release-single/flext.h.gch
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from source/flext.h:60:
In file included from source/flclass.h:18:
In file included from source/flbase.h:18:
source/flstdc.h:30:10: fatal error: 'cassert' file not found
#include <cassert>
^~~~~~~~~
1 warning and 1 error generated.
make[1]: *** [pd-darwin/release-single/flext.h.gch] Error 1
make: *** [build-release-single] Error 2
I have tried to put the flag in buildsys/mac/gnumake-gcc.in but it is not changing nothing....
CXXFLAGS += -std=libc++
##############################################
ifneq (,$(findstring Frameworks,$(FLEXTPREFIX)))
FLEXTFRAMEWORK := $(FLEXTPREFIX)/flext.framework
endif
ifdef FLEXTFRAMEWORK
ifndef FLEXTLIB
FLEXTLIB := $(FLEXTFRAMEWORK)
endif
ifndef FLEXTINC
FLEXTINC := $(FLEXTFRAMEWORK)/Headers
endif
ifndef FLEXTSYS
FLEXTSYS := $(FLEXTFRAMEWORK)/Resources
endif
else
ifndef FLEXTLIB
FLEXTLIB := $(FLEXTPREFIX)/lib
endif
ifndef FLEXTINC
FLEXTINC := $(FLEXTPREFIX)/include/flext
endif
ifndef FLEXTSYS
FLEXTSYS := $(FLEXTPREFIX)/lib/flext
endif
endif
FLEXTBIN := $(FLEXTPREFIX)/bin
##############################################
CXXFLAGS += -fvisibility-inlines-hidden
CXXFLAGS += -std=libc++
LDFLAGS += -dynamic -framework Accelerate
##############################################
ifdef DEBUG
CFLAGS += -g
LDFLAGS += -g
else
ifdef PROFILE
CFLAGS += -g
LDFLAGS += -g
else
LDFLAGS += -Wl,-S
endif
endif
##############################################
ifdef STK_INC
INCPATH += -I$(STK_INC)
endif
ifdef STK_LIB
LIBS += $(STK_LIB)
endif
##############################################
ifdef SNDOBJ_INC
INCPATH += -I$(SNDOBJ_INC)
endif
ifdef SNDOBJ_LIB
LIBS += $(SNDOBJ_LIB)
endif
##############################################
ifdef LOCKFREE
INCPATH += -I$(LOCKFREE)
endif
ifdef ATOMIC_OPS
INCPATH += -I$(ATOMIC_OPS)/src
DEFS += -DUSE_ATOMIC_OPS
endif
##############################################
LDFLAGS += $(patsubst %,-arch %,$(ARCH))
ifdef OSXSDK
CFLAGS += -isysroot $(OSXSDK)
LDFLAGS += -isysroot $(OSXSDK)
endif
My compiler version is:
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Thank you so much.
the problem is apparently, that the defsig
signal holder is float
, but should be t_float
:
Line 52 in 2f47096
Pd>=0.55 now uses static assertions to catch wrongly typed signal holders, hence the problem starts to show now.
flext should use pthreads for Pure Data and the Max threading API, nothing else.
Trying to build flext in order that I can get the py externals working on my system.
After adjusting all the file locations in config-win-max-mingw.txt I get the following:
mingw32-make -f C:/flext-master/buildsys/gnumake-sub.mak PLATFORM=win RTSYS=max COMPILER=mingw BUILDPATH=C:/flext-master/buildsys/ PKGINFO=package.txt BUILDCLASS=flext USRCONFIG=config.txt USRMAKE=build/gnumake-win-mingw.inc TARGETMODE=release TARGETTYPE=single _build_
mingw32-make[1]: Entering directory 'C:/flext-master'
mingw32-make[1]: *** No rule to make target 'max-mingw\release-single/flbase.opp', needed by 'max-mingw\release-single\libflext-max_s.LIB'. Stop.
mingw32-make[1]: Leaving directory 'C:/flext-master'
C:\flext-master\buildsys\targets.inc:62: recipe for target 'build-release-single' failed
mingw32-make: *** [build-release-single] Error 2
Here's the first part of my config file:
# where are the Max/MSP SDK header files?
# you should have the latest version!
MAXSDKPATH="C:\Program Files (x86)\Cycling '74\Max 7\resources\packages\max-sdk-7.3.3\source\c74support"
###############################################################
# where do/should the flext headers reside/be built?
FLEXTINC="C:\Program Files (x86)\Cycling '74\Max 7\flext"
# where do/should the flext static libraries reside/be built?
FLEXTLIB=$(FLEXTINC)
# where do/should the flext shared libraries reside/be built?
# (a good place is the MaxMSP program folder)
FLEXTSHLIB="C:\Program Files (x86)\Cycling '74\Max 7"
###############################################################
# where should the external be built?
# (path for temporary files)
OUTPATH=max-mingw
# where should the external be installed?
INSTPATH="C:\Program Files (x86)\Cycling '74\Max 7\externals\flext"
# where should the initialization files be installed?
INITPATH="C:\Program Files (x86)\Cycling '74\Max 7\resources\init"
# where should the help files be installed?
HELPPATH="C:\Program Files (x86)\Cycling '74\Max 7\resources\help\flext"
###############################################################
A strange error message happens with newer versions of Pd, but not with Pd 0.43.
See also http://grrrr.org/pipermail/flext/2015-January/000505.html
I would need some input concerning the situations the bug happens, and when it does not.
why is v0.5.1 a direct successor of v0.6.0?
should the tag read v0-6-1
instead?
Is dyn~ / dynext dead?
Hello.
I ran into problems using flext when compiling externals (into a library) without using FLEXT_USE_CMEM on a bela (using a xenomai linux).
I did not dig deep - but it results in a Bus Error
On a desktop linux (archlinux) it does not show this behaviour - the externals load and work fine.
Any ideas where this may come from?
Here is what I see:
</c/flext> sh build.sh pd gcc build
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f ./buildsys/gnumake-sub.mak PLATFORM=mac RTSYS=pd COMPILER=gcc BUILDPATH=./buildsys/ PKGINFO=package.txt BUILDCLASS=flext USRCONFIG=config.txt USRMAKE=build/gnumake-mac-gcc.inc TARGETMODE=release TARGETTYPE=single build
buildsys/mac/gnumake-gcc-targets.inc:22: warning: overriding commands for target pd-darwin/release-single' buildsys/mac/gnumake-gcc-targets.inc:18: warning: ignoring old commands for target
pd-darwin/release-single'
mkdir -p ./
c++ -c -I/opt/local/include -ffast-math -mmacosx-version-min=10.9 -O3 -mtune=native -I/opt/local/include -std=c++11 -fvisibility-inlines-hidden -arch i386 -DFLEXT_USE_SIMD -DNDEBUG -DFLEXT_EXPORTS -DFLEXT_SYS=2 -DPD -I pd-darwin/release-single -I/Applications/jos/Pd-0.52-2.app/Contents/Resources/src -I/Applications/jos/Pd-0.52-2.app/Contents/Resources/include -I/Applications/jos/Pd-0.52-2.app/Contents/Resources/include/pd source/flbase.cpp -o pd-darwin/release-single/flbase.opp_i386
error: unknown target CPU 'apple-a12'
note: valid target CPU values are: i386, i486, winchip-c6, winchip2, c3, i586, pentium, pentium-mmx, pentiumpro, i686, pentium2, pentium3, pentium3m, pentium-m, c3-2, yonah, pentium4, pentium4m, prescott, nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, lakemont, k6, k6-2, k6-3, athlon, athlon-tbird, athlon-xp, athlon-mp, athlon-4, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, geode
make[1]: *** [pd-darwin/release-single/flbase.opp_i386] Error 1
make: *** [build-release-single] Error 2
Is this an issue that comes from flext? chikashimiyama/Pd_leapmotion#3
this is more of a question than an issue:
when building flext as a dynamic library, you get something like libflext-pd.so
against which flext-externals link.
however, afaiu libflext-pd.so
will not be able to deal with multiple floatsizes (either it can handle Pd32 (single precision) or Pd64 (double precision); but not both).
so how should this be handled?
my naive suggestion would be:
RTE | flext dylib |
---|---|
Pd32 | libflext-pd.so |
Pd64 | libflext-pd64.so |
but maybe you have better ideas...
hi,
i'm trying to build flext for 64-bit Pd (amd64, not double precision) on Windows 10 using MSVC. since MSVC doesn't allow inline assembly on 64-bit, this fails on flsimd.cpp
and (with SIMD disabled) lockfree/cas.hpp
.
is it possible to do a 64-bit build? should i be using MinGW or Cygwin instead of MSVC?
Hi...
Since pulling the latest version of Flext master into my project, I am getting link errors:
duplicate symbol 'operator delete[](void*)' in:
/Volumes/Storage/jamie/Library/Developer/Xcode/DerivedData/ml-cegbtphjlzgqndapbzubbuwhzqli/Build/Intermediates.noindex/ml.build/Development/ml.knn pd.build/Objects-normal/x86_64/ml_base.o
/Volumes/Storage/jamie/Library/Developer/Xcode/DerivedData/ml-cegbtphjlzgqndapbzubbuwhzqli/Build/Intermediates.noindex/ml.build/Development/ml.knn pd.build/Objects-normal/x86_64/ml_regression.o
duplicate symbol 'operator new(unsigned long)' in:
/Volumes/Storage/jamie/Library/Developer/Xcode/DerivedData/ml-cegbtphjlzgqndapbzubbuwhzqli/Build/Intermediates.noindex/ml.build/Development/ml.knn pd.build/Objects-normal/x86_64/ml_base.o
/Volumes/Storage/jamie/Library/Developer/Xcode/DerivedData/ml-cegbtphjlzgqndapbzubbuwhzqli/Build/Intermediates.noindex/ml.build/Development/ml.knn pd.build/Objects-normal/x86_64/ml_regression.o
etc
I am defining FLEXT_USE_CMEM
which used to fix this (I think).
I am also using FLEXT_INLINE
and FLEXT_USESIMD
Any ideas?
followed the instructions but I'm stuck at this point:
Omars-MacBook-Pro:flext-master omar$ bash build.sh max gcc
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f ./buildsys/gnumake-sub.mak PLATFORM=mac RTSYS=max COMPILER=gcc BUILDPATH=./buildsys/ PKGINFO=package.txt BUILDCLASS=flext USRCONFIG=config.txt USRMAKE=build/gnumake-mac-gcc.inc TARGETMODE=release TARGETTYPE=single build
buildsys/mac/gnumake-gcc-targets.inc:22: warning: overriding commands for targetmax-darwin/release-single' buildsys/mac/gnumake-gcc-targets.inc:18: warning: ignoring old commands for target
max-darwin/release-single'
mkdir -p max-darwin/release-single
mkdir -p max-darwin/release-single/
c++ -c -ffast-math -mmacosx-version-min=10.6 -Os -mtune=native -DFLEXT_USE_SIMD -DNDEBUG -DFLEXT_EXPORTS -DFLEXT_SYS=1 -I/Applications/max-sdk-8.0.3/source/c74support/max-includes -I/Applications/max-sdk-8.0.3/source/c74support/jit-includes -I/Applications/max-sdk-8.0.3/source/c74support/msp-includes source/flext.h -o max-darwin/release-single/flext.h.gch
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use
the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from source/flext.h:60:
In file included from source/flclass.h:18:
In file included from source/flbase.h:18:
source/flstdc.h:30:10: fatal error: 'cassert' file not found
#include
^~~~~~~~~
1 warning and 1 error generated.
make[1]: *** [max-darwin/release-single/flext.h.gch] Error 1
make: *** [build-release-single] Error 2
can you help?
(I really want to be able to try py external!)
Version 6 and 7 of the Max-SDK contain elements (e.g. t_buffer) which are marked as C74_DEPRECATED.
Hi,
what's this error? how to fix it? it was ok with pd 0.45 but error with 0.47
ubuntu 14.04 64bit
pd 0.47
thanks,
akntk
Hello,
We are looking to writing externals for Jitter (in Max) and GEM (in Pd).
Our library is in C++, so I thought flext would be a good fit.
Questions are:
I saw some forks of this have newer material that is not in this repo so I guess there is still interest in this.
Hello.
I ran into problems using FLEXT_USE_CMEM, it result in a call-loop:
void *operator new(size_t bytes)
in flsupport.cpp calls flext_root::operator new(bytes);
which is inlined with: ::operator new(bytes);
defined in flsupport.h
which calls the global new operator again.
Not sure what the idea was about FLEXT_USE_CMEM, but this seems wrong.
It looks like neither the global new operator nor the inline new-operator is necessary?
Hi, so I'm trying to build and install flext.
at step 1.2 "Building and installing flext" I entered "bash build.sh pd gcc" into the terminal, then "buildsys/config-mac-max-gcc.txt" was created and I edited it to refer to the new Pd Vanilla's path, so all I did was, instead of Pd-042-5 including "PDPATH=/Applications/Pd-0.47-1-64bit.app/Contents/Resources"
then I tried building it again and got three errors, here's everything...
make: *** [config.txt] Error 1
Alexandres-MacBook-Pro:flext-master porres$ bash build.sh pd gcc
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f ./buildsys/gnumake-sub.mak PLATFORM=mac RTSYS=pd COMPILER=gcc BUILDPATH=./buildsys/ PKGINFO=package.txt BUILDCLASS=flext USRCONFIG=config.txt USRMAKE=build/gnumake-mac-gcc.inc TARGETMODE=release TARGETTYPE=single build
buildsys/mac/gnumake-gcc-targets.inc:22: warning: overriding commands for target pd-darwin/release-single' buildsys/mac/gnumake-gcc-targets.inc:18: warning: ignoring old commands for target
pd-darwin/release-single'
mkdir -p pd-darwin/release-single
mkdir -p pd-darwin/release-single/
c++ -c -ffast-math -mmacosx-version-min=10.6 -O3 -mtune=native -DFLEXT_USE_SIMD -DNDEBUG -DFLEXT_EXPORTS -DFLEXT_SYS=2 -DPD -I/Applications/Pd-0.47-1-64bit.app/Contents/Resources/src -I/Applications/Pd-0.47-1-64bit.app/Contents/Resources/include -I/Applications/Pd-0.47-1-64bit.app/Contents/Resources/include/pd source/flext.h -o pd-darwin/release-single/flext.h.gch
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
In file included from source/flext.h:60:
In file included from source/flclass.h:18:
In file included from source/flbase.h:19:
source/flsupport.h:130:1: warning: replacement function 'operator new' cannot be
declared 'inline' [-Winline-new-delete]
inline void *operator new(size_t bytes) NEWTHROW { return flext_root::op...
^
source/flsupport.h:131:1: warning: replacement function 'operator delete' cannot
be declared 'inline' [-Winline-new-delete]
inline void operator delete(void *blk) DELTHROW { flext_root::operator d...
^
source/flsupport.h:133:1: warning: replacement function 'operator new[]' cannot
be declared 'inline' [-Winline-new-delete]
inline void *operator new[](size_t bytes) NEWTHROW { return flext_root::...
^
source/flsupport.h:134:1: warning: replacement function 'operator delete[]'
cannot be declared 'inline' [-Winline-new-delete]
inline void operator delete[](void *blk) DELTHROW { flext_root::operato...
^
source/flsupport.h:236:53: error: assigning to 't_float' (aka 'float') from
incompatible type 't_word' (aka 'word')
Element(FLEXT_ARRAYTYPE s) { FLEXT_GETSAMPLE(el) = s; }
^ ~
source/flsupport.h:237:42: error: non-const lvalue reference to type 't_word'
(aka 'word') cannot bind to a value of unrelated type 't_float'
(aka 'float')
...operator FLEXT_ARRAYTYPE &() { return FLEXT_GETSAMPLE(el); }
^~~~~~~~~~~~~~~~~~~
source/flsupport.h:219:43: note: expanded from macro 'FLEXT_GETSAMPLE'
^~~~~~~~~~~~~
source/flsupport.h:238:47: error: no viable conversion from returned value of
type 'const t_float' (aka 'const float') to function return type 't_word'
(aka 'word')
...operator FLEXT_ARRAYTYPE () const { return FLEXT_GETSAMPLE(el); }
^~~~~~~~~~~~~~~~~~~
source/flsupport.h:219:43: note: expanded from macro 'FLEXT_GETSAMPLE'
^~~~~~~~~~~~~
/Applications/Pd-0.47-1-64bit.app/Contents/Resources/src/m_pd.h:151:15: note:
candidate constructor (the implicit copy constructor) not viable: no known
conversion from 'const t_float' (aka 'const float') to 'const word &' for
1st argument
typedef union word
^
4 warnings and 3 errors generated.
make[1]: *** [pd-darwin/release-single/flext.h.gch] Error 1
make: *** [build-release-single] Error 2
Alexandres-MacBook-Pro:flext-master porres$
I'm in the process of packaging flext for Debian (and derivatives).
However, for this to work I would need a "proper" release of flext (for me it's enough if you create a new tag)
So: is there an estimated timeline for the next flext (v0.5.1
iirc) release?
it seems that i cannot properly link against the dynamic library of flext.
My rough Makefile
(i've used make install DESTDIR=/tmp/flex
for pseudo-installing flext):
FLEXTDIR=/tmp/flex/usr/local/
CXXFLAGS=-DPD -I$(FLEXTDIR)/include/flext -I/usr/include/pd -fPIC -DPIC
LDFLAGS=-rdynamic -shared -Wl,-rpath,"\$ORIGIN",--enable-new-dtags -fPIC
LIBS=$(LDFLAGS) -L$(FLEXTDIR)/lib -lflext-pd_d
henon.pd_linux: henon.o
g++ -o $@ $< $(CXXFLAGS) $(LIBS)
henon.o: henon.cpp
g++ -o $@ -c $< $(CXXFLAGS)
this gives me a nice henon.pd_linux
.
But when I run it, it cannot be loaded with the error
./henon.pd_linux: ./henon.pd_linux: undefined symbol: _ZN17flext_base_single4InitEv
which translates to flext_base_single::Init()
not being found.
everything works fine when i link against the static version of flext -lflext-pd_s
Currently, there are still a few per-instance definitions in the tutorial examples.
when initializing automake, the foreign
option should be passed (since a number of files (e.g. README) required to be strictly GNU autotools conformant) are missing.
e.g. configure.ac:10
AM_INIT_AUTOMAKE([foreign])
this is needed to bootstrap the project with the standard autoreconf -fiv
(instead of ./bootstrap.h
which adds the --foreign
manually)
Hi,
TL;DR : I face a syntax error when building flext under windows, although I successfuly built it under OSX.
I am trying to build flext for Max 7 with msvc.
After configuring config-win-max-msvc.txt
, the second run of build max msvc build
fails as follows :
------------------------------------------------
D:\Downloads\flext-master>nmake -f "D:\Downloads\flext-master\buildsys\nmake.mak" PLATFORM=win RTSYS=max COMPILER=msvc BUILDPATH=D:\Downloads\flext-master\buildsys\
Microsoft (R) Program Maintenance Utility Version 14.12.25835.0
Copyright (C) Microsoft Corporation. Tous droits réservés.
"D:\Softwares\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\nmake.exe" /NOLOGO /f D:\Downloads\flext-master\buildsys\nmake-sub.mak PLATFORM=win RTSYS=max COMPILER=msvc BUILDPATH=D:\Downloads\flext-master\buildsys\ PKGINFO=package.txt BUILDCLASS=flext USRCONFIG=config.txt USRMAKE=build\nmake-win-msvc.inc TARGETMODE=release TARGETTYPE=single _build_
cl /c /DNDEBUG /Ox /DWINVER=0x0501 /D_WIN32_WINNT=0x501 /DWIN_VERSION /DWIN_EXT_VERSION /YXflext.h /Fpmax-msvc\release-single\precompiled.pch /LD /EHsc /GR /Oi /nologo /D_CRT_SECURE_NO_DEPRECATE /DWIN32 /D_WINDOWS /MD /DFLEXT_USE_SIMD /DFLEXT_EXPORTS /DFLEXT_SYS=1 /I"D:\Max_7\Packages\max-sdk-7.3.3\source\c74support"\max-includes /I"D:\Max_7\Packages\max-sdk-7.3.3\source\c74support"\jit-includes /I"D:\Max_7\Packages\max-sdk-7.3.3\source\c74support"\msp-includes source\flbase.cpp /Fomax-msvc\release-single\flbase.obj
cl : Ligne de commande warning D9002 : option '/YXflext.h' inconnue ignorée
flbase.cpp
d:\downloads\flext-master\source\flclass.h(1119): error C2061: erreur de syntaxe : identificateur 'Point'
NMAKE : fatal error U1077: '"D:\Softwares\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\cl.EXE"' : code retour '0x2'
Stop.
NMAKE : fatal error U1077: '"D:\Softwares\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\nmake.exe"' : code retour '0x2'
Stop.
D:\Downloads\flext-master>goto end
Sorry for that French command line tool (still cannot figure how to change its language).
So the error here is :
d:\downloads\flext-master\source\flclass.h(1119): error C2061: erreur de syntaxe : identificateur 'Point'
NMAKE : fatal error U1077:
Which translates as syntax error : indentifier 'Point'
.
Identifier 'Point is only found in flclass.h
in this bloc (ll.1115-1119) :
1115 #if FLEXT_SYS == FLEXT_SYS_MAX
1116 char **indesc,**outdesc;
1117
1118 static void cb_assist(flext_hdr *c,void *b,long msg,long arg,char *s);
1119 static void cb_click (flext_hdr *c, Point pt, short mods);
I can't find how to work around this error, since it lays in fext's source's headers...
PLUS I successfuly built flext and flext-based externals under OSX (using GCC) this week.
How can a syntax error be plateform-dependent ?
I also note the warning D9002 : unknown '/YXflext.h' option ignored
...
If anyone has any insight on this...
TS
Startup of secondary threads in flext::StartHelper (flthr.cpp) and flext_base::StartQueue (flqueue.cpp) use (non-thread-safe) static variables as flags and Sleep() calls to wait for startup. This is very unelegant and error-prone.
Misleading output of --help regarding --with options
When .configure
the package, in the help it is written that options to provide STK and SndObj headers are --with-stk
and --witch-sndobj
, however configure script doesn't recognize them.
I figured out that correct options are similar to --with-sdkdir
and need to include dir
in the end: --with-stkdir
and --with-sndobjdir
Final command that worked for me:
./configure --with-stkdir=/usr/include/stk --with-sndobjdir=/usr/include/SndObj --with-sdkdir=/usr/include/pd
Include dirs messed up
After ./configure
script succeeded and both SndObj and STK were enabled (I inspected configure.status
and Makefile
) actual compilation fails with error
flbase.cpp:31:22: fatal error: g_canvas.h: No such file or directory
that apparently means that somehow even if configure script confirmed the file exists (it actually exists, I checked), include dirs are not properly passed to the compiler.
Further investigation confirms that SndObj and STK include paths somehow overwrite instead of appending to include path given to compiler, because building flext without them succeeds.
Building via build.sh
works without problem
I'm experiencing a weird crash on OS X 10.14.1 (Mojave) with any externals built with flext.
When I try to load a (flext-based) external, the app just closes / crashes.
I don't see any log entry in the system log nor the pd console (after I restart it).
What I did:
tutorial/simple1
directory and then doing a ../../build.sh pd gcc
Is there another place where I could look for hints on why it crashes?
I'm using pd-0.49-1 and gcc -v yields:
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin```
On Yosemite, both for PD and Max builds I was getting the error:
ld: framework not found vecLib
It looks like that name has been deprecated for some time and now doesn't work any more. Just changing vecLib
to Accelerate
in buildsys/mac/gnumake-gcc.inc got me building again.
When trying to compile flext
-based externals on Github Actions/macOS, I'm getting errors like these:
/usr/local/include/flext/flsupport.h:134:34: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
void *operator new(size_t bytes) NEWTHROW;
^~~~~~~~
/usr/local/include/flext/flsupport.h:126:18: note: expanded from macro 'NEWTHROW'
#define NEWTHROW throw(std::bad_alloc)
^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/flext/flsupport.h:134:34: note: use 'noexcept(false)' instead
void *operator new(size_t bytes) NEWTHROW;
^~~~~~~~
noexcept(false)
/usr/local/include/flext/flsupport.h:126:18: note: expanded from macro 'NEWTHROW'
#define NEWTHROW throw(std::bad_alloc)
^
When I comment a few things out in source/flsupport.h
(lines 126 and 127):
#define NEWTHROW /*throw(std::bad_alloc)*/
#define DELTHROW /*throw()*/
... those errors are gone, but instead of them there are some warnings:
source/flsupport.h:134:7: warning: 'operator new' is missing exception specification 'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void *operator new(size_t bytes) NEWTHROW;
^
throw(std::bad_alloc)
/Applications/Xcode_11.5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:186:66: note: previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC;
Despite those warnings, the externals are successfully created: https://github.com/mgeier/ssr/actions/runs/136504305
I don't know whether they actually work as expected, though, because I don't have a Mac to test them.
I have no idea what's the right course of action is here, I just wanted to report my experiences ...
On Linux (GCC) everything works fine, BTW.
The should not be supported, due to the lack of maintenance possibilities.
I'm encountering a problem with the pointers to the inputs/outputs.
For some reason, when I create a 2-in-2-out object, the first input and the second output point to the same buffer/address.
Is this a bug? Or is my assumption flawed? Or did I do something strange in the instantiation?
My system: Puredata vanilla 0.49-1, OS X 10.14.1, Apple LLVM version 10.0.0 (clang-1000.11.45.5
)
This simple external should enable you to reproduce the issue:
#include "flext.h"
#include <cassert>
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
#error You need at least flext version 0.4.1
#endif
class TestObject : public flext_dsp
{
FLEXT_HEADER(TestObject, flext_dsp)
public:
TestObject()
{
AddInSignal("audio in 1");
AddInSignal("audio in 2");
AddOutSignal("audio out 1");
AddOutSignal("audio out 2");
}
protected:
virtual void m_signal(int n, float *const *in, float *const *out) override;
};
FLEXT_NEW_DSP("TestObject~", TestObject)
void TestObject::m_signal(int n, float *const *in, float *const *out)
{
// Inputs and outputs should not point to the same memory!
assert(in[0] != out[0]);
assert(in[0] != out[0]);
assert(in[0] != out[1]); // assertion triggers here!
assert(in[0] != out[1]);
assert(in[1] != out[0]);
assert(in[1] != out[0]);
assert(in[1] != out[1]);
assert(in[1] != out[1]);
// talk-through
while (n--)
{
out[0][n] = in[0][n];
out[1][n] = in[1][n];
}
}
it would be great to have a @[email protected]
file (or similar), that outputs the proper CFLAGS
and LIBS
for dynamically linking with flext on @System@.
e.g.
$ pkg-config --cflags pd-flext
-I/usr/local/include/flext -DPD -DFLEXT_SHARED
$ pkg-config --libs pd-flext
-lflext-pd
lower priority: pkg-config also has a --static
flags that outputs flags for static linking:
$ pkg-config --static --cflags pd-flext
-I/usr/local/include/flext -DPD
$ pkg-config --static --libs pd-flext
-lflext-pd_s
Hi
Been experimenting with Pd_leapmotion (based on flext) for some time and recent Mac OS updates seem to crash with this. Thought I'd build the flext code and investigate. simple1 example crashes in exactly the same way - huge stream of warnings from mach_o_image_reader.cc (see attached text) when creating the simple1 object.
Using Pd-l2ork.
Any help appreciated.
David
these links are broken
for Windows (http://synthesisters.com/pluggo3/downloadMaxWinSDK.php)
for OSX (http://www.synthesisters.com/sdk/max.php)
here's where it seems to live now https://cycling74.com/downloads/sdk
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.