Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error: recompile with -fPIC #18

Closed
gamer-cndg opened this issue Oct 13, 2017 · 1 comment
Closed

Compilation error: recompile with -fPIC #18

gamer-cndg opened this issue Oct 13, 2017 · 1 comment

Comments

@gamer-cndg
Copy link

I have configured a SD card for local storage, installed gcc, make, git, git-http, libcurl, ca-certificates, ca-bundle, python-dev then cloned this repo and executed make. Error is as follows:

root@Omega-17FD:~/i2c-exp-driver# make
CC: gcc
CFLAGS: -g
LDFLAGS:
LIB:
 gcc -g  -I include -I/usr/include/python2.7 -c -o build/lib/onion-debug.o src/lib/onion-debug.c
 Compiling lib/liboniondebug.so
gcc -shared -o lib/liboniondebug.so  build/lib/onion-debug.o
/usr/bin/ld: build/lib/onion-debug.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not be used when making a shared object; recompile with -fPIC
build/lib/onion-debug.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [makefile:117: lib/liboniondebug.so] Error 1

If you change the makefile line from

CFLAGS := -g # -Wall

to

CFLAGS := -g -fPIC # -Wall

it works. Just thought I'd let you know about this issue.

@greenbreakfast
Copy link
Contributor

Fixed now! Thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants