[flext] flext newbie has build problems on osx
Hannes Breitschädel
hannes-b at gmx.at
Tue Jun 21 15:17:12 CEST 2011
Compiling now worked, there is still a linker issue.
I learned the following things I am glad to share with the flext community.
Tips on builing flext on OSX for newbies:
1) it is possible to drag and drop folders from finder into the terminal window. I it is also possible to drag them into a text file. Safes a lot of time entering long paths!!
2) command + T clears terminal output window.
3) I had to define some paths for the compiler:
UFLAGS += -I/usr/include/c++/4.2.1
UFLAGS += -I/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/include
UFLAGS += -I/usr/include/c++/4.2.1/i686-apple-darwin10
UFLAGS += -I/usr/include
4) I changed the flext source file "flutil.cpp" completely:
removed: #include <Carbon/Carbon.h>
and reduced the following two functions to
void flext::CopyMem(void *dst,const void *src,int bytes)
{
memmove(dst,src,bytes);
}
void flext::ZeroMem(void *dst,int bytes)
{
memset(dst,0,bytes);
}
5) /usr on osx is hidden and spotlight does not search there.
to display hidden files in finder type:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
to do the reverse:
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
6) to search within hidden paths:
select the hidden folder in finder,
type command + F
enter search name
AND select the hidden folder (usually to the right of "This Mac")
now compilation works. The linker throws this error:
ld: library not found for -ldylib1.o
details:
g++ -mmacosx-version-min=10.4 -dynamiclib -flat_namespace -undefined suppress -dynamic -framework vecLib -Wl,-S -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -install_name /usr/local/lib/libflext-pd.dylib -current_version 0.5.2 -compatibility_version 0.5 -preload -seg1addr 0xd0000000 -L/Users/Hannes/flext_test/Pd-0.42.app/Contents/Resources/bin -o pd-darwin/release-shared/libflext-pd.0.5.2.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
-----
additionally here is the content of config-mac-pd-gcc.txt
# where is the PD installation including source code?
# (this should point to the main folder, which has a "src" subfolder)
PDPATH=/Users/Hannes/flext_test/Pd-0.42.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.4
UFLAGS += -I/usr/include/c++/4.2.1
UFLAGS += -I/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/include
UFLAGS += -I/usr/include/c++/4.2.1/i686-apple-darwin10
UFLAGS += -I/usr/include
# user defined linker flags
LDFLAGS += -mmacosx-version-min=10.4
# user defined optimization flags
#OFLAGS += -O2 # -ftree-vectorize
# user defined debugging flags
DFLAGS +=
# architecture-specific flags (optional)
#UFLAGS_ppc += -mcpu=G4 -faltivec
OFLAGS_ppc +=
DFLAGS_ppc +=
#UFLAGS_i386 += -mmmx -msse -msse2 -msse3 -mtune=nocona
OFLAGS_i386 +=
DFLAGS_i386 +=
# cross-compilation (optional)
ARCH=i386
#x86_64 ppc64
# SDK for 10.4
OSXSDK=/Developer/SDKs/MacOSX10.4u.sdk
THANKS!
Hannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20110621/572d6470/attachment.htm>
More information about the flext
mailing list