ra3xdh / qucs_s

Qucs-S is a circuit simulation program with Qt-based GUI
https://ra3xdh.github.io/
GNU General Public License v2.0
750 stars 101 forks source link

MacOS installed qucs-s not working #794

Closed bnilsson11 closed 1 day ago

bnilsson11 commented 2 days ago

I'm trying to build and install qucs-s 24.2.1 from source. The installed version (/usr/local/bin/qucs-s.app) is not working under MacOS Version 14.5 (23F79).

process:

git clone https://github.com/ra3xdh/qucs_s

Building the source using

cd qucs-s
mkdir builddir
cd builddir
cmake ..
make
make install

runs without errors. I am using Xcode and MacPorts for the "infrastructure" including cmake and Qt5.

However, the installed /usr/local/bin/qucs.s.app exits immediately. Starting from terminal in qucs-s.app/Contents/MacOS/ gives:

@MacStudio MacOS % ./qucs-s
Warning: Could not find the Qt platform plugin "cocoa" in "" (:0, )
Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
 (:0, )
zsh: abort      ./qucs-s

The installed qucs-s.app contains a Frameworks folder with the necessary libraries for standalone operation including the Qt libs. The built/not_yet_installed qucs-s.app in qucs-s/builddir/qucs does not have this Frameworks folder and runs without problems. I assume the final deployment process fails in some way.

I have applied a workaround by copying the built app without Frameworks to /usr/local/bin and use this instead. So far it seems to work, but there may be some things not working that I have not discovered yet.

ra3xdh commented 2 days ago

Unfortunately I cannot suggest anything useful for Mac, because I have no access to Mac hardware and not using this platform. @dsm is using Mac as the development platform and may suggest how to build and run application on Mac. The answer may take a while. Please wait.

@dsm, Could you suggest something? Maybe a some obvious step is missing.

dsm commented 2 days ago

I'm able to building and running latest version of qucs_s on macos 14 arm64 version.

I will sent .app file to as soon as possible to accesssing my macbook and I will improve macos ci to release mac version.

I have one issue all qucs tools install to Application folder but not able to run inside qucs_s ex: qucs activefilter issue related to calling path wrong changing path solve this issue or combine all exe to one .app file how should we solve I am not sure.

dsm commented 2 days ago

I'm not using make install I just copy the .app to Application folder and I am building with homebrew-qt6

dsm commented 2 days ago

can you try this it includes all tools and built with qt 6.7.0, I use make install DESTDIR=./deploy and it stop with error and .app file don't run and I run /opt/homebrew/Cellar/qt/6.7.0_1/bin/macdeployqt qucs-s.app -always-overwrite do this also for other .app and everything works fine and it doesn't find examples folder I solve this later.

qucs_latest.dmg

dsm commented 2 days ago

after installing qucs-s, please run this command: xattr -c /Applications/qucs-s.app

bnilsson11 commented 2 days ago

I built the latest qucs-s earlier today. I followed your advice but for my MacPorts environment:

cd qucs-s/builddir/qucs /opt/local/libexec/qt5/bin/macdeployqt qucs-s.app

and now all is working, thank you very much. But as you comment, there are no examples. So, this issue is partially solved.

dsm commented 2 days ago

I didn't try macports, our CI use homebrew. Can you try provided dmg file to install qucs_s.

Refactoring needed some section of the cmake file for deploying mac app without an issue.

Maybe qucs_s tools install seperatly in a folder inside /Applications folder, we should found a optimal way to this.

App don't run my machine to download provided dmg file without xattr, I'll solve this and update mac os CI to finally we have macos release every commit.

Issue should still remain open. I'll try to solve all.

bnilsson11 commented 2 days ago

I tried to run the app it as-is, and my system reported that it is damaged and should be put in the bin. Then I did "xattr -c qucs-s.app". I tried to run it, but this time it exited unexpectedly. Crash report says: Exception Type: EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid)) Exception Codes: UNKNOWN_0x32 at 0x000000010186c000 Exception Codes: 0x0000000000000032, 0x000000010186c000

Termination Reason: Namespace CODESIGNING, Code 2 Invalid Page

dsm commented 2 days ago

I tried this two in a virtual machine and all works, can you try this codesign --force --deep --sign - /Applications/qucs-s.app and this(optional) xattr -cr /Applications/qucs-s.app without this you have to run qucs-s.app in a finder

