On Sat, 25 Jul 2020, Jonathan Wakely wrote:
On Sat, 25 Jul 2020 at 22:40, SAIFI <saifi@xxxxxxxxx> wrote:
On Sat, 25 Jul 2020, Jonathan Wakely wrote:
On Sat, 25 Jul 2020 at 05:18, SAIFI <saifi@xxxxxxxxx> wrote:
Hi:
is Automake 1.15.1 a hard requirement to build GCC 'master' ?
No. Like the error says, you only need it if you modify the makefile
templates or other configuration files.
If the build is trying to use automake, it suggests you've touched
those files so that the timestamps make them look like they've been
modified.
There's a script you can use to update timestamps of generated files
so they no logner appear to be out of date. In the GCC source tree run
'contrib/gcc_update --touch'
That should allow you to build without needing automake.
Hi Jonathan:
Thanks for your reply.
Perhaps the following details may help
you evaluate if i am missing something
and point that out.
The timestamps make it appear that generated files are out of date.
0. the intent is do a 'out-of-source'
build
1. directory structure is
${HOME}/src/gcc
${HOME}/work/build/gcc
2. cd ${HOME}/src/gcc
git clone https://gcc.gnu.org/git/gcc.git
Do:
cd gcc
contrib/gcc_update --touch
3. cd ${HOME}/work/build/gcc
../../../src/gcc/configure \
--prefix=${HOME}/root/gcc \
--enable-languages=c,c++ \
--disable-multilib \
--disable-werror \
--with-gnu-ld \
--enable-gcov \
--enable-__cxa_atexit \
--enable-threads=posix \
--enable-tls \
--enable-bootstrap \
--enable-maintainer-mode \
Why are you using this option? If you use that then the build system
will try to regenerate files, and you'll need the exact version of
automake, not newer, not older. If you're not a GCC developer, you
have no reason to use that option. If you don't want to install the
exact version of automake (and autoconf) needed for GCC development,
don't use the option that says you are a GCC developer.
Less importantly, why are you using --enable-__cxa_atexit
--enable-threads=posix --enable-tls --enable-bootstrap? They are all
redundant, because those are the defaults anyway. They won't hurt, but
they're not necessary.
--enable-default-pie
4. The build system error'd out with the
following message.
If you use 'contrib/gcc_update --touch' and stop using maintainer-mode
then you should no longer get that error.
make[3]: Entering directory
'/home/strikr/work/build/gcc/build-x86_64-pc-linux-gnu/fixincludes'
cd ../../../../../src/gcc/fixincludes ;
/bin/sh ./genfixes
./genfixes: line 61: autogen: command
not found
AutoGen appears to be out of date or not
correctly installed.
Please download and install from:
https://ftp.gnu.org/gnu/autogen/
make[3]: *** [Makefile:132:
../../../../../src/gcc/fixincludes/fixincl.x]
Error 1
make[3]: Leaving directory
'/home/strikr/work/build/gcc/build-x86_64-pc-linux-gnu/fixincludes'
make[2]: *** [Makefile:2879:
all-build-fixincludes] Error 2
make[2]: Leaving directory
'/home/strikr/work/build/gcc'
make[1]: *** [Makefile:23439:
stage1-bubble] Error 2
make[1]: Leaving directory
'/home/strikr/work/build/gcc'
make: *** [Makefile:999: all] Error 2
5. installed 'autogen'
That should not be necessary.
6. clean up the generated files and dir
in the 'build' directory ie.
${HOME}work/build/gcc
7. execute 'configure' script again and
now the 'automake' related error is
seen.
8. since i suspected that some files may
have changed or new ones may have got
created,
cd ${HOME}/src/gcc
git status
There don't seem to be any files whose
time stamps have changed or new ones
that got created.
git status won't tell you anything about timestamps, it doesn't care about them.
Next, step in verification was to
ensure that all the steps are
performed on the 'master' branch.
9. in relation to the upstream gcc repo,
i only do git pulls as there are no
local changes.
$ git config --list
pull.rebase=true
Thanks for reading this far. What could
i be missing here ?
You didn't try the 'contrib/gcc_update --touch' command that I suggested.
Hi Jonathan:
With the points you mentioned, i could
successfully build GCC 'master'.
Here is the summary of the discussion
thread so far:
0. if '--enable-maintainer-mode' option
is passed to gcc configure script, the
specific version of 'automake' and
'autoconf' is a hard dependency.
1. the following options are enabled by
default
--enable-__cxa_atexit
--enable-threads=posix
--enable-tls
--enable-bootstrap
2. as part of the 'configure' step, the
timestamp of certain build related files
is changed.
to fix this, run the command inside
gcc src tree
cd gcc
contrib/gcc_update --touch
Thanks for your time.
warm regards
Saifi.