akrennmair / newsbeuter

Newsbeuter is an open-source RSS/Atom feed reader for text terminals.
http://www.newsbeuter.org/
MIT License
780 stars 100 forks source link

/usr/bin/ld: newsbeuter.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC #214

Closed The-Compiler closed 9 years ago

The-Compiler commented 9 years ago

Trying to build the git repo on Archlinux:

g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Wall -Wextra -Wunreachable-code -DLO
CALEDIR=\"/usr/local/share/locale\" -I/usr/include/libxml2 -I/usr/include/json-c -D_GNU_SOURCE -DHAVE_OPENSSL=1 -march=x86-64 -mtune=generic -O2 -pipe -fstack
-protector-strong -o newsbeuter newsbeuter.o src/cache.o src/htmlrenderer.o src/urlreader.o src/logger.o src/view.o src/controller.o src/reloadthread.o src/ta
gsouppullparser.o src/downloadthread.o src/rss.o src/rss_parser.o src/formaction.o src/feedlist_formaction.o src/itemlist_formaction.o src/itemview_formaction
.o src/help_formaction.o src/filebrowser_formaction.o src/urlview_formaction.o src/select_formaction.o src/history.o src/filtercontainer.o src/listformatter.o
 src/regexmanager.o src/dialogs_formaction.o src/ttrss_api.o src/ttrss_urlreader.o src/newsblur_api.o src/newsblur_urlreader.o src/markreadthread.o src/oldrea
der_urlreader.o src/oldreader_api.o src/feedhq_api.o src/feedhq_urlreader.o -lbeuter -lfilter -lpthread -lrsspp -Wl,-O1,--sort-common,--as-needed,-z,relro -L.
 -fprofile-arcs -ftest-coverage -Wl,-O1,--sort-common,--as-needed,-z,relro -lsqlite3 -lcurl -lxml2 -lstfl -ljson-c -lncursesw -lcrypto
/usr/bin/ld: newsbeuter.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
newsbeuter.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:76: recipe for target 'newsbeuter' failed
The-Compiler commented 9 years ago

Huh, I just deleted everything and rebuilt and it works. I must've had some old files lying around or so... Sorry for the noise!