i tried to install lpeg from source:
gcc -Wall -Wextra -pedantic -Waggregate-return -Wbad-function-cast
-Wcast-align -Wcast-qual -Wdeclaration-after-statement
-Wdisabled-optimization -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef
-Wwrite-strings -O2 -DNDEBUG -ansi -I/usr/include/lua5.1/ -c -o lpeg.o
lpeg.c
env gcc -shared -fpic lpeg.o -o lpeg.so
/usr/bin/ld: lpeg.o: relocation R_X86_64_32S against `.rodata' can not be
used when making a shared object; recompile with -fPIC
lpeg.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [lpeg.so] Error 1
i think its cause of using implicit rules in makefile when compiling .c to
.o, missing -fpic, what is used instead when
generating .so from .o (there it is not neccessary ?!)
gcc -fpic -c x.c -o x.o
gcc -shared -o x.so x.o