MacOS 版 Gowin EDAのインストール
Gowin EDA V1.9.10.3 Education が、MacOS に対応したとのことで、インストールしてみましたが、かなり手こずったので記録に残します。
インストールファイルのダウンロード
GOWIN Semiconductor のサイトから、インストールファイルをダウンロードします。ユーザ登録が必要です。
tar.gzの展開
% tar -xzf Gowin_V1.9.10.03_Education_macOS.tar.gz
IDE と Programmer フォルダにファイルが展開されます。
├── IDE
│ ├── bin
│ ├── data
│ ├── doc
│ ├── ipcore
│ ├── lib
│ ├── plugins
│ ├── share
│ └── simlib
└── Programmer
└── bin
拡張属性の削除
gw_ide を実行すると、セキュリティチェックに引っ掛かります。
xattr コマンドで拡張属性を削除します。
% sudo xattr -cr *
ライブラリパスの設定
$ORIGIN がうまく展開できずライブラリが見つかりません。
% IDE/bin/gw_ide
dyld[11713]: Library not loaded: @rpath/libIDE.dylib
Referenced from: <D769C60A-D82C-324E-9BD6-9FCEF33ACA70> /Users/atsushi/Projects/TangNano/ide/gowineda/IDE/bin/gw_ide
Reason: tried: '$ORIGIN:$ORIGIN/../lib/libIDE.dylib' (no such file), '$ORIGIN:$ORIGIN/../lib/libIDE.dylib' (no such file), '/usr/local/lib/libIDE.dylib' (no such file), '/usr/lib/libIDE.dylib' (no such file, not in dyld cache)
zsh: abort IDE/bin/gw_ide
install_name_tool で、rpath を追加します。
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gw_ide
Tcl.Framework パスの設定
GUI 画面が起動するようになりましたが、Tcl.Framework の参照先が /Library 決め打ちになっているので変更します。
% install_name_tool -change "/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl" "@rpath/Tcl.framework/Versions/8.6/Tcl" IDE/plugins/ide/libGAOIns.dylib
% install_name_tool -add_rpath "@loader_path/../../lib" IDE/plugins/ide/libGAOIns.dylib
他のコマンドのパス変更
Synthesize を実行すると、$ORIGIN で引っ掛かります。
IDE/bin にある、サブコマンドの rpath を設定します。
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/Assistant
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/GowinSynthesis
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/floorplanner
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gao_analyzer
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gao_sh
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gvio_analyzer
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gvio_sh
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gw_ctrl_reg
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gw_fsrst_gui
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gw_pkgviewer
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gw_sdceditor
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/gw_sh
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/hierarchy
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/nlsresource
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/license_config_gui
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/rtlHierTest
% install_name_tool -add_rpath "@loader_path/../lib" IDE/bin/vlg_pp
Tcl のパスも変更します。
% install_name_tool -change "/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl" "@rpath/Tcl.framework/Versions/8.6/Tcl" IDE/bin/GowinSynthesis
% install_name_tool -change "/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl" "@rpath/Tcl.framework/Versions/8.6/Tcl" IDE/bin/gw_sdceditor
% install_name_tool -change "/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl" "@rpath/Tcl.framework/Versions/8.6/Tcl" IDE/bin/gw_sh
% install_name_tool -change "/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl" "@rpath/Tcl.framework/Versions/8.6/Tcl" IDE/bin/hierarchy
% install_name_tool -change "/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl" "@rpath/Tcl.framework/Versions/8.6/Tcl" IDE/bin/nlsresource
% install_name_tool -change "/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl" "@rpath/Tcl.framework/Versions/8.6/Tcl" IDE/bin/rtlHierTest
% install_name_tool -change "/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl" "@rpath/Tcl.framework/Versions/8.6/Tcl" IDE/bin/vlg_pp
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/plugins/ide/libCoreGen.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/plugins/ide/libFpgaPrj.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/plugins/ide/libGAOIns.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/plugins/ide/libGPC.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/plugins/ide/libGVIO.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/plugins/ide/libRtlGAOIns.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/plugins/ide/libTextEditor.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/lib/libGWTE.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/lib/libNlsData.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/lib/libNlsUtils.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/lib/libgwsyn.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/lib/libhdlresolve.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/lib/libnetcatcher.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/lib/librtlhierarchy.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/lib/librtlparser.dylib
% install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @rpath/Tcl.framework/Versions/8.6/Tcl IDE/lib/librtlviewer.dylib
Qt のパス変更
Synthesize は実行できるようになりましたが、Design Summary が表示されません。
ヘルパーアプリの Qt のパスを設定します。
% install_name_tool -add_rpath "@loader_path/../../../../../" IDE/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
Design Summary が表示されるようになりました。
libcrypto パスの変更
libcrypto.3 が homebrew でインストールされるパスになっているので書き換えます。
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/bin/gw_ide
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/bin/GowinSynthesis
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/bin/gw_sdceditor
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/bin/gw_sh
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/bin/hierarchy
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/bin/nlsresource
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/bin/rtlHierTest
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/bin/vlg_pp
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/lib/libGWTE.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/lib/libGowinProxy.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/lib/libNlsData.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/lib/libNlsUtils.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/lib/libgowin.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/lib/libgwsyn.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/plugins/ide/libCoreGen.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/plugins/ide/libFpgaPrj.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/plugins/ide/libGAOIns.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/plugins/ide/libGPC.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/plugins/ide/libGVIO.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/plugins/ide/libRtlGAOIns.dylib
% install_name_tool -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib IDE/plugins/ide/libTextEditor.dylib
もっと簡単な方法
これを自動化して、.app にまでしてくれるスクリプトを作った方がいます。