Re: Issues building gcc natively on mipsel

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

 



Hi Jonathan,

Thank you for the directions to the correct list, I hadn't posted to the
gcc mailing lists in a while so I had forgotten which is which.

Back to the issue at hand:

Letting gcc fetch and build the correct gmp, mpfr and mpc moves the crash
to a different file form the libstdc++ set:

libtool: compile:  /home/blu/proj/gcc_build/./gcc/xgcc -shared-libgcc
-B/home/blu/proj/gcc_build/./gcc -nostdinc++
-L/home/blu/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/src
-L/home/blu/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/src/.libs
-L/home/blu/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/libsupc++/.libs
-B/usr/local/mipsel-linux-gnu/bin/ -B/usr/local/mipsel-linux-gnu/lib/
-isystem /usr/local/mipsel-linux-gnu/include -isystem
/usr/local/mipsel-linux-gnu/sys-include
-I/home/blu/proj/gcc-7.3.0/libstdc++-v3/../libgcc
-I/home/blu/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/mipsel-linux-gnu
-I/home/blu/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include
-I/home/blu/proj/gcc-7.3.0/libstdc++-v3/libsupc++ -std=gnu++11
-D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings
-Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections
-fdata-sections -frandom-seed=cxx11-hash_tr1.lo -g -O2 -D_GNU_SOURCE
-minterlink-mips16 -c
/home/blu/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/c++11/cxx11-hash_tr1.cc
-fPIC -DPIC -D_GLIBCXX_SHARED -o cxx11-hash_tr1.o
In file included from
/home/blu/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/c++11/cow-shim_facets.cc:35:0:
/home/blu/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:
In member function 'const std::locale::facet*
std::locale::facet::_M_cow_shim(const std::locale::id*) const':
/home/blu/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:344:52:
internal compiler error: Illegal instruction
  moneypunct_shim(const facet* f, __cache_type* c = new __cache_type)
                                                    ^~~~~~~~~~~~~~~~
0x15c9913 crash_signal
    /home/blu/proj/gcc_build/../gcc-7.3.0/gcc/toplev.c:337
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Makefile:558: recipe for target 'cow-shim_facets.lo' failed
make[6]: *** [cow-shim_facets.lo] Error 1

Best regards,
Martin

On Tue, 31 Jul 2018 at 11:37, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:

> On Tue, 31 Jul 2018 at 07:25, martin krastev <blu.dark@xxxxxxxxx> wrote:
> >
> > Hello,
> >
> > I'm trying to build gcc-7.3.0 (md5 747d5010b7c6938b480bc6e4d7c4be9a of
> > tar.gz) natively on a MACHTYPE=mipsel-unknown-linux-gnu MIPS p5600
> machine
> > under Debian Stretch. I'm getting an illegal instruction during libstdc++
> > build phase:
>
> This mailing list is for discussion of GCC development, not help using
> or building GCC. Your mail would be appropriate on the gcc-help list,
> which I've CC'd. Please remove gcc@ from further replies and use the
> gcc-help@ list.
>
> > libtool: compile:  /home/gru/proj/gcc_build/./gcc/xgcc -shared-libgcc
> > -B/home/gru/proj/gcc_build/./gcc -nostdinc++
> > -L/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/src
> > -L/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/src/.libs
> > -L/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/libsupc++/.libs
> > -B/usr/local/mipsel-linux-gnu/bin/ -B/usr/local/mipsel-linux-gnu/lib/
> > -isystem /usr/local/mipsel-linux-gnu/include -isystem
> > /usr/local/mipsel-linux-gnu/sys-include
> > -I/home/gru/proj/gcc-7.3.0/libstdc++-v3/../libgcc
> >
> -I/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/mipsel-linux-gnu
> > -I/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include
> > -I/home/gru/proj/gcc-7.3.0/libstdc++-v3/libsupc++ -D_GLIBCXX_SHARED
> > -std=gnu++14 -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
> > -fdiagnostics-show-location=once -ffunction-sections -fdata-sections
> > -frandom-seed=cow-ops.lo -g -O2 -D_GNU_SOURCE -minterlink-mips16 -c
> >
> /home/gru/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/filesystem/cow-ops.cc
> > -fPIC -DPIC -D_GLIBCXX_SHARED -o cow-ops.o
> > In file included from
> >
> /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/vector:64:0,
> >                  from
> >
> /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/experimental/bits/fs_path.h:39,
> >                  from
> >
> /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/experimental/filesystem:39,
> >                  from
> >
> /home/gru/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/filesystem/dir.cc:29,
> >                  from
> >
> /home/gru/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/filesystem/cow-dir.cc:26:
> >
> /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:
> > In member function 'void std::vector<_Tp,
> > _Alloc>::_M_move_assign(std::vector<_Tp, _Alloc>&&, std::true_type) [with
> > _Tp = std::experimental::filesystem::v1::path::_Cmpt; _Alloc =
> > std::allocator<std::experimental::filesystem::v1::path::_Cmpt>]':
> >
> /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:1531:9:
> > internal compiler error: Illegal instruction
> >   vector __tmp(get_allocator());
> >          ^~~~~
> > 0x159a473 crash_signal
> >     /home/gru/proj/gcc_build/../gcc-7.3.0/gcc/toplev.c:337
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > Please include the complete backtrace with any bug report.
> > See <https://gcc.gnu.org/bugs/> for instructions.
> > Makefile:523: recipe for target 'cow-dir.lo' failed
> > make[6]: *** [cow-dir.lo] Error 1
> >
> >
> > I have configured and launched the build as:
> >
> > $ CPATH=/usr/include/mipsel-linux-gnu/
> > LIBRARY_PATH=/usr/lib/mipsel-linux-gnu/ $PWD/../gcc-7.3.0/configure
> > --enable-languages=c,c++ --with-float=hard --disable-multiarch
> > --target=mipsel-linux-gnu
> > $ CPATH=/usr/include/mipsel-linux-gnu
> > LIBRARY_PATH=/usr/lib/mipsel-linux-gnu make -j2
> >
> > I've clearly misconfigured the build -- xgcc ended up with a wrong ISA,
> but
> > I can't figure out how. What am I missing?
>
> The most common reason for SIGILL is that one of the support libraries
> (gmp, mpfr, or mpc) has been built with the wrong ISA. I wouldn't
> expect that to fail on that line in libstdc++, but it's worth
> checking.
>
> The simplest way to build those libraries for use with GCC is to put
> their sources in the GCC source tree, as done by the
> contrib/download_prerequisites script. See
> https://gcc.gnu.org/wiki/InstallingGCC for more info.
>



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

  Powered by Linux