[MacPorts] #57520: py-pyopencl: Does not build on libstdc++ systems; does not honor MacPorts build flags

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #57520: py-pyopencl: Does not build on libstdc++ systems; does not honor MacPorts build flags

MacPorts
#57520: py-pyopencl: Does not build on libstdc++ systems; does not honor MacPorts
build flags
-------------------------------------------+-------------------------
 Reporter:  ryandesign                     |      Owner:  petrrr
     Type:  defect                         |     Status:  assigned
 Priority:  Normal                         |  Milestone:
Component:  ports                          |    Version:
 Keywords:  snowleopard lion mountainlion  |       Port:  py-pyopencl
-------------------------------------------+-------------------------
 py-pyopencl doesn't build on older systems that use libstdc++, because
 although it includes the cxx11 1.1 portgroup, that portgroup can't
 function properly because the pyopencl build system does not make use of
 the CXXFLAGS and LDFLAGS that MacPorts sets.

 I've spent a little time trying to understand the build system, but
 unfortunately I'm not getting very far. I don't know python very well. I
 see in the setup.py these lines:

 {{{
         StringListOption("CXXFLAGS", default_cxxflags,
             help="Any extra C++ compiler options to include"),
         StringListOption("LDFLAGS", default_ldflags,
             help="Any extra linker options to include"),
         ])
 }}}

 Na├»vely, I assume this means that the build system allows us to specify
 CXXFLAGS and LDFLAGS in some way. Unfortunately, I have been unable to
 determine what that way is. MacPorts of course already sets these as
 environment variables, which are being ignored.

 I also notice that the build is using clang (instead of clang++) to
 compile the C++ code (but is using clang++ to link it). While this appears
 to work, it should ideally be fixed to use the right compiler.

--
Ticket URL: <https://trac.macports.org/ticket/57520>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57520: py-pyopencl: Does not build on libstdc++ systems; does not honor MacPorts build flags

MacPorts
#57520: py-pyopencl: Does not build on libstdc++ systems; does not honor MacPorts
build flags
--------------------------+-------------------------------------------
  Reporter:  ryandesign   |      Owner:  petrrr
      Type:  defect       |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  snowleopard lion mountainlion
      Port:  py-pyopencl  |
--------------------------+-------------------------------------------

Comment (by ryandesign):

 Note that you don't need to be on an older system to confirm if you've
 fixed this problem. On any system, you can look at the MacPorts debug
 output or main.log file to see if the `-stdlib=...` flag is being added
 where it should be.

--
Ticket URL: <https://trac.macports.org/ticket/57520#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57520: py-pyopencl: Does not build on libstdc++ systems; does not honor MacPorts build flags

MacPorts
In reply to this post by MacPorts
#57520: py-pyopencl: Does not build on libstdc++ systems; does not honor MacPorts
build flags
--------------------------+-------------------------------------------
  Reporter:  ryandesign   |      Owner:  petrrr
      Type:  defect       |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  snowleopard lion mountainlion
      Port:  py-pyopencl  |
--------------------------+-------------------------------------------

Comment (by ryandesign):

 Replying to [ticket:57520 ryandesign]:
 > I also notice that the build is using clang (instead of clang++) to
 compile the C++ code (but is using clang++ to link it). While this appears
 to work, it should ideally be fixed to use the right compiler.

 I've learned that this is simply [https://bugs.python.org/issue1222585 a
 bug in distutils ]that has never been fixed. Python simply does not
 support modules written in C++. Brilliant.

--
Ticket URL: <https://trac.macports.org/ticket/57520#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS