Re: pip and missing shared system system library
Ronald Oussoren via Distutils-SIG <[email protected]> Mon, 10 Aug 2020 09:45:41 +0200
| Newsgroups | gmane.comp.python.distutils.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0857816872524515415== Content-Type: multipart/alternative; boundary="Apple-Mail=_CB43440C-CCDF-4724-953B-E4453CBAB067" --Apple-Mail=_CB43440C-CCDF-4724-953B-E4453CBAB067 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 10 Aug 2020, at 09:31, Jonathan DEKHTIAR = <[email protected]> wrote: >=20 > 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: = https://en.wikipedia.org/wiki/Bug_compatibility = <https://en.wikipedia.org/wiki/Bug_compatibility> >=20 > When you work with low level libraries and tend to access hardware or = driver 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 using 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. 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=20 CUDA and embedded systems are not most extensions. For a lot of = software the specific compiler used is not an issue, except for = compatibility (C++ ABI, runtime ABI for the C runtime). Note that I reacted to a statement that a setup.py is always written for = a specific compiler, which is untrue. Most setup.py files with = extensions don=E2=80=99t specify a compiler at all, but rely on the = compiler detection from distutils/setuptools.=20 Ronald >=20 > Jonathan >=20 >=20 > ---- Le lun., 10 ao=C3=BBt 2020 00:07:54 -0700 Ronald Oussoren via = Distutils-SIG <[email protected]> =C3=A9crit ---- >=20 >=20 >=20 > > On 9 Aug 2020, at 18:59, David Mathog <[email protected] = <mailto:[email protected]>> wrote:=20 > >=20 > > On Sat, Aug 8, 2020 at 8:15 PM Jonathan DEKHTIAR=20 > > <[email protected] <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=9Cgenera= l 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 large 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/ = <https://blog.ronaldoussoren.net/> > -- > Distutils-SIG mailing list -- [email protected] = <mailto:[email protected]> > To unsubscribe send an email to [email protected] = <mailto:[email protected]> > https://mail.python.org/mailman3/lists/distutils-sig.python.org/ = <https://mail.python.org/mailman3/lists/distutils-sig.python.org/> > Message archived at = https://mail.python.org/archives/list/[email protected]/message/MPG= 2S4YHMCCNL7K2FQ2X6GF4ZJ5T7W2I/ = <https://mail.python.org/archives/list/[email protected]/message/MP= G2S4YHMCCNL7K2FQ2X6GF4ZJ5T7W2I/> >=20 >=20 --Apple-Mail=_CB43440C-CCDF-4724-953B-E4453CBAB067 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br = class=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">On = 10 Aug 2020, at 09:31, Jonathan DEKHTIAR <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><meta = content=3D"text/html;charset=3DUTF-8" http-equiv=3D"Content-Type" = class=3D""><div class=3D""><div style=3D"font-family: Verdana, Arial, = Helvetica, sans-serif; font-size: 10pt;" class=3D""><div class=3D"">I = hope it won't be obscure. But sometimes, you **<b class=3D"">need</b>** = to compile with the same compiler even if you don't exploit specific = compiler features. Namely for "Bug Compatibility" reasons: <a = target=3D"_blank" href=3D"https://en.wikipedia.org/wiki/Bug_compatibility"= class=3D"">https://en.wikipedia.org/wiki/Bug_compatibility</a><br = class=3D""><br class=3D"">When you work with low level libraries and = tend to access hardware or driver 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 using is essential.<br = class=3D"">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. 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 <br = class=3D""></div></div></div></div></blockquote><div><div><br = class=3D""></div><div>CUDA and embedded systems are not most extensions. = For a lot of software the specific compiler used is not an issue, = except for compatibility (C++ ABI, runtime ABI for the C = runtime).</div><div><br class=3D""></div><div>Note that I reacted to a = statement that a setup.py is always written for a specific compiler, = which is untrue. Most setup.py files with extensions don=E2=80=99t = specify a compiler at all, but rely on the compiler detection from = distutils/setuptools. </div><div><br = class=3D""></div><div>Ronald</div></div></div><div><br = class=3D""></div><div><br class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D""><div class=3D""><div style=3D"font-family: = Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;" class=3D""><div = class=3D""><br class=3D"">Jonathan</div><br class=3D""><div = data-zbluepencil-ignore=3D"true" style=3D"" class=3D"zmail_extra"><br = class=3D""><div id=3D"Zm-_Id_-Sgn1" class=3D"">---- Le lun., 10 ao=C3=BBt = 2020 00:07:54 -0700 <b class=3D"">Ronald Oussoren via Distutils-SIG = <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>></b> =C3=A9crit ----<br = class=3D""></div><br class=3D""><blockquote style=3D"border-left: 1px = solid rgb(204, 204, 204); padding-left: 6px; margin: 0px 0px 0px 5px;" = class=3D""><div class=3D""><br class=3D""><br class=3D"">> On 9 Aug = 2020, at 18:59, David Mathog <<a href=3D"mailto:[email protected]" = target=3D"_blank" class=3D"">[email protected]</a>> wrote: <br = class=3D"">> <br class=3D"">> On Sat, Aug 8, 2020 at 8:15 PM = Jonathan DEKHTIAR <br class=3D"">> <<a = href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a>> wrote: <br = class=3D"">>> <br class=3D"">>> 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 class=3D"">> <br class=3D"">> A = setup.py will always be written for a particular compiler, or maybe <br = class=3D"">> it will handle a couple, but they never handle a = "general compiler". <br class=3D""> <br class=3D"">Except that almost = all extensions written in C require a =E2=80=9Cgeneral C compiler=E2=80=9D= , not some version of GCC. <br class=3D""> <br class=3D"">> That was = why the example in spec <br class=3D"">> <br class=3D"">> = Requires-External C <br class=3D"">> <br class=3D"">> never made = sense. It always should have been something like <br class=3D"">> = <br class=3D"">> Requires-External gcc (>4.0) <br class=3D""> <br = class=3D"">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 large subset of GCC language extensions (at least icc = and clang). <br class=3D""> <br class=3D"">Ronald <br class=3D""> <br = class=3D"">=E2=80=94 <br class=3D""> <br class=3D"">Twitter / = micro.blog: @ronaldoussoren <br class=3D"">Blog: <a = href=3D"https://blog.ronaldoussoren.net/" target=3D"_blank" = class=3D"">https://blog.ronaldoussoren.net/</a><br class=3D"">--<br = class=3D"">Distutils-SIG mailing list -- <a = href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a><br class=3D"">To unsubscribe = send an email to <a href=3D"mailto:[email protected]" = target=3D"_blank" class=3D"">[email protected]</a><br = class=3D""><a = href=3D"https://mail.python.org/mailman3/lists/distutils-sig.python.org/" = target=3D"_blank" = class=3D"">https://mail.python.org/mailman3/lists/distutils-sig.python.org= /</a><br class=3D"">Message archived at <a = href=3D"https://mail.python.org/archives/list/[email protected]/mes= sage/MPG2S4YHMCCNL7K2FQ2X6GF4ZJ5T7W2I/" target=3D"_blank" = class=3D"">https://mail.python.org/archives/list/[email protected]/= message/MPG2S4YHMCCNL7K2FQ2X6GF4ZJ5T7W2I/</a><br = class=3D""></div></blockquote></div><div class=3D""><br = class=3D""></div></div><br class=3D""></div></div></blockquote></div><br = class=3D""></body></html>= --Apple-Mail=_CB43440C-CCDF-4724-953B-E4453CBAB067-- --===============0857816872524515415== 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/SQ7I27DHGLQXGVT4IBUQUGUJ2PWJIHQB/ --===============0857816872524515415==--