{"id":49,"date":"2005-09-07T00:07:59","date_gmt":"2005-09-07T04:07:59","guid":{"rendered":"http:\/\/benjamin.smedbergs.us\/blog\/?p=49"},"modified":"2005-09-07T14:22:35","modified_gmt":"2005-09-07T18:22:35","slug":"building-gcc-on-fc4","status":"publish","type":"post","link":"https:\/\/benjamin.smedbergs.us\/blog\/2005-09-07\/building-gcc-on-fc4\/","title":{"rendered":"Building GCC on FC4"},"content":{"rendered":"<p>This week Mozilla bought be a brand-spankin-new uber-powerful computer. I&#8217;m still getting to love it&#8217;s wonderfulness. I rearranged my machines so that the new machine (dual Athlon64, 4gig RAM) is running WinXP, my former Windows machine (Athlon64, 1gig RAM) is running FC4 (x64_64), and I&#8217;m going to retire my rather ancient Athlon1.2gig box which is running RH9.<\/p>\n<p>The new Fedora Core has been giving me fits. First of all I couldn&#8217;t get the DVD image burned until the fifth try, for unknown reasons. Then the anaconda installer didn&#8217;t like some combination of custom install options I gave it. I finally broke down and told it to do a default &#8220;Workstation&#8221; install, and it finally installed.<\/p>\n<p>Next, I tried to get both of my video cards to work in this machine. No dice. If I set the AGP card as the primary card in CMOS, I can&#8217;t get the secondary (PCI) card to display anything at all. If I set the PCI card as primary, I can get it to show up the first restart, but after that it doesn&#8217;t work again. Funnily, occasionally the boot sequence tells me that it found new hardware, please enter my root password. But I can never seem to enter it correctly&#8230;<\/p>\n<p>Now, I&#8217;m running into the GCC 4.0 bug where hidden-visibility symbols are not compiled correctly, leading to the following error:<br \/>\n \/usr\/bin\/ld: jsapi.o: relocation R_X86_64_PC32 against `memset@@GLIBC_2.2.5&#8242; can not be used when making a shared object; recompile with -fPIC<br \/>\nShaver said that this bug was fixed on the gcc4.0.x cvs, so I tried to build GCC from CVS. I can&#8217;t. I try the following configure steps:<\/p>\n<pre>CFLAGS=&quot;-m64&quot; ..\/4.0.1-branch\/configure --prefix=\/builds\/gcc\/4.0.1-branch-installed --enable-languages=c,c++ --host=x86_64-redhat-linux --enable-shared --enable-__cxa_atexit --with-system-zlib<\/pre>\n<p>Compilation fails after a while with the following error:<\/p>\n<pre>.\/xgcc -B.\/ -B\/builds\/gcc\/4.0.1-branch-installed\/x86_64-redhat-linux\/bin\/ -isystem \/builds\/gcc\/4.0.1-branch-installed\/x86_64-redhat-linux\/include -isystem \/builds\/gcc\/4.0.1-branch-installed\/x86_64-redhat-linux\/sys-include -L\/builds\/gcc\/4.0.1-branch-objdir\/gcc\/..\/ld -O2 -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem .\/include  -I. -I32 -I..\/..\/4.0.1-branch\/gcc -I..\/..\/4.0.1-branch\/gcc\/32 -I..\/..\/4.0.1-branch\/gcc\/..\/include -I..\/..\/4.0.1-branch\/gcc\/..\/libcpp\/include  -m32 -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \\\r\n   -c ..\/..\/4.0.1-branch\/gcc\/crtstuff.c -DCRT_BEGIN \\\r\n  -o 32\/crtbegin.o\r\nIn file included from \/usr\/include\/features.h:337,\r\n                 from \/usr\/include\/stdio.h:28,\r\n                 from ..\/..\/4.0.1-branch\/gcc\/tsystem.h:90,\r\n                 from ..\/..\/4.0.1-branch\/gcc\/crtstuff.c:64:\r\n\/usr\/include\/gnu\/stubs.h:7:27: error: gnu\/stubs-32.h: No such file or directory<\/pre>\n<p>Does anyone know why, when I configured explicitly with -m64, it is still compiling with -m32 and looking for the 32-bit headers (which do not exist on this system)?<\/p>\n<h5>Update: 7-Sep-2005:<\/h5>\n<p>A helpful soul (pinskia) on irc.oftc.net\/#gcc told me to use &#8211;disable-multilib and I seem to be in business. I would still like to figure out what I would need to install to get multilib working. Obviously redhat has multilib.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week Mozilla bought be a brand-spankin-new uber-powerful computer. I&#8217;m still getting to love it&#8217;s wonderfulness. I rearranged my machines so that the new machine (dual Athlon64, 4gig RAM) is running WinXP, my former Windows machine (Athlon64, 1gig RAM) is running FC4 (x64_64), and I&#8217;m going to retire my rather ancient Athlon1.2gig box which is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-mozilla"],"_links":{"self":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":0,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"wp:attachment":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}