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

PySide2 issues with Qt5 for GUI #3

Open
DWilliamNaim opened this issue Apr 21, 2019 · 4 comments
Open

PySide2 issues with Qt5 for GUI #3

DWilliamNaim opened this issue Apr 21, 2019 · 4 comments

Comments

@DWilliamNaim
Copy link

Hello,

So I have successfully installed the package, however I cannot run the exec or gui.

I have tried two different approaches:

The first is trying "./bsg_exec -i 63Ni.ini -o 63Ni" receiving:

"dyld: Library not loaded: @rpath/libCore.so
Referenced from: /Users/danielnaim/Desktop/Research/bsg-build2/bin/./bsg_exec
Reason: image not found
Abort trap: 6"

The second is going into the bsg_gui folder and running python big_gui.py to which I receive:

"objc[56081]: Class RunLoopModeTracker is implemented in both /anaconda3/lib/python3.7/site-packages/PySide2/Qt/lib/QtCore.framework/Versions/5/QtCore (0x11d977120) and /anaconda3/lib/libQt5Core.5.9.7.dylib (0x1245c3a80). One of the two will be used. Which one is undefined.
QObject::moveToThread: Current thread (0x7fc362c299e0) is not the object's thread (0x7fc362c38010).
Cannot move to target thread (0x7fc362c299e0)

You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
qt.qpa.plugin: Could not load the Qt platform plugin "cocoa" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: cocoa, minimal, offscreen."

Any advice on how to proceed?

Best,
Dan

@DWilliamNaim
Copy link
Author

So I fixed the first problem by soft linking ROOT and the ini file. (Just included root and the 63Ni.ini in the bin folder). A bit of a work around till I find a better solution.

Still working on the gui.

Cheers

@DinkoAtanasov
Copy link

Hi,
concerning the Qt5 error: the GUI code is actually written in Qt4. Thus, even if you installed the PySide2 (Qt5) it would not work. I guess Leendert will commit his PySide2 file in the near future.
In the meantime try to install PySide instead. If you are working on Windows, I think it should be coming with anaconda2, but I am not sure as I don't use it often.
Dinko

@leenderthayen
Copy link
Owner

leenderthayen commented Apr 22, 2019

Regarding your failed library call: Your system cannot find the libCore.so library. There are two ways to proceed:

Find out where this library is located through
sudo find / --name libCore.so
and add the path to your LD_LIBRARY_PATH environment variable. For example, setting this in your .bashrc file.

The other way: the BSG library has both a static and dynamic component. By forcing CMake to use the statically linked libraries for the executables (by going into the CMakeLists.txt in the executables directory), and changing bsg to bsg_static and likewise for nme in the target_link_libraries() command, this will work as well.

@DWilliamNaim
Copy link
Author

Okay cheers, thank you guys. I appreciate the fast responses.

I got it to work and can now properly use the bsg_exec. Just waiting for that PySide2 file from Leendert to use the GUI code. In the mean time I will try installing PySide again. I simply brew installed it.

PS I am working with Mac OS.

@DWilliamNaim DWilliamNaim changed the title PySide2 issues with Qt5 PySide2 issues with Qt5 for GUI Apr 22, 2019
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

3 participants