🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #309455

Re: Projekty w CMake i Buck - jak połączyć?

#309455
From: Borneq
Date: Mon, 02 Oct 2017 15:29
31 lines
1860 bytes
W dniu 02.10.2017 o 15:10, Borneq pisze:
> Jak skompilować glibc z PIE? kompilowałem go, ale ma ustawienia 
> standardowe.

Jedno rozwiązane: to projekt główny należy kompilować z PIE (co robię) a 
poza tym linkować z '-pie' co rozwiązuje,
ale jeszcze inny błąd:
/usr/bin/ld: 
/usr/src/hbase/hbase-native-client/otherlibs/libzmq.a(zmq.cpp.o): 
relocation R_X86_64_32 against `_ZSt7nothrow' can not be used when 
making a shared object; recompile with -fPIC
/usr/src/hbase/hbase-native-client/otherlibs/libzmq.a: error adding 
symbols: Bad value
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)

chyba nie trzeba kompilować ZMQ z PIC bo nie przyłączam dynamicznie, jest:
I have
prebuilt_cxx_library(
name="zmq",
lib_dir='../otherlibs'
)

gdzie w otherlibs jest 1.8 MB libzmq.a.

zmieniłem na :
prebuilt_cxx_library(
name="zmq",
static_lib='otherlibs/libzmq.a'
)
ale nadal to samo
Technical Details
Message-ID: <oqtm11$apo$1@node1.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <oqtds6$31k$1@node1.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: Borneq <borneq@antyspam.hidden.pl>
Newsgroups: pl.comp.lang.c
Subject: Re: Projekty w CMake i Buck - jak
 połączyć?
Date: Mon, 2 Oct 2017 17:29:38 +0200
Organization: ATMAN - ATM S.A.
Lines: 31
Message-ID: <oqtm11$apo$1@node1.news.atman.pl>
References: <oqtds6$31k$1@node1.news.atman.pl>
NNTP-Posting-Host: public-gprs361946.centertel.pl
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1506958177 11064 37.47.45.27 (2 Oct 2017 15:29:37 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Mon, 2 Oct 2017 15:29:37 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
In-Reply-To: <oqtds6$31k$1@node1.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit