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

Does the plugin work for OSX 12, 13? #143

Open
veeshy opened this issue Dec 9, 2022 · 6 comments
Open

Does the plugin work for OSX 12, 13? #143

veeshy opened this issue Dec 9, 2022 · 6 comments

Comments

@veeshy
Copy link

veeshy commented Dec 9, 2022

I see the plugin builds for osx 11, is it supposed to work for other versions? It didn't work for me, but there weren't any lib errors, cubit simply didn't have the dagmc cmd available after copying the files into the MacOS/plugins/ folder.

Perhaps related but the plugin dir in osx (left) and linux (right) builds has different files, is that expected?
image

@bam241
Copy link
Member

bam241 commented Dec 10, 2022

it should be ok,

I am unsure it works with a M1 processor. (It is compile for Mac-intel, but might work with rosetta 2..)

you need to exact same version of the plugin than the cubit you are using.

can you tell me which version you are attempting to use so I can give it a try ?

@bam241
Copy link
Member

bam241 commented Dec 10, 2022

I just confirmed that the 2021.11 plugin work with MacOS 13.0.1 on a MAC-intel.

@veeshy please let me know if you need me to check other build (or a M1-MAC).

@veeshy
Copy link
Author

veeshy commented Dec 12, 2022

I’m on intel, 22.4 and downloaded the correct versions. Will try with 21.11 tomorrow just in case (edit: did not work either). Thanks for checking.

Also might be my fault in multiple ways, do you need dagmc compiled first or is the cubit plugin standalone?

@veeshy
Copy link
Author

veeshy commented Dec 14, 2022

Looked a little more at this, I see when using the cubit no gui cli the plugin load errors with:

Loading command plugins from /Applications/Coreform-Cubit-2022.4.app/Contents/MacOS/plugins
[2022-12-13 22:02:04.960] [app_logger] [debug] CubitDynamicLoader: load_library_sys: /Applications/Coreform-Cubit-2022.4.app/Contents/MacOS/plugins/libmaterial_commands.so
[2022-12-13 22:02:05.084] [app_logger] [debug] CubitDynamicLoader: load_library_sys: /Applications/Coreform-Cubit-2022.4.app/Contents/MacOS/plugins/libsvalinn_plugin.so
[2022-12-13 22:02:05.086] [app_logger] [error] dlopen ERROR /Applications/Coreform-Cubit-2022.4.app/Contents/MacOS/plugins/libsvalinn_plugin.so : dlopen(/Applications/Coreform-Cubit-2022.4.app/Contents/MacOS/plugins/libsvalinn_plugin.so, 0x0005): Library not loaded: /usr/local/opt/libaec/lib/libsz.2.dylib
  Referenced from: <E13853EB-9430-30B2-BC47-320181BF77A9> /Applications/Coreform-Cubit-2022.4.app/Contents/MacOS/plugins/svalinn/libsvalinn_plugin.so
  Reason: tried: '/usr/local/opt/libaec/lib/libsz.2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libaec/lib/libsz.2.dylib' (no such file), '/usr/local/opt/libaec/lib/libsz.2.dylib' (no such file), '/usr/local/lib/libsz.2.dylib' (no such file), '/usr/lib/libsz.2.dylib' (no such file, not in dyld cache)
ERROR: <stdin>, line 0. Error loading /Applications/Coreform-Cubit-2022.4.app/Contents/MacOS/plugins/libsvalinn_plugin.so:
ERROR: <stdin>, line 0. 

Looking at the plugin library,

>> otool -L libsvalinn_plugin.so  
libsvalinn_plugin.so:
	@rpath/libcubiti19.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/libaec/lib/libsz.2.dylib (compatibility version 2.0.0, current version 2.0.1)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
	@rpath/libmcnp2cad.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libiGeom.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libcubit_geom.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libcubit_util.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1200.3.0)

I don't have /usr/local/opt/libaec/lib/libsz.2.dylib. I hacked it in via install_name_tool -change the path to some program on my system that had libsz and then dagmc works in my cubit (2022.4), or at the least the test_plugin journal file works.

Is there some preqreq I missed? Is my osx jank? Interesting it works for you without any issues.

@veeshy
Copy link
Author

veeshy commented Dec 14, 2022

wait.. why did I hack it in, clearly libsz.dylib is there in what y'all provide.. that's my bad. But still the libraries listed don't point to the @rpath/libsz.dylib

@bam241
Copy link
Member

bam241 commented Dec 16, 2022

  1. @veeshy you don't need dagmc installed on your computer.

I have the same problem with 2022.4 I believe the is something broken in the build process. I probably know how to fix it.

2021.11 should with the the 2021.11 version of cubit (I did try it on my Mac-intel) it worked.
it seems something had change between 2021.11 and 2022.4.
Here is what I get with 2021.11:

otool -L libsvalinn_plugin.so
libsvalinn_plugin.so:
	@rpath/libcubiti19.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libsz.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
	@rpath/libmcnp2cad.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libiGeom.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libcubit_geom.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libcubit_util.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 904.4.0)

I'll try to issue a fix on 2022.4 and ping you on the PR

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

No branches or pull requests

2 participants