Re: pip and missing shared system system library

Jonathan DEKHTIAR <[email protected]> Mon, 10 Aug 2020 00:31:11 -0700
Newsgroups gmane.comp.python.distutils.devel
Message-ID <173d747c454.ae6a9a28612176.7150801570086245279@jonathandekhtiar.eu>
--===============4672215508333148462==
Content-Type: multipart/alternative;
	boundary="----=_Part_1962670_200832641.1597044671572"

------=_Part_1962670_200832641.1597044671572
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I hope it won't be obscure. But sometimes, you **need** to compile with the=
 same compiler even if you don't exploit specific compiler features. Namely=
 for "Bug Compatibility" reasons:=C2=A0https://en.wikipedia.org/wiki/Bug_co=
mpatibility

When you work with low level libraries and tend to access hardware or drive=
r libraries (think GPUs, FPGAs, etc.) in many cases, compiling with GCC or =
CLANG or whatever compiler has been used to compile the libraries you are u=
sing is essential.
This is a very common issues when working on specific hardware or embedded =
software. Compilers are not "perfect" they have bugs like any other pieces =
(I know we tend to forget it). Sometimes we don't care, sometimes we do. An=
d actually now that Deep Learning and Machine learning is really a big thin=
g. "Bug Compatibility" is an important issue. Try compiling CUDA code with =
the wrong compiler: I wish you good luck in your debugging :D=C2=A0

Jonathan


---- Le lun., 10 ao=C3=BBt 2020 00:07:54 -0700 Ronald Oussoren via Distutil=
s-SIG <[email protected]> =C3=A9crit ----




> On 9 Aug 2020, at 18:59, David Mathog <mailto:[email protected]> wrote:=
=20
>=20
> On Sat, Aug 8, 2020 at 8:15 PM Jonathan DEKHTIAR=20
> <mailto:[email protected]> wrote:=20
>>=20
>> So do you plan on "managing" which version of GCC or g++ people have and=
 issue a warning if they don't have the good one?=20
>=20
> A setup.py will always be written for a particular compiler, or maybe=20
> it will handle a couple, but they never handle a "general compiler".=20
=20
Except that almost all extensions written in C require a =E2=80=9Cgeneral C=
 compiler=E2=80=9D, not some version of GCC.=20
=20
> That was why the example in spec=20
>=20
> Requires-External C=20
>=20
> never made sense.  It always should have been something like=20
>=20
> Requires-External gcc (>4.0)=20
=20
Not unless you write code that uses features specific to GCC, and even then=
 it is questionable as there are several other compilers that implement a l=
arge subset of GCC language extensions (at least icc and clang).=20
=20
Ronald=20
=20
=E2=80=94=20
=20
Twitter / micro.blog: @ronaldoussoren=20
Blog: https://blog.ronaldoussoren.net/
--
Distutils-SIG mailing list -- mailto:[email protected]
To unsubscribe send an email to mailto:[email protected]
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at https://mail.python.org/archives/list/distutils-sig@pyt=
hon.org/message/MPG2S4YHMCCNL7K2FQ2X6GF4ZJ5T7W2I/
------=_Part_1962670_200832641.1597044671572
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>=
<meta content=3D"text/html;charset=3DUTF-8" http-equiv=3D"Content-Type"></h=
ead><body ><div style=3D"font-family: Verdana, Arial, Helvetica, sans-serif=
; font-size: 10pt;"><div>I hope it won't be obscure. But sometimes, you **<=
b>need</b>** to compile with the same compiler even if you don't exploit sp=
ecific compiler features. Namely for "Bug Compatibility" reasons:&nbsp;<a t=
arget=3D"_blank" href=3D"https://en.wikipedia.org/wiki/Bug_compatibility">h=
ttps://en.wikipedia.org/wiki/Bug_compatibility</a><br><br>When you work wit=
h low level libraries and tend to access hardware or driver libraries (thin=
k GPUs, FPGAs, etc.) in many cases, compiling with GCC or CLANG or whatever=
 compiler has been used to compile the libraries you are using is essential=
.<br>This is a very common issues when working on specific hardware or embe=
dded software. Compilers are not "perfect" they have bugs like any other pi=
eces (I know we tend to forget it). Sometimes we don't care, sometimes we d=
o. And actually now that Deep Learning and Machine learning is really a big=
 thing. "Bug Compatibility" is an important issue. Try compiling CUDA code =
with the wrong compiler: I wish you good luck in your debugging :D&nbsp;<br=
><br>Jonathan</div><br><div data-zbluepencil-ignore=3D"true" style=3D"" cla=
ss=3D"zmail_extra"><br><div id=3D"Zm-_Id_-Sgn1">---- Le lun., 10 ao=C3=BBt =
2020 00:07:54 -0700 <b>Ronald Oussoren via Distutils-SIG &lt;distutils-sig@=
python.org&gt;</b> =C3=A9crit ----<br></div><br><blockquote style=3D"border=
-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0px 0px 0px=
 5px;"><div><br><br>&gt; On 9 Aug 2020, at 18:59, David Mathog &lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt; w=
rote: <br>&gt; <br>&gt; On Sat, Aug 8, 2020 at 8:15 PM Jonathan DEKHTIAR <b=
r>&gt; &lt;<a href=3D"mailto:[email protected]" target=3D"_blank"=
>[email protected]</a>&gt; wrote: <br>&gt;&gt; <br>&gt;&gt; So do=
 you plan on "managing" which version of GCC or g++ people have and issue a=
 warning if they don't have the good one? <br>&gt; <br>&gt; A setup.py will=
 always be written for a particular compiler, or maybe <br>&gt; it will han=
dle a couple, but they never handle a "general compiler". <br> <br>Except t=
hat almost all extensions written in C require a =E2=80=9Cgeneral C compile=
r=E2=80=9D, not some version of GCC. <br> <br>&gt; That was why the example=
 in spec <br>&gt; <br>&gt; Requires-External C <br>&gt; <br>&gt; never made=
 sense.  It always should have been something like <br>&gt; <br>&gt; Requir=
es-External gcc (&gt;4.0) <br> <br>Not unless you write code that uses feat=
ures specific to GCC, and even then it is questionable as there are several=
 other compilers that implement a large subset of GCC language extensions (=
at least icc and clang). <br> <br>Ronald <br> <br>=E2=80=94 <br> <br>Twitte=
r / micro.blog: @ronaldoussoren <br>Blog: <a href=3D"https://blog.ronaldous=
soren.net/" target=3D"_blank">https://blog.ronaldoussoren.net/</a><br>--<br=
>Distutils-SIG mailing list -- <a href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a><br>To unsubscribe send an em=
ail to <a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]</a><br><a href=3D"https://mail.python.org/ma=
ilman3/lists/distutils-sig.python.org/" target=3D"_blank">https://mail.pyth=
on.org/mailman3/lists/distutils-sig.python.org/</a><br>Message archived at =
<a href=3D"https://mail.python.org/archives/list/[email protected]/m=
essage/MPG2S4YHMCCNL7K2FQ2X6GF4ZJ5T7W2I/" target=3D"_blank">https://mail.py=
thon.org/archives/list/[email protected]/message/MPG2S4YHMCCNL7K2FQ2=
X6GF4ZJ5T7W2I/</a><br></div></blockquote></div><div><br></div></div><br></b=
ody></html>
------=_Part_1962670_200832641.1597044671572--

--===============4672215508333148462==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
Distutils-SIG mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at https://mail.python.org/archives/list/[email protected]/message/HHPHJ7ASDAYEVM5WGHTEOM6KHUO4DAGS/

--===============4672215508333148462==--