Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate macosx pkg build to use notarytool (instead of altool) #2584

Merged
merged 6 commits into from
Dec 12, 2023

Conversation

nrnhines
Copy link
Member

Apple has deprecated altool for notarization and requires use of the new notarytool.
Update the notarization documentation.

Note that after bldnrnmacpkgcmake.sh checks the consistency of all the pythons that we build against with respect to
MACOSX_DEPLOYMENT_TARGET, I'm ignoring that and setting macosver=10.15 because recent nrn source changes require at least that version of macosx. (Note that all the pythons I build against on my machine are macosx-10.9-universal2 ( see python3 -c 'import sysconfig; print(sysconfig.get_platform())')). This seems ok but I think the issue can be ignored for the purposes of this PR. It may be that I should (need to) rebuild all the relevant python's I use with a MACOSX_DEPLOYMENT_TARGET=10.15 (or higher)

For testing, compilation requires macosx-10.15 or later.
For fast build time, NRN_RX3D_OPT_LEVEL=0
@nrnhines nrnhines requested a review from pramodk October 18, 2023 23:18
@nrnhines nrnhines changed the title Migrate macosx pkf build to use notarytool (instead of altool) Migrate macosx pkg build to use notarytool (instead of altool) Oct 18, 2023
@nrnhines nrnhines enabled auto-merge (squash) October 18, 2023 23:30
@nrnhines nrnhines enabled auto-merge (squash) October 18, 2023 23:30
@sonarcloud
Copy link

sonarcloud bot commented Oct 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@azure-pipelines
Copy link

✔️ b1d07e8 -> Azure artifacts URL

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b3ebf69) 66.20% compared to head (b1d07e8) 65.84%.
Report is 1 commits behind head on master.

❗ Current head b1d07e8 differs from pull request most recent head 3411a51. Consider uploading reports for the commit 3411a51 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2584      +/-   ##
==========================================
- Coverage   66.20%   65.84%   -0.36%     
==========================================
  Files         559      559              
  Lines      108958   108898      -60     
==========================================
- Hits        72133    71705     -428     
- Misses      36825    37193     +368     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bbpbuildbot

This comment has been minimized.

@pramodk
Copy link
Member

pramodk commented Oct 19, 2023

On Windows CI: lib/dllcrt2.o: lseek: Bad file descriptor is coming back!

test_rxd (neuron.tests.test_rxd.RxDTestCase.test_rxd) ... ld: error: C:/nrn_test/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/dllcrt2.o: lseek: Bad file descriptor
[634](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:635)
NEURON: Python Callback failed [hoccommand_exec]:
[635](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:636)
Traceback (most recent call last):
[636](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:637)
  File "C:\nrn_test\lib\python\neuron\rxd\rxd.py", line 1878, in _init
[637](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:638)
    initializer._do_init()
[638](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:639)
  File "C:\nrn_test\lib\python\neuron\rxd\initializer.py", line 58, in _do_init
[639](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:640)
    rxd._init()
[640](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:641)
  File "C:\nrn_test\lib\python\neuron\rxd\rxd.py", line 1901, in _init
[641](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:642)
    _compile_reactions()
[642](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:643)
  File "C:\nrn_test\lib\python\neuron\rxd\rxd.py", line 1515, in _compile_reactions
[643](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:644)
    _cxx_compile(fxn_string),
[644](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:645)
    ^^^^^^^^^^^^^^^^^^^^^^^^
[645](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:646)
  File "C:\nrn_test\lib\python\neuron\rxd\rxd.py", line 546, in _cxx_compile
[646](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:647)
    dll = ctypes.cdll[f"{os.path.abspath(filename)}.so"]
[647](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:648)
          ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[648](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:649)
  File "C:\Python311\Lib\ctypes\__init__.py", line 451, in __getitem__
[649](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:650)
    return getattr(self, name)
[650](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:651)
           ^^^^^^^^^^^^^^^^^^^
[651](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:652)
  File "C:\Python311\Lib\ctypes\__init__.py", line 446, in __getattr__
[652](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:653)
    dll = self._dlltype(name)
[653](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:654)
          ^^^^^^^^^^^^^^^^^^^
[654](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:655)
  File "C:\Python311\Lib\ctypes\__init__.py", line 376, in __init__
[655](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:656)
    self._handle = _dlopen(self._name, mode)
[656](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:657)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
[657](https://github.com/neuronsimulator/nrn/actions/runs/6567740016/job/17840995579?pr=2584#step:11:658)
FileNotFoundError: Could not find module 'D:\a\nrn\nrn\rxddll4599bdd0-6e13-11ee-b74a-000d3a1a8b68.so' (or one of its dependencies). Try using the full path with constructor syntax.

Last time we did #2546.

@pramodk
Copy link
Member

pramodk commented Oct 19, 2023

the CI that succeeded : https://github.com/neuronsimulator/nrn/actions/runs/6550320862/job/17789170483

  Current runner version: '2.310.2'
  Runner  Image: windows-2022
  Version: 20231002.1.0
  Included Software: https://github.com/actions/runner-images/blob/win22/20231002.1/images/win/Windows2022-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20231002.1

And failing one

Current runner version: '2.310.2'
Runner Image
  Image: windows-2022
  Version: 20231016.1.0
  Included Software: https://github.com/actions/runner-images/blob/win22/20231016.1/images/win/Windows2022-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20231016.1

@pramodk pramodk enabled auto-merge (squash) December 12, 2023 05:25
Copy link

sonarcloud bot commented Dec 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link

✔️ 3411a51 -> Azure artifacts URL

@pramodk pramodk merged commit b087a92 into master Dec 12, 2023
33 of 34 checks passed
@pramodk pramodk deleted the hines/notarize branch December 12, 2023 06:25
nrnhines added a commit that referenced this pull request Feb 19, 2024
* Migrate to notarytool
* Update notarization documentation.
* Test basic functionality before notarization.
pramodk pushed a commit that referenced this pull request Feb 21, 2024
- installer adds python3.12 and use cc, c++ instead of clang,clang++
- Migrate  macosx pkg build to use notarytool (instead of altool) (#2584)
  * Migrate to notarytool
  * Update notarization documentation.
  * Test basic functionality before notarization.
pramodk pushed a commit that referenced this pull request Feb 21, 2024
- installer adds python3.12 and use cc, c++ instead of clang,clang++
- Migrate  macosx pkg build to use notarytool (instead of altool) (#2584)
  * Migrate to notarytool
  * Update notarization documentation.
  * Test basic functionality before notarization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants