gm2
[Top][All Lists]
Advanced

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

Re: A beginner's question


From: Rudolf Schubert
Subject: Re: A beginner's question
Date: Sat, 8 Apr 2023 12:29:53 +0200 (CEST)

Hi Gaius,

I tried to follow your hints as closely as possible but in the very end
when I try to compile a simple test program I get a very simalar error
message than I got previously:

/usr/bin/ld: /tmp/cciW0QG5.o: in function `_M2_link':
port_test_gm2.mod:(.text+0x16d5): undefined reference to `_M2_wraptime_ctor'
collect2: error: ld returned 1 exit status

'Previously' means: as mentioned, I followed the instructions at

https://www.nongnu.org/gm2/12/development.html

and managed to build a gm2 in some local installation directory on my
Arch Linux system. But when using this I got this error message:

/usr/bin/ld: /tmp/cc0s2CjZ.o: warning: relocation against `_M2_wraptime_ctor' 
in read-only section `.text'
/usr/bin/ld: /tmp/cc0s2CjZ.o: in function `_M2_link':
port_test_gm2.mod:(.text+0x1a03): undefined reference to `_M2_wraptime_ctor'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE

BTW, was it to be expected that the

make m2/stage2/cc1gm2

in your script just did nothing because I got the message that
there was no rule in the Makefile?

The difference between my two installations is:

the latter is on my Arch Linux and the former is on Debian sid. It seems that
on both platforms there is some basic problem so that linking does not work.
The warning on my Arch Linux does indicate that this is something with 'PIE'.

Perhaps I've also missed some configuration steps or something? So my question
would be:

Whats steps exactly will I have to do in order to get a running gm2 from
the gcc sources at git://gcc.gnu.org/git/gcc.git? Do you also use Debian sid
or a different version? Will I need some special prerequisites? BTW, I'm
using the 4 packages mpfr, mpc, isl, gmp from my system and did not download
these into the gcc tree. I hope this would not make the difference?

BR

Rudolf

--
Rudolf Schubert                 \
Kirchstr. 18a                    \  mailto:rudolf@muc.de
82054 Sauerlach                   > http://www.dose.muc.de
Deutschland                      /
Tel. 08104/908311               /


On Fri, 7 Apr 2023, Gaius Mulley wrote:

> Rudolf Schubert <rudolf@muc.de> writes:
> 
> Hi Rudolf and Benjamin,
> 
> > My 'real' problems go a bit 'deeper' but before I wanted to go in too
> > much detail I first wanted to make sure I'm really using the latest
> > version of GM2. I don't want to bore peeple with old stuff which is
> > not relevant any more;-)
> 
> the latest gm2 in source form is available via:
> 
>   $ git clone git://gcc.gnu.org/git/gcc.git
> 
> note that GCC-13 is about to be released (somewhere within 0-3 weeks).
> However gm2-13 is significantly different to gm2-12 (linking options and
> many bug fixes).  The RTExceptions bug for example was fixed around 6
> weeks ago iirc in GCC-13.
> 
> On a Debian system (if I need a fast build then) I build it with the
> script included at the end.  Please read and adapt - it will remove the
> $HOME/opt directory - and probably do other bad things - but the
> configure arguments should be useful at least :-)
> 
> regards,
> Gaius
> 
> 
> 
> 
> #!/bin/bash
> 
> GCC=none
> MAXCPU=$(nproc)
> REGEN_CONFIGURE=0
> 
> REPRODIR=gcc-read-write
> 
> PROFILE=
> LANGUAGES=m2
> 
> # INSTALLDIR=opt-lto
> INSTALLDIR=opt
> MAKEFLAGS=
> # MAKEFLAGS=profiledbootstrap-lean
> # CONFIGFLAGS=--with-build-config=bootstrap-lto-lean
> 
> 
> if [ $# -gt 1 ]; then
>    CONFIGFLAGS=$1
>    shift
>    echo "configure with ${CONFIGFLAGS}"
>    echo "press enter to confirm"
>    read ans
> fi
> 
> if [ $# -eq 0 ]; then
>    CPUS="-j ${MAXCPU}"
> else
>    CPUS="-j $*"
> fi
> 
> 
> pushd $HOME/opt && rm -rf bin  include  lib  lib32  lib64  libexec  share && 
> popd
> 
> echo "download prereq"
> pushd ${REPRODIR}
> ./contrib/download_prerequisites
> popd
> 
> if [ ${REGEN_CONFIGURE} -eq 1 ] ; then
>     echo "regenerating configuring files"
>     chmod 755 rebuild-autofiles
>     if ! ./rebuild-autofiles ${REPRODIR} ; then
>       echo "failed to reconfigure"
>       exit 1
>     fi
>     echo "after reconfigure"
> else
>     echo "not regenerating configuring files"
> fi
> 
> rm -rf build ; mkdir build ; cd build ; CFLAGS="-O0 -g" CXXFLAGS="-O0 -g" 
> ../gcc-read-write/configure \
>                                           --enable-languages=${LANGUAGES} \
>                                           --enable-multilib  
> --enable-checking \
>                                           --disable-bootstrap \
>                                           ${CONFIGFLAGS} \
>                                           --prefix=$HOME/opt
> if make ${CPUS} ${MAKEFLAGS} ; then
>     cd gcc 
>     if make m2/stage2/cc1gm2 ; then
>         echo "built stage2 as well with full debugging"
>     else
>         echo "failed to build m2/stage2/cc1gm2"
>         exit 1
>     fi
>     cd ..
>     make check-m2 ${CPUS}
>     make install
> else
>     echo "make failed"
> fi
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]