Closed badboy closed 13 years ago
executing make in the latest checkout:
make
gcc -c -g -O3 -Wall -Werror -Isrc -Irender -c -o src/markdown.o src/markdown.c gcc -c -g -O3 -Wall -Werror -Isrc -Irender -c -o src/array.o src/array.c gcc -c -g -O3 -Wall -Werror -Isrc -Irender -c -o src/buffer.o src/buffer.c gcc -g -O3 -Wall -Werror -shared -Wl src/markdown.o src/array.o src/buffer.o -o libupskirt.so.1 /usr/bin/ld: src/markdown.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC src/markdown.o: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [libupskirt.so.1] Error 1
adding -fPIC to the Makefile produces:
-fPIC
gcc -c -g -O3 -Wall -Werror -Isrc -Irender -fPIC -c -o src/markdown.o src/markdown.c gcc -c -g -O3 -Wall -Werror -Isrc -Irender -fPIC -c -o src/array.o src/array.c gcc -c -g -O3 -Wall -Werror -Isrc -Irender -fPIC -c -o src/buffer.o src/buffer.c gcc -g -O3 -Wall -Werror -shared -Wl src/markdown.o src/array.o src/buffer.o -o libupskirt.so.1 ln -f -s libupskirt.so.1 libupskirt.so gcc -c -g -O3 -Wall -Werror -Isrc -Irender -fPIC -c -o examples/upskirt.o examples/upskirt.c gcc -c -g -O3 -Wall -Werror -Isrc -Irender -fPIC -c -o render/xhtml.o render/xhtml.c cc1: warnings being treated as errors render/xhtml.c: In function 'ups_toc_renderer': render/xhtml.c:711:2: error: implicit declaration of function 'memcpy' render/xhtml.c:711:2: error: incompatible implicit declaration of built-in function 'memcpy' render/xhtml.c: In function 'ups_xhtml_renderer': render/xhtml.c:754:2: error: incompatible implicit declaration of built-in function 'memcpy' make: *** [render/xhtml.o] Error 1
adding #include <string.h> to render/xhtml.c, running make again and it builds fine.
#include <string.h>
render/xhtml.c
running gcc v4.5.2 on arch linux (64bit)
Thanks, fixed!
executing
make
in the latest checkout:adding
-fPIC
to the Makefile produces:adding
#include <string.h>
torender/xhtml.c
, runningmake
again and it builds fine.running gcc v4.5.2 on arch linux (64bit)