Re: compiling gcc 2.95.3 under ubuntu 10.04.2, x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hello Andrew,

Thank you very much for your help. Just to clarify, absolutely, I'm not an expert in building from source but I don't really need to be one. What I need a build of gcc 2.95 on my machine for is compiling some really old code and recording performance metrics (i.e., build times). I don't intend to use the resulting binaries, but I can't use a more modern build of gcc as it would need massive code to compile such old projects.

I ran into a problem with mock & rpm and I was wondering if you could help. I posted this on the rpm mailing list but if you could shed some light on this it'd be appreciated. The error message from mock prompting to update rpm appears immediately even before I build the shell - when initializing a chroot with "mock -r fedora-17-i386 --init".

###
I'm trying to build rpm from source to use with mock (1.1.22), which with my current build complains that:
***
ERROR You need to update rpm to handle:
rpmlib(PayloadIsXz) <= 5.2-1 is needed by coreutils-8.15-6.fc17.i686
--snip--
rpmlib(X-CheckUnifiedSystemdir) is needed by filesystem-3-2.fc17.i686
--snip--
***
I'm trying to build the latest version, 4.9.1.2, using the following configure/make commands:

./configure --prefix=/usr --enable-sqlite3 --enable-python --with-cap --with-acl --with-lua --with-dmalloc CPPFLAGS="`pkg-config --cflags nss` -I/path/to/lua/src" LDFLAGS="-L/path/to/lua/src -llua -lm" LUA_CFLAGS="-I/path/to/lua/src" LUA_LIBS="-L/path/to/lua/src"
make

This should enable just about everything in my rpm build. CPPFLAGS are set to find NSPR & NSS headers; /path/to/lua contains a build of lua-5.1.5 with an additional shared library liblua.so target (that's what -llua in LDFLAGS is for). All the other flags ensure I use my 5.1.5 lua build.
This still produces a build with the following rpmlib's. Here's part of the output of ./rpm --showrc:
***
   rpmlib(BuiltinLuaScripts) = 4.2.2-1
   rpmlib(CompressedFileNames) = 3.0.4-1
   rpmlib(ConcurrentAccess) = 4.1-1
   rpmlib(ExplicitPackageProvide) = 4.0-1
   rpmlib(FileCaps) = 4.6.1-1
   rpmlib(FileDigests) = 4.6.0-1
   rpmlib(HeaderLoadSortsTags) = 4.0.1-1
   rpmlib(PartialHardlinkSets) = 4.0.4-1
   rpmlib(PayloadFilesHavePrefix) = 4.0-1
   rpmlib(PayloadIsBzip2) = 3.0.5-1
   rpmlib(ScriptletExpansion) = 4.9.0-1
   rpmlib(ScriptletInterpreterArgs) = 4.0.3-1
   rpmlib(VersionedDependencies) = 3.0.3-1
***
So BuiltinLuaScripts & FileCaps are now present - the 4.7.2 build I had on my system was lacking those too, but I'm still not seeing PayloadIsXz & X-CheckUnifiedSystemdir.
What can I do to enable those rpmlib's? Any help would be greatly appreciated.
###

Regards,
Roman.

On Tue, 10 Apr 2012 10:27:45 +0100, Andrew Haley <aph at redhat dot com> wrote:
> On 04/05/2012 05:03 PM, Roman Suvorov wrote:
> 
> > Hi Andrew, this is great news! Could you provide exact instructions
> > on how you got this to work though? As you can tell I'm pretty new
> > to building from source, especially an old version of GCC.
> 
> I think that a person who is not used to building large projects from
> source perhaps shouldn't even try to build 2.95.  It takes an expert,
> and an expert would not use such an old compiler but would fix the
> source code of the program he's trying to compile.  But if you insist I
> will give a little help.  But please allow me to be straight with you:
> I think that what you are doing is wrong, and you should not now be
> using gcc 2.95 for anything.
> 
> > I assumed you meant using "mock" (
> http://linux.die.net/man/1/mock
> )
> > to aid in building and to emulate a 32-bit machine.
> 
> Yes, that's the right too.
> 
> > Version 0.97-3 of mock provided with Ubuntu 10's apt-get has a bug
> > (
> https://bugs.launchpad.net/ubuntu/+source/mock/+bug/600564
> ) and I
> > used 1.1.22 instead, trying to build gcc using something like this:
> > 
> > mock -r fedora-17-i386 --resultdir=/path/to/home/dir/mock/ /path/to/home/dir/c32-gcc-2.95.3-lx.rpm
> 
> I used the gcc source tarball.  I used "mock -r fedora-17-i386 shell"
> to get me a shell and I then configured and built gcc with
> 
> <dir>/gcc-2.95.3/configure --enable-languages=c++ --disable-docs
> make
> 
> I had to install a ton of dependencies for gcc.  Mock will install the
> right ones for you if you try to build the gcc RPM.
> 
> Andrew.



[Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

Add to Google