PDA

View Full Version : Solution for compile gcc-4.1.2, makeinfo (error)


HEKTOR
03-06-2011, 02:39 PM
Hi!

I want to describe how to install gcc-4.1.2 to write plug-ins for maya2011-x64 (I do this on ubuntu 10.04). First of all this simple tutorial is for people who have this funny error, when they run:
make -j bootstrap:

…....
make[3]: Entering directory `/home/kamcio/devkit/gcc-4.1.2/gcc-build/fastjar'
(echo "@set version-GCC 4.1.2"; \
if [ "" = "experimental" ]; \
then echo "@set DEVELOPMENT"; \
else echo "@clear DEVELOPMENT"; \
fi) > gcc-vers.texiT
mv -f gcc-vers.texiT gcc-vers.texi
restore=: && backupdir=".am$$" && \
rm -rf $backupdir && mkdir $backupdir && \
for f in fastjar.info fastjar.info-[0-9] fastjar.info-[0-9][0-9] fastjar.i[0-9] fastjar.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
done; \
if /home/kamcio/devkit/gcc-4.1.2/missing makeinfo --split-size=5000000 --split-size=5000000 -I ../../fastjar/../gcc/doc/include -I ../../fastjar \
-o fastjar.info `test -f 'fastjar.texi' || echo '../../fastjar/'`fastjar.texi; \
then \
rc=0; \
else \
rc=$?; \
$restore $backupdir/* `echo "./fastjar.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[3]: *** [fastjar.info] Error 1
make[3]: Leaving directory `/home/kamcio/devkit/gcc-4.1.2/gcc-build/fastjar'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/kamcio/devkit/gcc-4.1.2/gcc-build/fastjar'
make[1]: *** [all-fastjar] Error 2
make[1]: Leaving directory `/home/kamcio/devkit/gcc-4.1.2/gcc-build'
make: *** [all] Error 2

or for persons who never do this and they want compile plug-ins under linux.

So lets start...
In the documentation for maya we can read how do this:

Download the latest errata of RHEL 4 WS U4 and the gcc 4.1.2 source tar file from http://gcc.gnu.org/install/
Platform Maya builds on: RHEL 4 WS with latest errata updates
% uname -a
Linux lnx-maya2011 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux
binutils-2.15.92.0.2-21
Setup directories:
% mkdir gcc412
% cd gcc412
% mkdir gcc-build
Extract the source files:
% tar zxvf gcc-4.1.2.tar.gz
Configure the compiler:
% cd gcc-build
Run the following all on 1 line:
../gcc-4.1.2/configure --prefix=/opt/gcc412 --program-suffix=412
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --disable-libunwind-exceptions
--enable-__cxa_atexit

Build the compiler:
% make -j 2 bootstrap
Install compiler as root:
% su root
% make install
Note: you can make a symlink in /usr/bin to make the call to gcc easier for the
user:
% cd /usr/bin
% ln -s /opt/gcc412/bin/gcc412 .
% ln -s /opt/gcc412/bin/g++412 .

But in my case it doesn't work... We need little changes...

Be sure you have newer version of makeinfo than 4.1 (makeinfo –version)
if don't have it, just install it by: sudo apt-get install texinfo

1. Download gcc-4.1.2.tar.gz.
2. Extract it (tar -xvzf gcc-4.1.2.tar.gz)
3. % cd gcc-4.1.2
4. % mkdir gcc-build
5. % cd gcc-build

Now we will be running configure, but before we do this, we need to export CFLAGS environment variable:

6. % export CFLAGS=-m64

Now we run configure by typing:

7. % ../configure --prefix=/opt/gcc412 --program-suffix=412 --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-__cxa_atexit -disable-multilib

Now run make -j bootstrap

8. % make -j bootstrap

Now you should have this error:
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[3]: *** [fastjar.info] Error 1
make[3]: Leaving directory `/home/kamcio/devkit/gcc-4.1.2/gcc-build/fastjar'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/kamcio/devkit/gcc-4.1.2/gcc-build/fastjar'
make[1]: *** [all-fastjar] Error 2
make[1]: Leaving directory `/home/kamcio/devkit/gcc-4.1.2/gcc-build'
make: *** [all] Error 2

I know it is sound crazy, but we are on good road :-)

Now we need type:
9. % cp ../fastjar/fastjar.info fastjar/fastjar.info
10. % cp ../fastjar/fastjar.texi fastjar/fastjar.texi

Do make and install ('make' take some time, so when you run it, go and make tea)
11. % make -j bootstrap
12. % sudo make install

And at last do soft links:
% cd /usr/bin
% sudo ln -s /opt/gcc412/bin/gcc412
% sudo ln -s /opt/gcc412/bin/g++412


That's all, I have hope does it help.

Maybe there was the similar thread on forum, please delete this one, I search information on Internet how to fix this, but I could not find any good solution.
So I put this.

Best Regards!
Sorry for my English!

CGTalk Moderation
03-06-2011, 02:39 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.