Fedora Linux Support Community & Resources Center
  #1  
Old 11th April 2010, 02:40 PM
Piscium Offline
Registered User
 
Join Date: Dec 2009
Location: Dublin,Ireland
Posts: 101
linuxfedorafirefox
gcc build issue

Hiya,

I would like to build gcc, but I have hit a snag. Please see below the error in blue:

[root@dell-d3000 SRPMS]# yum-builddep gcc-4.4.3-4.fc12.src.rpm
Loaded plugins: presto, refresh-packagekit
Getting requirements for gcc-4.4.3-4.fc12.src
--> Already installed : binutils-2.19.51.0.14-37.fc12.i686
--> glibc-static-2.11.1-4.i686
--> Already installed : zlib-devel-1.2.3-23.fc12.i686
--> Already installed : gettext-0.17-16.fc12.i686
--> 1:dejagnu-1.4.4-17.fc12.noarch
--> Already installed : bison-2.4.1-4.fc12.i686
--> Already installed : flex-2.5.35-7.fc12.i686
--> Already installed : texinfo-4.13a-9.fc12.i686
--> sharutils-4.7-5.fc12.i686
--> Already installed : gdb-7.0.1-43.fc12.i686
--> 1:ecj-3.4.2-7.fc12.i686
--> Already installed : zip-2.31-8.fc12.i686
--> Already installed : unzip-5.52-12.fc12.i686
--> gcc-java-4.4.3-4.fc12.i686
--> Already installed : libgcj-4.4.3-4.fc12.i686
--> Already installed : glibc-devel-2.11.1-4.i686
--> elfutils-devel-0.145-1.fc12.i686
--> Already installed : glibc-2.11.1-4.i686
--> Already installed : glibc-2.11.1-4.i686
--> Already installed : glibc-devel-2.11.1-4.i686
Error: No Package found for /lib64/libc.so.6

Any ideas on how to get the library?

I am running F12 32 bits. I am not sure why it depends on a 64 bit library (cross-compiling, maybe?).
Reply With Quote
  #2  
Old 13th April 2010, 07:20 AM
Piscium Offline
Registered User
 
Join Date: Dec 2009
Location: Dublin,Ireland
Posts: 101
linuxfedorafirefox
Re: gcc build issue

Does anyone know if this would be considered a bug? If it is a bug I could file a bug report and see what happens.
Reply With Quote
  #3  
Old 13th April 2010, 08:37 AM
JEO Offline
Registered User
 
Join Date: Jan 2006
Posts: 2,769
linuxfedorafirefox
Re: gcc build issue

I imagine that library is only needed if you want to build gcc for the x86_64 platform. I don't see any options for the yum-builddep command so recommend you download the dependencies from the .spec file manually using yum. Alternatively you could try something like yum install glibc-2.11.1-4.x86_64 glibc-devel-2.11.1-4.x86_64, then redo the yum-builddep command.

Last edited by JEO; 13th April 2010 at 08:44 AM.
Reply With Quote
  #4  
Old 14th April 2010, 11:55 PM
Piscium Offline
Registered User
 
Join Date: Dec 2009
Location: Dublin,Ireland
Posts: 101
linuxfedorafirefox
Re: gcc build issue

Thanks, Jeo.

I tried to install the x86_64 packages. That did not work, the packages were not found.

Next I did a manual install of the packages recognized by yum-builddep as not yet installed (dejagnu, ecj, etc).

Then while doing a rpmbuild I found out that there were still more packages needed that had not been mentioned by yum-builddep:
ppl-devel cloog-ppl-devel graphviz gmp-devel mpfr-devel

I also installed those.

To deal with the 64 bit glibc library, I commented out line 8 in gcc.spec:
%global multilib_64_archs sparc64 ppc64 s390x x86_64

With that I was able to successfully build gcc.

I did a quick test and to compile and link a set of two c++ files and 3 c files, the time was reduced by about 23% (9.31" to 7.18") with my freshly built compiler and libraries.

However it took hours to build gcc. This was mainly due to thousands of compiler tests that are done during the build, plus the fact that my pc is old. 22 packages are created during the build (not including debug info).

Anyway, it was an interesting exercise, and I have a faster compiler and libraries, at least until a new version comes down from Fedora updates!

Last edited by Piscium; 15th April 2010 at 06:55 PM.
Reply With Quote
  #5  
Old 15th April 2010, 01:29 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
linuxfedorafirefox
Re: gcc build issue

Quote:
Originally Posted by Piscium View Post
Thanks, Jeo.

I tried to install the x86_64 packages. That did not work, the packages were not found.

Next I did a manual install of the packages recognized by yum-builddep as not yet installed (dejagnu, ecj, etc).

Then while doing a rpmbuild I found out that there were still more packages needed that had not been mentioned by yum-builddep:
ppl-devel cloog-ppl-devel graphviz gmp-devel mpfr-devel

I also installed those.

To deal with the 64 bit glibc library, I commented out line 8 in gcc.spec:
%global multilib_64_archs sparc64 ppc64 s390x x86_64

With that I was able to successfully build gcc.

I did a quick test and to compile and link a set of two c++ files and 3 c files, the time was reduced by about 23% (9.31" to 7.18") with my freshly built compiler and libraries.

However it took hours to build gcc. This was mainly due to thousands of compiler tests that ae done during the build, plus the fact that my pc is old. 22 packages are created during the build (not including debug info).

Anyway, it was an interesting exercise, and I have a faster compiler at least until a new version comes down from Fedora updates!

The second compile could be quicker due to ccache if installed
Code:
[root@localhost leigh]# yum info ccache
Loaded plugins: langpacks, presto, refresh-packagekit, remove-with-leaves, show-
              : leaves
Adding en_GB to language list
Installed Packages
Name       : ccache
Arch       : x86_64
Version    : 2.4
Release    : 17.fc13
Size       : 86 k
Repo       : installed
From repo  : fedora
Summary    : C/C++ compiler cache
URL        : http://ccache.samba.org/
License    : GPLv2+
Description: ccache is a compiler cache.  It acts as a caching pre-processor to
           : C/C++ compilers, using the -E compiler switch and a hash to detect
           : when a compilation can be satisfied from cache.  This often results
           : in a 5 to 10 times speedup in common compilations.

[root@localhost leigh]#

Try deleting the cache between compiles

i.e
Code:
rm -rf  ~/.ccache/*
Reply With Quote
  #6  
Old 15th April 2010, 09:18 PM
Piscium Offline
Registered User
 
Join Date: Dec 2009
Location: Dublin,Ireland
Posts: 101
linuxfedorafirefox
Re: gcc build issue

Hi Leigh,

I don't have ccache installed. I had not even heard of it until I read your post. How does it help you?

It is not clear to me how it could speed compilation if makefiles are correctly crafted, as in such case only files that need to be compiled will be so.

Obviously neither make (nor I assume ccache) would be able to detect for example a change in comments or whitespace, so there will be always some unnecessary compilation.

I can see however how ccache could save compile time in case there are several users compiling the same files, or if make clean is used and then files are recompiled.

And yes, my little benchmark is completely unscientific and generally useless, however the particular set of files I used are those of a new project I am starting as a hobby, so those are the files I am most interested as I compile them often!

Last edited by Piscium; 15th April 2010 at 10:36 PM. Reason: clarification
Reply With Quote
Reply

Tags
build, gcc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubled by PCSX-df. Not sure if this is a gaming issue or a security issue. Replicant10000 Gamers' Lounge 0 11th October 2009 08:08 AM
That RPM-Build issue Waggoneer Alpha, Beta & Snapshots Discussions (Fedora 11 Only) 11 31st March 2009 05:15 AM
Possible compiz-fusion issue or general system issue darko28 Using Fedora 9 14th March 2008 06:31 PM
Cannot install Module::Build without Module::Build hackman989 Using Fedora 2 14th July 2006 02:58 PM


Current GMT-time: 18:23 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat