MacOS – Gnucash and macports conflicting libgio-2.0.0.dylib

dynamic librarymacosmacports

I have macports 2.5.2 already installed.
I have then installed Gnucash 3.2 dmg from gnucash.org.
When I run gnucash, I have the error:

objc[93365]: Class GNotificationCenterDelegate is implemented in both
/Applications/Gnucash.app/Contents/Resources/lib/libgio-2.0.0.dylib
(0x10c333670) and /opt/local/lib/libgio-2.0.0.dylib (0x117a41620). One
of the two will be used. Which one is undefined.
Segmentation fault:
11

/opt/local/lib/libgio-2.0.0.dylib belongs to glib2 macports package.

If I rename /opt/local/lib/libgio-2.0.0.dylib, gnucash works fine. But this can't be a solution.

I've also tried to set DYLB_LIBRARY_PATH to

/Applications/Gnucash.app/Contents/Resources/lib

But this way I have the error

Segmentation fault: 11

Is there a way to run gnucash while macports installed ?

Best Answer

Problem is solved now. I have completely uninstalled macports, removed /opt/local directory, and then reinstalled macports. I tried to install macports gnucash, but it is still impossible. But the dmg gnucash works now perfectly. I have no explanation.