docbrown1955 / marty-public

Calculation of tree-level and one-loop Feynman diagrams Beyond the Standard Model
https://marty.in2p3.fr
GNU General Public License v3.0
18 stars 5 forks source link

grafed-gui graphs.json >&/dev/null #29

Closed Arvendui closed 2 years ago

Arvendui commented 2 years ago

When, following the tutorial I try to display the Feynman rules, auto rules = toyModel.getFeynmanRules();Show(rules);I get grafed-gui graphs.json >&/dev/null

docbrown1955 commented 2 years ago

Could you tell me what happens when you launch

grafed-gui graphs.json >/dev/null 2>&1 & sleep 1

GRAFED should launch and display no output in the terminal, And you should get back the command line after a second without closing the window.

If this works I will change the behavior (for now the command only works on Linux apparently, the one above should work also on MacOS)

Arvendui commented 2 years ago

Could you tell me what happens when you launch

grafed-gui graphs.json >/dev/null 2>&1 & sleep 1

GRAFED should launch and display no output in the terminal, And you should get back the command line after a second without closing the window.

If this works I will change the behavior (for now the command only works on Linux apparently, the one above should work also on MacOS)

[1] 78895 [1]+ Abort trap: 6 grafed-gui graphs.json > /dev/null 2>&1 and no window opens

docbrown1955 commented 2 years ago

Do you have grafed-gui in the path ? /usr/local/bin should be in the $PATH variable

Arvendui commented 2 years ago

Do you have grafed-gui in the path ? /usr/local/bin should be in the $PATH variable

I am a bit confused by what should I check....

docbrown1955 commented 2 years ago

If you do

echo $PATH

the /usr/local/bin should appear

docbrown1955 commented 2 years ago

Otherwise you have to

export PATH=$PATH:/usr/local/bin

(and copy the line in your ${HOME}/.bashrc file for all the next times

Arvendui commented 2 years ago

If you do

echo $PATH

the /usr/local/bin should appear

I get /opt/local/bin:/opt/local/sbin:/opt/anaconda3/bin:/opt/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Applications/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin so it seems that I do?

docbrown1955 commented 2 years ago

Yes. And is there the /usr/local/bin/grafed-gui executable ? If yes just try to launch it

/usr/local/bin/grafed-gui graphs.json
Arvendui commented 2 years ago
/usr/local/bin/grafed-gui graphs.json

there is, and when I run the command you suggested, I get dyld[79130]: Library not loaded: @rpath/libQt5PrintSupport.5.dylib Referenced from: /usr/local/bin/grafed-gui Reason: tried: '/usr/local/lib/libQt5PrintSupport.5.dylib' (no such file), '/usr/lib/libQt5PrintSupport.5.dylib' (no such file) Abort trap: 6

which again seems an issue of Qt5

docbrown1955 commented 2 years ago

Ok I see. You should locate these Qt libraries and add their path to the DYLD_LIBRARY_PATH (with a export as for the other variables, and put this in the .bashrc also)

docbrown1955 commented 2 years ago

When you executed the example, did the program continued to run after Show() ?

Arvendui commented 2 years ago

When you executed the example, did the program continued to run after Show() ?

Yes it does

docbrown1955 commented 2 years ago

When you executed the example, did the program continued to run after Show() ?

Yes it does

Ok so at least it is not blocking, you just cannot see the graphs.

Arvendui commented 2 years ago

DYLD_LIBRARY_PATH

echo $DYLD_LIBRARY_PATH does not return any path

Arvendui commented 2 years ago

When you executed the example, did the program continued to run after Show() ?

Yes it does

Ok so at least it is not blocking, you just cannot see the graphs.

exactly

docbrown1955 commented 2 years ago

Maybe you can see this issue that addresses the same problem

Arvendui commented 2 years ago

running locate libQt5PrintSupport (which is the library it cannot find), returns paths /opt/anaconda3/lib/libQt5PrintSupport.5.9.7.dylib. How can I add this path? (or also /usr/local/anaconda3/lib/libQt5PrintSupport.5.dylib)

docbrown1955 commented 2 years ago

You can try

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/anaconda3/lib/
Arvendui commented 2 years ago

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/anaconda3/lib/ got the job done

docbrown1955 commented 2 years ago

Perfect!