Re: Unable to build GDB 13.1 on Solaris 11.3 Sparc
Andrew Pinski via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CA+=Sn1=hLskn_PnS+r3jvT6Er8xRycmL8n_8fDLeo0LsFkZEvA@mail.gmail.com> |
On Wed, Mar 8, 2023 at 1:34 PM Nemo Nusquam via Gdb <[email protected]> wrote: > > I am trying (and failing) to build GDB 13.1 on Solaris 11.3 Sparc. > > Here is my configuration script. > > CXXFLAGS='-g3 -O0' \ > CFLAGS='-g3 -O0' \ > NM=/usr/bin/gnm \ > SHELL=/usr/bin/bash \ > AR=/usr/bin/gar \ > AS=/usr/bin/as \ > CC=/home/build/gcc/git/bin/gcc \ > CXX=/home/build/gcc/git/bin/g++ \ > ../configure \ > --with-mpc=/usr/local \ > --with-gmp=/usr/local \ > --with-mpfr=/usr/local \ > --enable-64-bit-bfd \ > --enable-tui \ > --with-curses \ > --disable-bootstrap \ > --disable-binutils \ > --disable-ld \ > --disable-gprof \ > --disable-gprofng \ > --disable-gold \ > --disable-gas \ > --disable-sim > > (Some flags taken from https://sourceware.org/gdb/wiki/BuildingNatively .) > > The makefile creates ./gdb inside the build directory and then stops as > follows: > > checking for libgmp... no > configure: error: GMP is missing or unusable > gmake[1]: *** [Makefile:11447: configure-gdb] Error 1 > gmake[1]: Leaving directory '/home/build/opt/gdb-13.1/bld' This was a known issue in GDB 13.1, It has been fixed/changed on the trunk and will be included with GDB 14. For pre-GDB 14, the option you want to use for configure is --with-libgmp-prefix= . libmpfr is similar you need to use --with-libmpfr-prefix . These options are documented in the installation documentation for GDB 13 but they were not part of the toplevel configure which is why they were not mentioned there. The options --with-gmp= and --with--mpfr= were only originally used for building GCC (GCC, GDB, binutils [and newlib] all share the same toplevel configure/make file system) and this was why folks got confused and even more I made the fix for this to use these options also for GDB. This issue was recorded as https://sourceware.org/bugzilla/show_bug.cgi?id=28500 . Thanks, Andrew Pinski > > I have libgmp (and building gcc 13 uses it) in /usr/local/lib: > > /usr/local/lib/libgmp.a: current ar archive, 32-bit symbol table > /usr/local/lib/libgmp.la: commands text > /usr/local/lib/libgmp.so: ELF 64-bit MSB dynamic lib SPARCV9 > Version 1, UltraSPARC3 Extensions Required, dynamically linked, not > stripped, no debugging information available > /usr/local/lib/libgmp.so.10: ELF 64-bit MSB dynamic lib SPARCV9 > Version 1, UltraSPARC3 Extensions Required, dynamically linked, not > stripped, no debugging information available > /usr/local/lib/libgmp.so.10.4.1: ELF 64-bit MSB dynamic lib > SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, > not stripped, no debugging information available > > Now I note that the Makefile is compiling to 32-bit objects but I have a > 32-bit libgmp.a. (I tried adding "-m64" but that caused other problems.) > > I am stumped. How do I proceed? > > N.