dsm commented 2 days ago

the toolbar may be invisible on first startup, it is fixed when you close and open it from the view menu.

bnilsson11 commented 1 day ago

Now it works, thank you very much.

2 juli 2024 kl. 22:06 skrev Muhammet Şükrü Demir @.***>:

I tried this two in a virtual machine and all works, can you try this codesign --force --deep --sign - /Applications/qucs-s.app and this xattr -cr /Applications/qucs-s.app

— Reply to this email directly, view it on GitHub https://github.com/ra3xdh/qucs_s/issues/794#issuecomment-2204291876, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZXLDX44LRQ5XEEUXLFYNTZKMB47AVCNFSM6AAAAABKHTLFD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBUGI4TCOBXGY. You are receiving this because you authored the thread.

Bengt Nilsson Ansåsvägen 8 43853 Hindås Sweden @.***

ra3xdh commented 1 day ago

Closing as completed. Thanks @dsm !

bnilsson11 commented 1 day ago

Did you try “make install” successfully?MvhBengt NilssonSkickat från min iPhone3 juli 2024 kl. 11:57 skrev Vadim Kuznetsov @.***>: Closing as completed. Thanks @dsm !

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

dsm commented 1 day ago

make install not working properly, some cmake files not prepare good, I think make install should be use deploy purpose. now I am preparing Macos Release via github actions and I manually packed app bundle, I have to solve some minor issue and maybe make install removed for macos.

bnilsson11 commented 1 day ago

If you make a macos release bundle, please take a look at “About qucs-s”.Now it only shows the mandatory Qt info. There is nothing about which qucs-s version is running.The standard way would be one “about Qt” and one “about qucs-s”.As far as I can tell, there is no way now to know which version you have.MvhBengt NilssonSkickat från min iPhone 3 juli 2024 kl. 12:43 skrev Muhammet Şükrü Demir @.***>: make install not working properly, some cmake files not prepare good, I think make install should be use deploy purpose. now I am preparing Macos Release via github actions and I manually packed app bundle, I have to solve some minor issue and maybe make install removed for macos.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

dsm commented 1 day ago

thank you I look into this. can you test this ci build. qucs_s_macos_arm64

bnilsson11 commented 1 day ago

The app opens ok, but the system device libraries are missing if the app is placed in /Applications or anywhere else. The system libraries become visible again if the app is placed in /usr/local/bin.

The libs are placed in /usr/local/share/qucs-s/library on my system. If this is the correct location I cannot see how ”make install” can be omitted.

BTW, app ”Overview” shows the version info. I discovered this by chance, not the expected method to get the usual app info.

3 juli 2024 kl. 12:58 skrev Muhammet Şükrü Demir @.***>:

thank you I look into this. can you test this ci build. qucs_s_macos_arm64 https://github.com/dsm/qucs_s/actions/runs/9776381750/artifacts/1663466625 — Reply to this email directly, view it on GitHub https://github.com/ra3xdh/qucs_s/issues/794#issuecomment-2205796756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZXLDRI7JO625FJYGTXN7LZKPKN7AVCNFSM6AAAAABKHTLFD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBVG44TMNZVGY. You are receiving this because you authored the thread.

Bengt Nilsson Ansåsvägen 8 43853 Hindås Sweden @.***

bnilsson11 commented 1 day ago

Compare the old qucs, where About.. is designed in the standard way.

 

3 juli 2024 kl. 12:58 skrev Muhammet Şükrü Demir @.***>:

thank you I look into this. can you test this ci build. qucs_s_macos_arm64 https://github.com/dsm/qucs_s/actions/runs/9776381750/artifacts/1663466625 — Reply to this email directly, view it on GitHub https://github.com/ra3xdh/qucs_s/issues/794#issuecomment-2205796756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZXLDRI7JO625FJYGTXN7LZKPKN7AVCNFSM6AAAAABKHTLFD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBVG44TMNZVGY. You are receiving this because you authored the thread.

Bengt Nilsson Ansåsvägen 8 43853 Hindås Sweden @.***

dsm commented 1 day ago

qucs_s/library and examples should be bundled in .app file and paths should be modified.

dsm commented 1 day ago

797 is a dedicated issue for macos improvements we can continue there.