Opened 7 years ago
Closed 7 years ago
#56292 closed enhancement (fixed)
fix ccpnmr package so that it actually builds again
Reported by: | jwhowarth | Owned by: | kencu (Ken) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch maintainer | Cc: | |
Port: | ccpnmr |
Description
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.
Attachments (3)
Change History (13)
Changed 7 years ago by jwhowarth
Attachment: | ccpnmr.patch added |
---|
comment:1 follow-up: 3 Changed 7 years ago by kencu (Ken)
macports-clang.3.7, 3.8, and 3.9 support openmp as well.
comment:2 Changed 7 years ago by mf2k (Frank Schima)
Keywords: | haspatch maintainer added; science removed |
---|---|
Type: | update → enhancement |
comment:4 follow-up: 5 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to 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
?
comment:5 Changed 7 years ago by jwhowarth
Replying to ryandesign:
Replying to 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
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'
Changed 7 years ago by jwhowarth
Attachment: | omp_hello.c added |
---|
simple c test case for -fopenmp support
comment:6 Changed 7 years ago 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
comment:7 Changed 7 years ago by kencu (Ken)
This looks pretty good to me. I'll make up a PR for it.
comment:8 Changed 7 years ago by kencu (Ken)
OK, Jack, the PR is building. If it goes on through, we can commit it <https://github.com/macports/macports-ports/pull/1580>.
Ken
comment:9 Changed 7 years ago by kencu (Ken)
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 including 3.7 seems appropriate.
comment:10 Changed 7 years ago by kencu (Ken)
Owner: | set to kencu |
---|---|
Resolution: | → fixed |
Status: | new → closed |
revised patch to avoid explicit passing named openmp library and to rely on -fopenmp flag to handle this for us.