-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Description
| Bugzilla Link | 9603 |
| Resolution | FIXED |
| Resolved on | Apr 01, 2011 18:12 |
| Version | trunk |
| OS | Linux |
| CC | @oscarfv |
Extended Description
Hi, when I compiled dragonegg on 64-bit version of Linux I got:
Linking dragonegg.so
/usr/bin/ld: cache.o: relocation R_X86_64_32 against `ggc_free' can not be used when making a shared object; recompile with -fPIC
cache.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
I wonder if anyone can replicate the issue.
In my case, adding -fPIC to both CLFAGS ans CXXFLAGS fixed the problem.
Index: Makefile
--- Makefile (revision 128542)
+++ Makefile (working copy)
@@ -21,6 +21,11 @@
CFLAGS+=$(COMMON_FLAGS)
CXXFLAGS+=$(COMMON_FLAGS)
+ifeq ($(shell uname -m),x86_64)
+CFLAGS+=-fPIC
+CXXFLAGS+=-fPIC
+endif
+
ifeq ($(shell uname),Darwin)
LOADABLE_MODULE_OPTIONS=-bundle -undefined dynamic_lookup
else
Cheers,
Ryuta