non-PIC code in main.cpp #191

issue XVilka opened this issue on May 2, 2011
  1. XVilka commented at 8:44 PM on May 2, 2011: none

    I'm using hardened gentoo. and when i'm trying to compile bitcoin with its toolchain, i can see this error:

    g++ -c -I/usr/include/db4.8 -DFOURWAYSSE2 -DUSE_SSL -DUSE_UPNP=1 -DNOPCH -Wno-invalid-offsetof -Wformat -O2 -march=core2 -mfpmath=sse -mmmx -msse -msse2 -mssse3 -pipe -I/usr/lib/wx/include/gtk2-unicode-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -DGUI -o obj/rpc.o rpc.cpp main.cpp: In function 'void CallCPUID(int, int&, int&)': main.cpp:3160:6: error: PIC register clobbered by '%ebx' in 'asm' main.cpp: In function 'bool Detect128BitSSE2()': main.cpp:3160:6: error: PIC register clobbered by '%ebx' in 'asm' main.cpp:3160:6: error: PIC register clobbered by '%ebx' in 'asm' make: *** [obj/main.o] Error 1

    If i'm adding -fno-pic option, it compiles successfully, but show segmenation fault when starting.

    Here is additional info: http://paste.pocoo.org/show/381464 and http://paste.pocoo.org/show/381465

    For information, how-to fix this issue see http://hardened.gentoo.org/pic-fix-guide.xml

  2. XVilka commented at 9:48 PM on May 2, 2011: none

    proposed patch is http://dpaste.org/OwYT/

  3. bitphage commented at 11:11 AM on May 4, 2011: none

    I've tried to compile bitcoin with your patch applied, but got an error

    g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -fPIC -I/usr/lib/wx/include/gtk2-unicode-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -DGUI -o obj/main.o main.cpp main.cpp: In function 'void CallCPUID(int, int&, int&)': main.cpp:3162:6: error: PIC register '%ebx' clobbered in 'asm' make: *** [obj/main.o] Error 1 make: *** Waiting for unfinished jobs....

  4. laanwj commented at 6:34 PM on December 3, 2011: member

    Detect128BitSSE2 and CallCPUID have been removed from the bitcoin source, closing this issue

  5. laanwj closed this on Dec 3, 2011

  6. sipa referenced this in commit 9d09322b41 on Mar 27, 2015
  7. TheBlueMatt referenced this in commit 582b2934e6 on Oct 20, 2015
  8. ptschip referenced this in commit fd8885abed on Dec 29, 2016
  9. deadalnix referenced this in commit a9f350d309 on Jan 19, 2017
  10. classesjack referenced this in commit 5d0227b8b0 on Jan 2, 2018
  11. hebasto referenced this in commit e638acf697 on Jun 7, 2021
  12. rajarshimaitra referenced this in commit ee3164c398 on Aug 5, 2021
  13. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me