idaholab / raven

RAVEN is a flexible and multi-purpose probabilistic risk analysis, validation and uncertainty quantification, parameter optimization, model reduction and data knowledge-discovering framework.
https://raven.inl.gov/
Apache License 2.0
216 stars 132 forks source link

[TASK] Script to build packages without conda #2258

Closed joshua-cogliati-inl closed 5 months ago

joshua-cogliati-inl commented 5 months ago

Issue Description

Is your feature request related to a problem? Please describe. Conda built pip packages can link in libraries that are not available on a different computer. This resulted in errors like:

Traceback (most recent call last):
  File "/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/ravenframework/utils/utils.py", line 659, in find_crow
    import crow_modules.distribution1D
  File "/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/crow_modules/distribution1D.py", line 13, in <module>
    from . import _distribution1D
ImportError: dlopen(/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/crow_modules/_distribution1D.cpython-310-darwin.so, 0x0002): Library not loaded: @rpath/libc++.1.dylib
  Referenced from: <E3888BAA-1459-3DCE-B489-9E19A724980B> /Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/crow_modules/_distribution1D.cpython-310-darwin.so
  Reason: tried: '/Users/fred/miniconda3_arm64/envs/python310_pip/lib/libc++.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/fred/miniconda3_arm64/envs/python310_pip/lib/libc++.1.dylib' (no such file), '/Users/fred/miniconda3_arm64/envs/python310_pip/lib/libc++.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/fred/miniconda3_arm64/envs/python310_pip/lib/libc++.1.dylib' (no such file), '/Users/jack/miniconda3/envs/test_raven/bin/../lib/libc++.1.dylib' (no such file), '/Users/jack/miniconda3/envs/test_raven/bin/../lib/libc++.1.dylib' (no such file)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jack/miniconda3/envs/test_raven/bin/raven_framework", line 8, in <module>
    sys.exit(wheelMain())
  File "/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/ravenframework/Driver.py", line 34, in wheelMain
    main(False)
  File "/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/ravenframework/Driver.py", line 43, in main
    dutils.doSetup(checkLibraries)
  File "/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/ravenframework/CustomDrivers/DriverUtils.py", line 39, in doSetup
    setupCpp()
  File "/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/ravenframework/CustomDrivers/DriverUtils.py", line 105, in setupCpp
    utils.find_crow(frameworkDir)
  File "/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/ravenframework/utils/utils.py", line 683, in find_crow
    raise IOError(UreturnPrintTag('UTILS') + ': '+UreturnPrintPostTag('ERROR')+ ' -> Crow has not been found. It location is supposed to be one of '+str(crowDirs)+'. Has RAVEN been built?')
OSError: UTILS                    : ERROR      -> Crow has not been found. It location is supposed to be one of ['/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages/crow', '/Users/jack/miniconda3/envs/test_raven/lib/python3.10/crow', '/Users/jack/miniconda3/envs/test_raven/lib/python3.10/site-packages']. Has RAVEN been built?

Describe the solution you'd like Building the pip packages without using conda would be useful. This might fix the linking errors.

Describe alternatives you've considered Building the libraries with static linking might be possible, but there doesn't seem to be a documented way to do this.


For Change Control Board: Issue Review

This review should occur before any development is performed as a response to this issue.


For Change Control Board: Issue Closure

This review should occur when the issue is imminently going to be closed.

wangcj05 commented 5 months ago

checklist is good.