Re: Time for a MinGW-GDB Upgrade?
Keith Marshall <[email protected]> Thu, 23 Jul 2020 07:20:20 +0100
| Newsgroups | gmane.comp.gnu.mingw.user |
|---|---|
| Organization | MinGW.org Project |
| Message-ID | <[email protected]> |
On 22/07/2020 17:44, Eli Zaretskii wrote:
> The Python tree is "relocatable", i.e. if GDB discovers at run time
> that its installation is some place different from the configured
> exec-prefix, it will "rewrite" the beginning of the root of the Python
> installation to be in sync with the actual GDB installation directory.
> So, for example, if GDB was configured for exec-prefix = x:/usr, and
> you give --with-python=x:/usr/Python27, then GDB invoked from
> C:/foo/bar/bin will look for Python in C:/foo/bar/Python27.
So, in theory, if I configure with "--prefix=C:/MinGW", (or maybe just
with "--exec-prefix=C:/MinGW"), and I've arranged it such that testing
for Python yields an effective "python_prefix=C:/Python27", (which does
not seem to be achieved with "--with-python=C:/Python27" ... it needs a
program reference, such as "--with-python=mingw32-python-config", which
is assigned to python_prog, and will return the effective prefix when
that program is invoked as
${python_prog} ${srcdir}/python/python-config.py --exec-prefix
with the result assigned to python_prefix), then, at least, if the user
installs GDB to "x:/MinGW", then that installation should expect to find
Python in "x:/Python27"?
That seems reasonable, but wait ... this is truly weird! For reasons I
explained previously, I need to specify "--with-mpfr=/mingw", (and also
"--with-gmp=/mingw", except that's broken anyway), so that the build
process can find MPFR headers and libraries. As long as I configure
with "--prefix=/mingw", (and leave exec-prefix unspecified), and kludge
around the broken handling of "--with-gmp=/mingw", MPFR detection works
correctly, but if I use "--prefix=C:/MinGW", or even if I simply do no
more than add "--exec-prefix=C:/MinGW", then MPFR detection fails!
Likewise for "--with-expat=/mingw": works fine as long as configuration
of "--prefix=/mingw" is consistent, but breaks with "--prefix=C:/MinGW",
or with "--exec-prefix=C:/MinGW".
> If this won't work because GDB and Python's installations are "out of
> sync" wrt their top-level installation directory, then the user needs
> to use PYTHONPATH.>
> In practice, I think any user of MinGW GDB with Python will have to
> set PYTHONPATH, unless they copycat your particular directory
> hierarchy, which AFAICT is not a simple one.
It isn't really that complex, but GDB's (and GCC's) horrendously complex
configuration process just doesn't always play nicely with cross
compilation, especially when we want Windows style paths to be recorded
in the generated executable program files.
--
Regards,
Keith.
Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
_______________________________________________
MinGW-Users mailing list
[email protected]
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEwZ7AGBVH3lDh1I9TwK02xjR+Wj8FAl8ZLCYACgkQwK02xjR+ Wj9dGA//YFfUudfJlqfUy8tE3Sn8ulIhobyD6HNefNF4grTDsAKQfNvm3xUfGEMD BcJDrxI+Mm/xCUxFS7PcCzozRDbYq3yt72UPwJaNgZlFHgmHt99g30OaYk6g9jj0 Zli5+oRYBmXWTwAgFzvAe4TkrMgtkxqn9n99RbyVWzYatWTJqqjNka+A950BA8Mx 41tdGh3EkjII/LOHiJUIk7SksuXAytFe+u8zBca2071IWKimEQqtPDGIm5fVjOCr 4UPZ5xACMFiHbwwviA8sycRPTcyHJoOlETZsYsEX0ZbRK2ReUG3LLbSX+mZoz7aW YxSwFXY9ekc3rNPWNHwRXnamvau75Nulp/9Dy9oY46rWR7Erut7xJj1XTV0mkmkW gfATTB53RXIS7VNuOaS5eu6ULP3xCu+f1XUFgpxVIdHOv5Oox67TZgJM7M75vyol UqMPrngsRqiexQpwTSZQlDt45rfYv84CcAz1UgqkPMRgO0w3XxdXl56AC9Q7T7Kf UEfB4PDF1tBHUolrlDFZp3r+e9Pyyxbb2q5ZVhpTLusuBbL6OHbrZeleSBKNmdI1 yI4FIo4URzqElI5eIUrzv84Pzt8MOEDWpDbb3afk/2SZPDFNJZsxesnpDENFX6nS 4zL+8KFic+a7o/racbKK67129DQimEjxm1HzZn9MlMKiNypLOVU= =XtD+ -----END PGP SIGNATURE-----