[MacPorts] #56292: fix ccpnmr package so that it actually builds again

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

[MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
#56292: fix ccpnmr package so that it actually builds again
-----------------------+--------------------
 Reporter:  jwhowarth  |      Owner:  (none)
     Type:  update     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:
 Keywords:  science    |       Port:  ccpnmr
-----------------------+--------------------
 The ccpnmr package has been broken for almost a year now and every attempt
 to fix it has failed. The attached Portfile diff and revised patch
 eliminates these build failures by blacklisting the cc, clang and all
 clang-macports compilers without working -fopenmp support. The revised
 patch eliminates the explicit passing of -lgomp (which is inappropriate
 for libomp) and insures that the -fopenmp flag is passed for linkages so
 that the openmp library is automatically added to the linkage.

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
#56292: fix ccpnmr package so that it actually builds again
------------------------+---------------------
  Reporter:  jwhowarth  |      Owner:  (none)
      Type:  update     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:  science
      Port:  ccpnmr     |
------------------------+---------------------
Changes (by jwhowarth):

 * Attachment "Portfile.diff" added.

 Portfile diff which adds compiler.whitelist to avoid compilers that don't
 support -fopenmp

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
------------------------+---------------------
  Reporter:  jwhowarth  |      Owner:  (none)
      Type:  update     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:  science
      Port:  ccpnmr     |
------------------------+---------------------
Changes (by jwhowarth):

 * Attachment "ccpnmr.patch" added.

 revised patch to avoid explicit passing named openmp library and to rely
 on -fopenmp flag to handle this for us.

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
------------------------+---------------------
  Reporter:  jwhowarth  |      Owner:  (none)
      Type:  update     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:  science
      Port:  ccpnmr     |
------------------------+---------------------

Comment (by kencu):

 macports-clang.3.7 and 3.8 support openmp as well.

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------
Changes (by mf2k):

 * keywords:  science => haspatch maintainer
 * type:  update => enhancement


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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------

Comment (by jwhowarth):

 Replying to [comment:1 kencu]:
 > macports-clang.3.7, 3.8, and 3.9 support openmp as well.

 You are mistaken. Prior to llvm.org switching the -fopenmp default
 behavior to -fopenmp=libomp, it was set to -fopenmp=libgomp which was a
 rather bogus hack in that it actually only produces serial code. There has
 been and won't ever be any openmp code generation in llvm for the libgomp
 openmp library. Only with llvm.org's 4.0 release was the libomp support
 mature enough to switch -fopenmp's default to -fopenmp=libomp. In prior
 releases, one had to explicitly pass -fopenmp=libomp to use the WIP
 version of libomp.

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------
Changes (by jwhowarth):

 * Attachment "Portfile.diff" added.

 Corrected Portfile.diff

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------

Comment (by ryandesign):

 Replying to [ticket:56292 jwhowarth]:
 > The ccpnmr package has been broken for almost a year now and every
 attempt to fix it has failed.

 Which attempts to fix it are you referring to? The last commit to the port
 that fixed anything was r144223 over 2 years ago.

 > The attached Portfile diff and revised patch eliminates these build
 failures by blacklisting the cc, clang and all clang-macports compilers
 without working -fopenmp support.

 I see you've blacklisted all versions of clang provided by Xcode. Are you
 certain that none of them support `-fopenmp`?

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------

Comment (by jwhowarth):

 Replying to [comment:4 ryandesign]:
 > Replying to [ticket:56292 jwhowarth]:
 > > The ccpnmr package has been broken for almost a year now and every
 attempt to fix it has failed.
 >
 > Which attempts to fix it are you referring to? The last commit to the
 port that fixed anything was r144223 over 2 years ago.
 >

 I was looking at the bulk commits for compilers.setup

 [https://github.com/macports/macports-
 ports/commit/907a4a8117d60463b70f5c3da327f4b7e8d34946#diff-
 9829349dfd70fc6e907badaaa36d2d45]

 > > The attached Portfile diff and revised patch eliminates these build
 failures by blacklisting the cc, clang and all clang-macports compilers
 without working -fopenmp support.
 >
 > I see you've blacklisted all versions of clang provided by Xcode. Are
 you certain that none of them support `-fopenmp`?

 Apple clang has never supported -fopenmp. Don't expect them to ever
 support openmp as it represents a competing technology to their blocks
 technology introduced with Grand Central Dispatch. If you try to compile
 any openmp code with the -fopenmp flag in Apple clang, you will get the
 errors...

 clang: error: unsupported option '-fopenmp'
 clang: error: unsupported option '-fopenmp'

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------
Changes (by jwhowarth):

 * Attachment "omp_hello.c" added.

 simple c test case for -fopenmp support

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------

Comment (by jwhowarth):

 Note that you can use the attached omp_hello.c c example to verify this
 against Apple clang.

 $ clang -fopenmp omp_hello.c
 clang: error: unsupported option '-fopenmp'
 clang: error: unsupported option '-fopenmp'

 whereas

 $ clang-mp-5.0 -fopenmp omp_hello.c
 howarth$ ./a.out
 Hello World from thread = 3
 Hello World from thread = 4
 Hello World from thread = 2
 Hello World from thread = 1
 Hello World from thread = 5
 Hello World from thread = 6
 Hello World from thread = 7
 Hello World from thread = 0
 Number of threads = 8

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------

Comment (by kencu):

 This looks pretty good to me. I'll make up a PR for it.

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------

Comment (by kencu):

 OK, Jack, the PR is building. If it goes on through, we can commit it
 <https://github.com/macports/macports-ports/pull/1580>.

 Ken

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------

Comment (by kencu):

 although macports-clang-3.7 does support openmp, it does so only with the
 variant applied. 3.8 and later support it by default. So the blacklisting
 of up to and include 3.7 seems appropriate.

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

Re: [MacPorts] #56292: fix ccpnmr package so that it actually builds again

MacPorts
In reply to this post by MacPorts
#56292: fix ccpnmr package so that it actually builds again
--------------------------+---------------------------------
  Reporter:  jwhowarth    |      Owner:  kencu
      Type:  enhancement  |     Status:  closed
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:  fixed        |   Keywords:  haspatch maintainer
      Port:  ccpnmr       |
--------------------------+---------------------------------
Changes (by kencu):

 * owner:  (none) => kencu
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"7fc418caab060eb8067f1359e91565f75aafb22d/macports-ports"
 7fc418caab060eb8067f1359e91565f75aafb22d/macports-ports]:
 {{{
 #!ConfigurableCommitTicketReference repository="macports-ports"
 revision="7fc418caab060eb8067f1359e91565f75aafb22d"
 ccpnmr: repair openmp to fix compilation

 closes: https://trac.macports.org/ticket/56292
 closes: https://trac.macports.org/ticket/53953
 }}}

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