grrrr/flext

Problem installing flext

PRamoneda opened this issue · 3 comments

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.

grrrr commented

Hi, please set your MacOS version in the buildsys/config-mac-pd-gcc.txt file in UFLAGS and LDFLAGS to -mmacosx-version-min=10.9.
I hope this helps!

HI!!! Thank you so much for answering.

My buildsys/config-mac-pd-gcc.txt is:

# where is the PD installation including source code?
# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder)
PDPATH=/Applications/Pd-0.50-2.app/Contents/Resources

# where is the PD executable?
PDBIN=$(PDPATH)/bin/pd

###############################################################

# prefix for flext installation
# headers are in $(FLEXTPREFIX)/include/flext
# libraries are in $(FLEXTPREFIX)/lib
# build system is in $(FLEXTPREFIX)/lib/flext

FLEXTPREFIX=/usr/local

###############################################################

# where should the external be built?
OUTPATH=pd-darwin

# where should the external be installed?
INSTPATH=$(PDPATH)/extra

###############################################################

# STK (synthesis tool kit) support
# http://ccrma.stanford.edu/software/stk

# where to find the STK header files (e.g. stk.h)
#STK_INC=/usr/local/include/stk

# where to find the STK library (normally libstk.a)
# (comment out STK_LIB if you don't use STK)
#STK_LIB=/usr/local/lib/libstk.a

###############################################################

# SndObj support
# http://music.nuim.ie//musictec/SndObj

# where to find the SndObj header files (e.g. sndobj.h)
#SNDOBJ_INC=/usr/local/include/sndobj

# where to find the SndObj library (normally libsndobj.a)
# (comment out SNDOBJ_LIB if you don't use SndObj)
#SNDOBJ_LIB=/usr/local/lib/libsndobj.a

###############################################################

# make flags (e.g. use multiprocessor)
MFLAGS=-j 2

# user defined compiler flags
UFLAGS += -ffast-math -mmacosx-version-min=10.9 # -march=native

# user defined linker flags
LDFLAGS += -mmacosx-version-min=10.9

# user defined optimization flags
OFLAGS += -O3 -mtune=native

# user defined debugging flags
DFLAGS +=

# architecture-specific flags (optional)
UFLAGS_ppc += -faltivec
OFLAGS_ppc +=
DFLAGS_ppc +=

UFLAGS_i386 +=
OFLAGS_i386 +=
DFLAGS_i386 +=

UFLAGS_x86_64 +=
OFLAGS_x86_64 += 
DFLAGS_x86_64 +=

# cross-compilation (optional)
ARCH=i386 x86_64 # ppc ppc64

# SDK for 10.9
#OSXSDK=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk

I have this error now :

4 warnings generated.
lipo pd-darwin/release-shared/flmap.opp_i386 pd-darwin/release-shared/flmap.opp_x86_64 -create -output pd-darwin/release-shared/flmap.opp
c++ -mmacosx-version-min=10.9 -dynamiclib -flat_namespace -undefined suppress -dynamic -framework Accelerate -Wl,-S -arch i386 -arch x86_64 -install_name /usr/local/lib/libflext-pd.dylib -current_version 0.6.1 -compatibility_version 0.6 -preload -seg1addr 0xd0000000 -L/Applications/Pd-0.50-2.app/Contents/Resources/bin -o pd-darwin/release-shared/libflext-pd.0.6.1.dylib   pd-darwin/release-shared/flbase.opp pd-darwin/release-shared/flext.opp pd-darwin/release-shared/flbuf.opp pd-darwin/release-shared/fldsp.opp pd-darwin/release-shared/fllib.opp pd-darwin/release-shared/flxlet.opp pd-darwin/release-shared/flattr.opp pd-darwin/release-shared/flattr_ed.opp pd-darwin/release-shared/flsupport.opp pd-darwin/release-shared/flutil.opp pd-darwin/release-shared/flatom.opp pd-darwin/release-shared/flatom_pr.opp pd-darwin/release-shared/flthr.opp pd-darwin/release-shared/fltimer.opp pd-darwin/release-shared/flsimd.opp pd-darwin/release-shared/flout.opp pd-darwin/release-shared/flatom_part.opp pd-darwin/release-shared/flitem.opp pd-darwin/release-shared/flmeth.opp pd-darwin/release-shared/flmsg.opp pd-darwin/release-shared/flproxy.opp pd-darwin/release-shared/flqueue.opp pd-darwin/release-shared/flbind.opp pd-darwin/release-shared/flmap.opp  
clang: warning: argument unused during compilation: '-preload' [-Wunused-command-line-argument]
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks//Accelerate.framework/Accelerate.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks//Accelerate.framework/Accelerate.tbd (2 slices)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libc++.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libc++.tbd
ifndef STRIP
make[1]: ifndef: No such file or directory
make[1]: *** [pd-darwin/release-shared/libflext-pd.0.6.1.dylib] Error 1
rm pd-darwin/release-shared/flxlet.opp_i386 pd-darwin/release-shared/flext.opp_x86_64 pd-darwin/release-shared/flbase.opp_i386 pd-darwin/release-shared/flmeth.opp_i386 pd-darwin/release-shared/flattr.opp_i386 pd-darwin/release-shared/flattr_ed.opp_x86_64 pd-darwin/release-shared/fldsp.opp_x86_64 pd-darwin/release-shared/flsimd.opp_i386 pd-darwin/release-shared/flthr.opp_i386 pd-darwin/release-shared/flbind.opp_i386 pd-darwin/release-shared/flatom.opp_x86_64 pd-darwin/release-shared/flatom_part.opp_i386 pd-darwin/release-shared/flutil.opp_i386 pd-darwin/release-shared/flmsg.opp_i386 pd-darwin/release-shared/flbuf.opp_x86_64 pd-darwin/release-shared/flitem.opp_i386 pd-darwin/release-shared/flproxy.opp_x86_64 pd-darwin/release-shared/flproxy.opp_i386 pd-darwin/release-shared/flout.opp_i386 pd-darwin/release-shared/flmap.opp_i386 pd-darwin/release-shared/flsupport.opp_x86_64 pd-darwin/release-shared/flatom_pr.opp_i386 pd-darwin/release-shared/flattr.opp_x86_64 pd-darwin/release-shared/fllib.opp_i386 pd-darwin/release-shared/flxlet.opp_x86_64 pd-darwin/release-shared/flbase.opp_x86_64 pd-darwin/release-shared/flmeth.opp_x86_64 pd-darwin/release-shared/fltimer.opp_i386 pd-darwin/release-shared/flext.opp_i386 pd-darwin/release-shared/flsimd.opp_x86_64 pd-darwin/release-shared/flatom_part.opp_x86_64 pd-darwin/release-shared/flattr_ed.opp_i386 pd-darwin/release-shared/flthr.opp_x86_64 pd-darwin/release-shared/fldsp.opp_i386 pd-darwin/release-shared/flbind.opp_x86_64 pd-darwin/release-shared/flutil.opp_x86_64 pd-darwin/release-shared/flqueue.opp_x86_64 pd-darwin/release-shared/flmsg.opp_x86_64 pd-darwin/release-shared/flatom_pr.opp_x86_64 pd-darwin/release-shared/flitem.opp_x86_64 pd-darwin/release-shared/flatom.opp_i386 pd-darwin/release-shared/flout.opp_x86_64 pd-darwin/release-shared/flmap.opp_x86_64 pd-darwin/release-shared/flbuf.opp_i386 pd-darwin/release-shared/fllib.opp_x86_64 pd-darwin/release-shared/flsupport.opp_i386 pd-darwin/release-shared/flqueue.opp_i386 pd-darwin/release-shared/fltimer.opp_x86_64
make: *** [build-release-shared] Error 2

Thank you so much!!

ok i have compiled with sudo and now seems to be working!!!!
Thank you so much @grrrr !!!