Is the ebuild able to detect this ? from qt/bitcoin.cpp:9: /usr/include/qt5/QtCore/qglobal.h:1067:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)." # error "You must build your code with position independent code if Qt was bui ^ Makefile:5532: recipe for target 'qt/qt_litecoin_qt-bitcoin.o' failed make[2]: *** [qt/qt_litecoin_qt-bitcoin.o] Error 1 $ cat ./info.txt ----------------------------------------------------------------- This is an unstable amd64 chroot image (named amd64-hardened-unstable_20151227-130600) at a hardened host acting as a tinderbox. ----------------------------------------------------------------- Portage 2.2.26 (python 3.4.3-final-0, hardened/linux/amd64, gcc-5.3.0, glibc-2.22-r1, 4.3.3-hardened-r3 x86_64) ================================================================= System uname: Linux-4.3.3-hardened-r3-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2 KiB Mem: 16164680 total, 2211372 free KiB Swap: 16777212 total, 16717080 free Timestamp of repository gentoo: Sun, 03 Jan 2016 05:22:20 +0000 sh bash 4.3_p42 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 ccache version 3.2.4 [disabled] app-shells/bash: 4.3_p42::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.22.1::gentoo dev-lang/python: 2.7.11-r1::gentoo, 3.3.5-r7::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo dev-util/ccache: 3.2.4::gentoo dev-util/cmake: 3.4.1::gentoo dev-util/pkgconfig: 0.29::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.19.1::gentoo sys-apps/sandbox: 2.10-r1::gentoo sys-devel/autoconf: 2.69-r1::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo, 5.3.0::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.22-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage/ priority: 1 local location: /usr/local/portage masters: gentoo priority: 2 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/tomoyo/conf /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/var/tmp/distfiles" EMERGE_DEFAULT_OPTS="--verbose-conflicts --deep --color=n --nospinner --tree --quiet-build --accept-properties=-interactive --accept-restrict=-fetch" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://mirror.netcologne.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gor.bytemark.co.uk/gentoo/ rsync://ftp.snt.utwente.nl/gentoo" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="acl amd64 avx2 berkdb btrfs bzip2 cgi cgoups clang cli cracklib crypt custom-cflags custom-optimization cxx dnssec dri dvb dvd egl eglfs fpm ftp gd gdbm git gnutls gudev hardened hpn iconv icu imap ipv6 isag jpeg justify libkms libvirtd mmx mmxext modules multilib mysql ncurses nls nptl nss objc opencv openmp pam pax_kernel pcre pcre16 pie plasma policykit pulseaudio python qemu qml qt3support qt5 readline scrypt sddm seccomp semantic-desktop session smartcard sockets sql sse sse2 sse4 sse4_1 ssl ssp ssse3 system-sqlite tcl tcpd ufed unicode urandom usb vaapi vorbis xattr xinetd xkb xml xmlreader xscreensaver xslt xtpax xvfb xz zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Created attachment 421760 [details] emerge-history.txt
Created attachment 421762 [details] environment
Created attachment 421764 [details] net-p2p:litecoin-qt-0.10.2.2-r2:20160103-091107.log
I'm not hitting this with gcc-4.9 You can try adding append-flags -fPIC to the ebuild else I'll have to hack the build system to make sure the right flag gets in there. Also note, your bug reminded me that I had fix some assembly so the package has changed slightly. You may want to run the tinderbox again.
I tried it , but run into same issue : $ ls -l etc/portage/env/fpic -rw-r--r-- 1 root root 42 Jan 3 22:57 etc/portage/env/fpic $ cat etc/portage/env/fpic CFLAGS="$CFLAGS -fPIC" CXXFLAGS="$CFLAGS" $ grep fPIC var/log/portage/net-p2p:litecoin-qt-0.10.2.2-r3:20160103-215937.log checking for x86_64-pc-linux-gnu-gcc option to produce PIC... -fPIC -DPIC checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes checking for x86_64-pc-linux-gnu-g++ option to produce PIC... -fPIC -DPIC checking if x86_64-pc-linux-gnu-g++ PIC flag -fPIC -DPIC works... yes configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--disable-dependency-tracking' '--disable-silent-rules' '--libdir=/usr/lib64' '--enable-wallet' '--disable-ccache' '--disable-static' '--disable-tests' '--with-system-leveldb' '--with-system-libsecp256k1' '--without-libs' '--without-utils' '--without-daemon' '--with-gui=qt5' '--without-qtdbus' '--with-qrencode' '--without-miniupnpc' '--disable-upnp-default' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CXXFLAGS=-march=native -O2 -pipe -fPIC' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CFLAGS=-march=native -O2 -pipe -fPIC' 'PKG_CONFIG_PATH=/usr/lib64/pkgconfig' '--disable-shared' '--with-pic' --cache-file=/dev/null --srcdir=. checking for x86_64-pc-linux-gnu-gcc option to produce PIC... -fPIC -DPIC checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../src/config -I. -I./obj -pthread -I/usr/include -I./secp256k1/include -I/usr/include/db4.8/ -I./qt -I./qt -I./qt/forms -I./qt/forms -I/usr/include/qt5/QtNetwork -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5 -pthread -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -march=native -O2 -pipe -fPIC -Wstack-protector -fstack-protector-all -fPIE -fvisibility=hidden -c -o qt/qt_litecoin_qt-bitcoin.o `test -f 'qt/bitcoin.cpp' || echo './'`qt/bitcoin.cpp /usr/include/qt5/QtCore/qglobal.h:1067:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."
litecoin-qt-0.10.2.2-r3 is also affected. I can compile it adding the '-fPIC' flag to the CXXFLAGS variable of these two files: /var/tmp/portage/net-p2p/litecoin-qt-0.10.2.2-r3/work/litecoin-0.10.2.2/Makefile /var/tmp/portage/net-p2p/litecoin-qt-0.10.2.2-r3/work/litecoin-0.10.2.2/src/Makefile cheers~
(In reply to Joan Ibanez from comment #6) > litecoin-qt-0.10.2.2-r3 is also affected. > I can compile it adding the '-fPIC' flag to the CXXFLAGS variable of these > two files: > > /var/tmp/portage/net-p2p/litecoin-qt-0.10.2.2-r3/work/litecoin-0.10.2.2/ > Makefile > /var/tmp/portage/net-p2p/litecoin-qt-0.10.2.2-r3/work/litecoin-0.10.2.2/src/ > Makefile > > cheers~ it might be that the package is not repsecting CFLAGS/CXXFLAGS.
(In reply to Anthony Basile from comment #7) > (In reply to Joan Ibanez from comment #6) > > litecoin-qt-0.10.2.2-r3 is also affected. > > I can compile it adding the '-fPIC' flag to the CXXFLAGS variable of these > > two files: > > > > /var/tmp/portage/net-p2p/litecoin-qt-0.10.2.2-r3/work/litecoin-0.10.2.2/ > > Makefile > > /var/tmp/portage/net-p2p/litecoin-qt-0.10.2.2-r3/work/litecoin-0.10.2.2/src/ > > Makefile > > > > cheers~ > > it might be that the package is not repsecting CFLAGS/CXXFLAGS. the reason i'm hesitating to commit this is because i can't seem to hit the issue. can you give me some more information aa to why your hitting it and i'm not?
(In reply to Anthony Basile from comment #8) > (In reply to Anthony Basile from comment #7) > > (In reply to Joan Ibanez from comment #6) > > > litecoin-qt-0.10.2.2-r3 is also affected. > > > I can compile it adding the '-fPIC' flag to the CXXFLAGS variable of these > > > two files: > > > > > > /var/tmp/portage/net-p2p/litecoin-qt-0.10.2.2-r3/work/litecoin-0.10.2.2/ > > > Makefile > > > /var/tmp/portage/net-p2p/litecoin-qt-0.10.2.2-r3/work/litecoin-0.10.2.2/src/ > > > Makefile > > > > > > cheers~ > > > > it might be that the package is not repsecting CFLAGS/CXXFLAGS. > > the reason i'm hesitating to commit this is because i can't seem to hit the > issue. can you give me some more information aa to why your hitting it and > i'm not? Well, like Troalf, I'm also using gcc-5.3.0. I tried to test build with gcc-4.9.3 but got this error: 'configure: error: No working boost sleep implementation found.' I guess its because boost is compiled with gcc-5.3.0. I don't have the time for more testing now, but I think its a gcc-5.3.0 thing.
(In reply to Joan Ibanez from comment #9) > Well, like Troalf, I'm also using gcc-5.3.0. > I tried to test build with gcc-4.9.3 but got this error: > 'configure: error: No working boost sleep implementation found.' I guess its > because boost is compiled with gcc-5.3.0. > I don't have the time for more testing now, but I think its a gcc-5.3.0 > thing. well comment #5 suggested that its not due to gcc-5.3.0. let me set up a system to check.
(In reply to Anthony Basile from comment #10) > (In reply to Joan Ibanez from comment #9) > > > Well, like Troalf, I'm also using gcc-5.3.0. > well comment #5 suggested that its not due to gcc-5.3.0. let me set up a > system to check. this is not due to gcc-5.3.0. steps to reproduce: 1. download stage3-amd64-20160421.tar.bz2 and set up a chroot 2. emerge gcc-5.3.0 + unmerge 4.9.3, make sure you properly switch compilers 3. add USE=-bindist to make.conf and update 4. emerge litecoind the original bug is about -qt, so I'm trying that now.
(In reply to Anthony Basile from comment #11) > (In reply to Anthony Basile from comment #10) > > (In reply to Joan Ibanez from comment #9) > > > > > Well, like Troalf, I'm also using gcc-5.3.0. > > > well comment #5 suggested that its not due to gcc-5.3.0. let me set up a > > system to check. > > this is not due to gcc-5.3.0. steps to reproduce: > > 1. download stage3-amd64-20160421.tar.bz2 and set up a chroot > 2. emerge gcc-5.3.0 + unmerge 4.9.3, make sure you properly switch compilers > 3. add USE=-bindist to make.conf and update > 4. emerge litecoind > > the original bug is about -qt, so I'm trying that now. i was not able to hit this with litecoin-qt either.
With the current version, -fPIC is automatically added by the configure script, if not already present and supported.
(In reply to Marc Popp from comment #13) > With the current version, -fPIC is automatically added by the configure > script, if not already present and supported. what version is that? and should we remove the older versions?
commit 6bbd55da6087816620dec3f1a6b9c5737db43d38 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: Mon Aug 14 21:54:52 2017 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: Mon Aug 14 22:00:06 2017 net-p2p/litecoin-qt: Remove last-rited pkg, #595452