[PD] compiling external in linux

Jaime Oliver jaime.oliver2 at gmail.com
Thu Oct 4 19:41:36 CEST 2012


dear all,

I am trying to compile a pd external in ubuntu 12.04 and get:

joliver at crystal:~/watercolor/tracks$ make tracks.pd_linux
cc -DPD -O2 -funroll-loops -fomit-frame-pointer -Wall -W -Wshadow
-Wstrict-prototypes -Werror -Wno-unused -Wno-parentheses -Wno-switch
-I../../src -o tracks.o -c tracks.c
ld -shared -o tracks.pd_linux tracks.o -lc -lm
ld: tracks.o: relocation R_X86_64_32 against `.rodata.str1.8' can not
be used when making a shared object; recompile with -fPIC
tracks.o: could not read symbols: Bad value
make: *** [tracks.pd_linux] Error 1

I have the following in my makefile (with -fPIC and all...):

# ----------------------- LINUX i386 -----------------------

.SUFFIXES: .pd_linux

LINUXCFLAGS =  -DPD  -O2 -funroll-loops -fomit-frame-pointer \
    -Wall -W -Wshadow -Wstrict-prototypes -Werror \
    -Wno-unused -Wno-parentheses -Wno-switch -fPIC

LINUXINCLUDE =  -I../../src

.c.pd_linux:
	cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
	ld  -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
	strip --strip-unneeded $*.pd_linux
	rm $*.o

What could I be missing?

best,

J



More information about the Pd-list mailing list