Re: `checking size of mp_limb_t... 0` and `configure: error: Oops, mp_limb_t doesn't seem to work` when compiling the Microchip XC32 compiler from source

2023-11-07 Thread Gabriel Staples, ElectricRCAircraftGuy.com
Marc, yes, I see that too now. For anyone wondering where that is, here it
is:
https://github.com/ElectricRCAircraftGuy/Microchip_XC32_Compiler/blob/main/xc32-v4.35-src/pic32m-source/gmp-6.1.0/acinclude.m4#L125-L140

What I'm calling, by the way, inside build-xc32-v4.35m.sh, is this:
https://github.com/ElectricRCAircraftGuy/Microchip_XC32_Compiler/blob/main/build-xc32-v4.35m.sh#L175
:

${gcc_srcdir}/configure \
...

So, if `gcc_srcdir` is a relative path, `#include "$srcdir/gmp-h.in"` works
in MSYS2 UCRT64 gcc on Windows. If `gcc_srcdir` is an absolute path, it
does not.

Here is a new summary I put into my answer halfway down:
https://stackoverflow.com/a/77435216/4561887:

Quick summary:

Calling the gcc configure script with a relative path causes that relative
path to get inserted into the main gcc Makefile, and then passed to the gmp
configure script, where it is injected into an autogenerated conftest.c C
file as an include statement. So, using an absolute path to call the gcc
configure script puts an absolute path in the #include inside conftest.c,
and using a relative path to call the gcc configure script puts a relative
path into that #include statement. In the MSYS2 UCRT64 gcc compiler,
however, only relative paths are allowed, due to path conversion issues of
the C:\ (in a Windows-style path) or /c/ (in a Unix-style path on Windows)
part which pertains to the beginning of absolute paths.

- Gabriel Staples


On Tue, Nov 7, 2023 at 2:17 AM Marc Glisse  wrote:

> On Tue, 7 Nov 2023, Niels Möller wrote:
>
> > (2) It makes no sense for any C code, in conftest.c or otherwise, to
> >ever attempt to include gmp-h.in. That's not a valid C header file,
> >since it lacks the substitutions that turns it into a valid gmp.h
> >header file.
>
> From acinclude.m4:
>
>
> dnl  GMP_INCLUDE_GMP_H
> dnl  -
> dnl  Expand to the right way to #include gmp-h.in.  This must be used
> dnl  instead of gmp.h, since that file isn't generated until the end of
> the
> dnl  configure.
> dnl
> dnl  Dummy value for GMP_LIMB_BITS is enough
> dnl  for all current configure-time uses of gmp.h.
>
> define(GMP_INCLUDE_GMP_H,
> [[#define __GMP_WITHIN_CONFIGURE 1   /* ignore template stuff */
> #define GMP_NAIL_BITS $GMP_NAIL_BITS
> #define GMP_LIMB_BITS 123
> $DEFN_LONG_LONG_LIMB
> #include "$srcdir/gmp-h.in"]
> ])
>
>
> --
> Marc Glisse
>
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: `checking size of mp_limb_t... 0` and `configure: error: Oops, mp_limb_t doesn't seem to work` when compiling the Microchip XC32 compiler from source

2023-11-07 Thread Gabriel Staples, ElectricRCAircraftGuy.com
"Stinking" and "stinker" are playful terms in American English--things
you'd call your little kids when they're being cute or funny. It's more of
a playful term. In this context it expresses excitement that I found the
bug. To a non-native American English speaker, I can see the confusion. I
was very calm when I wrote it.

I can see the confusion. I took the word out.

> Can you explain concisely in which way absolute include paths made gmp
configure break in your environment?

In the answer <https://stackoverflow.com/a/77435216/4561887>, please jump
halfway down, to the section titled "Explanation of the
${gcc_srcdir_RELATIVE}/configure relative path fix that works". I can
neither explain it more nor less simply than that.

At this point I'm no longer seeking help, but rather just sharing my
findings in case it helps someone else.

Sincerely,

Gabriel Staples



On Mon, Nov 6, 2023 at 11:51 PM Niels Möller  wrote:

> "Gabriel Staples, ElectricRCAircraftGuy.com"  writes:
>
> > Thanks, Niels. I had been looking in config.log and came across a failure
> > to include a file with an absolute path. I found the solution and wrote
> > about it here: https://stackoverflow.com/a/77435216/4561887
>
> I've had a quick look, but really too long for me to read carefully. And
> please avoid calling other peoples work ugly things like "stinky". If
> needed, please calm down before posting stuff.
>
> Can you explain concisely in which way absolute include paths made gmp
> configure break in your environment? It's not clear to me why gmp's
> configure would ever attempt to compile anything with an #include
> "/c/foo/bar.h" in it.
>
> To me, use of absolute paths on the #include line seems rather obscure,
> I'd expect relative paths, and compiler -I flags (often with absolute
> paths) pointing to location of relevant include directories.
>
> Regards,
> /Niels
>
> --
> Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
> Internet email is subject to wholesale government surveillance.
>
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: `checking size of mp_limb_t... 0` and `configure: error: Oops, mp_limb_t doesn't seem to work` when compiling the Microchip XC32 compiler from source

2023-11-07 Thread Gabriel Staples, ElectricRCAircraftGuy.com
Thanks, Niels. I had been looking in config.log and came across a failure
to include a file with an absolute path. I found the solution and wrote
about it here: https://stackoverflow.com/a/77435216/4561887



On Fri, Nov 3, 2023 at 9:50 AM Niels Möller  wrote:

> When debugging configure issues, the first step is to check config.log.
> That should tell you in detail what configure tried to compile or run, and
> how it failed.
>
> Regards,
> /Niels
>
>
> "Gabriel Staples, ElectricRCAircraftGuy.com"  skrev:
> (3 november 2023 08:26:03 CET)
>
>> I could really use some help here. Many thanks in advance. I don't know if
>> this is a GMP problem exactly, but I've described it pretty thoroughly
>> here:
>>
>> GMP gets stuck in the configure process. Again, this may not be directly
>> due to GMP, but this is a community effort to compile the GCC Microchip
>> PIC32 compiler from source so we don't need to buy a license to program a
>> chip.
>>
>> `checking size of mp_limb_t... 0` and `configure: error: Oops, mp_limb_t
>> doesn't seem to work` when compiling the Microchip XC32 compiler from
>> source  <https://stackoverflow.com/q/77414776/4561887>
>>
>> Sincerely,
>>
>> Gabriel Staples
>> --
>> gmp-bugs mailing list
>> gmp-bugs@gmplib.org
>> https://gmplib.org/mailman/listinfo/gmp-bugs
>>
>>
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


`checking size of mp_limb_t... 0` and `configure: error: Oops, mp_limb_t doesn't seem to work` when compiling the Microchip XC32 compiler from source

2023-11-03 Thread Gabriel Staples, ElectricRCAircraftGuy.com
I could really use some help here. Many thanks in advance. I don't know if
this is a GMP problem exactly, but I've described it pretty thoroughly
here:

GMP gets stuck in the configure process. Again, this may not be directly
due to GMP, but this is a community effort to compile the GCC Microchip
PIC32 compiler from source so we don't need to buy a license to program a
chip.

`checking size of mp_limb_t... 0` and `configure: error: Oops, mp_limb_t
doesn't seem to work` when compiling the Microchip XC32 compiler from
source  

Sincerely,

Gabriel Staples
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs