-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Preliminarily fixes #8228 -- better fixup of executables on mac #8235
Conversation
@jmarrec i made these changes while working offline and now I’m making this PR from my phone. So I am definitely not confident these changes are final, but in my machine the prerequisites of all the binaries looked good in my Mac package. Feel free to test it out and I’ll jump back into it in the morning. |
I've verified now on multiple machines that the latest commit results in a set of binaries that do not look for system Python at all. I will kick off another package build to verify, but I think this will be good to go in now. |
@jmarrec can you check out the latest install packages? I think I got all the fixups ...erm... fixed up. https://github.com/NREL/EnergyPlus/releases/tag/TestBuildMacFixups2 |
@Myoldmopar This appears to work, though I am getting some warnings when running simulations.
Testing energyplus --helpcurl -L -O https://github.com/NREL/EnergyPlus/releases/download/TestBuildMacFixups2/EnergyPlus-9.4.0-406cf3caa5-Darwin-x86_64.tar.gz
tar xfz EnergyPlus-9.4.0-406cf3caa5-Darwin-x86_64.tar.gz
cd EnergyPlus-9.4.0-406cf3caa5-Darwin-x86_64
./energyplus --help
EnergyPlus, Version 9.4.0-406cf3caa5
PythonLinkage: Linked to Python Version: "3.8.3 (default, Jul 8 2020, 14:27:55)
[Clang 11.0.3 (clang-1103.0.32.62)]"
Usage: energyplus [options] [input-file]
Options:
-a, --annual Force annual simulation
[...]
Running a couple of filescd ExampleFiles
../energyplus -w ../WeatherData/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw PythonPluginCustomSchedule.idf
EnergyPlus Starting
EnergyPlus, Version 9.4.0-406cf3caa5, YMD=2020.08.28 03:19
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Initializing Response Factors
[...]
EnergyPlus Completed Successfully.
|
jenkins@EnergyPlus-9.4.0-406cf3caa5-Darwin-x86_64$ otool -L energyplus
energyplus:
@executable_path/libenergyplusapi.9.4.0.dylib (compatibility version 0.0.0, current version 9.4.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 23.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1673.126.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.7.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
jenkins@EnergyPlus-9.4.0-406cf3caa5-Darwin-x86_64$ otool -L libenergyplusapi.dylib
libenergyplusapi.dylib:
@executable_path/libenergyplusapi.9.4.0.dylib (compatibility version 0.0.0, current version 9.4.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 23.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1673.126.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.7.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1894.10.126)
/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1348.12.4)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1069.11.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1673.126.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
jenkins@EnergyPlus-9.4.0-406cf3caa5-Darwin-x86_64$ otool -L ./libpythonwrapper.dylib
./libpythonwrapper.dylib:
@executable_path/libpythonwrapper.dylib (compatibility version 0.0.0, current version 0.0.0)
@executable_path/Python (compatibility version 3.8.0, current version 3.8.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.7.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
jenkins@EnergyPlus-9.4.0-406cf3caa5-Darwin-x86_64$ otool -L ./Python
./Python:
@executable_path/Python (compatibility version 3.8.0, current version 3.8.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1675.129.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1) |
Great! I'm glad they are working. I know, those errors pop up on Mac, and I'm even setting python home by API call prior to initializing. I need to dig a little more into the actual CPython code where that gets emitted and see if there is another way to get rid of the warning. |
OK, so the actual issue of insufficient fixing up is addressed here. There is the side issue noted about PYTHONHOME, but it's unrelated. I'm going to merge this. |
Pull request overview
NOTE: ENHANCEMENTS MUST FOLLOW A SUBMISSION PROCESS INCLUDING A FEATURE PROPOSAL AND DESIGN DOCUMENT PRIOR TO SUBMITTING CODE
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.