{"id":407,"date":"2023-06-02T12:31:39","date_gmt":"2023-06-02T17:31:39","guid":{"rendered":"https:\/\/www.aa5sh.com\/?page_id=407"},"modified":"2024-10-25T13:04:44","modified_gmt":"2024-10-25T18:04:44","slug":"notes-on-building-wsjt-x-on-my-mac","status":"publish","type":"page","link":"https:\/\/www.aa5sh.com\/?page_id=407","title":{"rendered":"Notes on building WSJT-X on my Mac"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Building from Source on Apple Mac<\/h1>\n\n\n\n<p>You will need Xcode, MacPorts, HomeBrew, CMake and, Qt. The Xcode install<br>instructions are included in the MacPorts documentation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Xcode<\/h2>\n\n\n\n<p>There are two parts to install Xcode one is just to install from the Mac AppStore. Then also from<br>the command line from the MacPorts website to install needed Xcode utils run the following command<br>$ xcode-select &#8211;install<\/p>\n\n\n\n<p>You will need to agree to the Xcode license agreement by issuing the following command:<br>$ sudo xcodebuild -license<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HomeBrew<\/h2>\n\n\n\n<p>Install Homebrew with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ \/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"\n$ (echo; echo 'eval \"$(\/usr\/local\/bin\/brew shellenv)\"') &gt;&gt; \/Users\/michaelmorgan\/.zprofile\n$ eval \"$(\/usr\/local\/bin\/brew shellenv)\"<\/code><\/pre>\n\n\n\n<p>Then install the following:<br>$ brew install gcc@9<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MacPorts<\/h2>\n\n\n\n<p>Install MacPorts from instructions here:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;www.macports.org\/install.php<\/code><\/pre>\n\n\n\n<p>The ports that need to be installed are:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo port install autoconf\n$ sudo port install automake\n$ sudo port install libtool\n$ sudo port install pkgconfig\n$ sudo port install texinfo\n$ sudo port install fftw-3-single +gcc9\n$ sudo port install asciidoc\n$ sudo port install asciidoctor\n$ sudo port install libusb-devel\n$ sudo port install boost\n$ sudo port install qt5\n$ sudo port install qt5-qtmultimedia\n$ sudo port install qt5-qtwebsockets<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Hamlib<\/h2>\n\n\n\n<p>First fetch hamlib from the repository, in this case my fork of Hamlib<br>3 until the official repository has all the fixes we need:<\/p>\n\n\n\n<p>$ mkdir -p ~\/hamlib-prefix\/build<br>$ cd ~\/hamlib-prefix<br>$ git clone git:\/\/git.code.sf.net\/u\/bsomervi\/hamlib src<br>$ cd src<br>$ git checkout integration<br>$ .\/bootstrap<\/p>\n\n\n\n<p>The integration branch is my system testing branch which has all my<br>latest published changes.<\/p>\n\n\n\n<p>To build:<\/p>\n\n\n\n<p>$ cd ~\/hamlib-prefix\/build<br>$ ..\/src\/configure \\<br>&#8211;enable-static \\<br>&#8211;disable-shared \\<br>&#8211;disable-winradio \\<br>&#8211;prefix=$HOME\/hamlib-prefix \\<br>CFLAGS=&#8221;-g -O2 -mmacosx-version-min=10.7 -I\/opt\/local\/include&#8221; \\<br>LIBUSB_LIBS=&#8221;-L\/opt\/local\/lib -lusb-1.0&#8243;<br>$ make<br>$ make install-strip<\/p>\n\n\n\n<p>The above commands will build hamlib and install it into<br>~\/hamlib-prefix. If <code>make install-strip<\/code> fails, try <code>make install<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CMake<\/h2>\n\n\n\n<p>Download the latest CMake universal 64-bit DMG from<br>http:\/\/www.cmake.org\/download\/ open the DMG then drag and drop the<br>application bundle onto the supplied \/Applications link.<\/p>\n\n\n\n<p>To complete the install process you need to run the CMake-gui<br>application as root from a terminal shell as follows:<\/p>\n\n\n\n<p>$ sudo &#8220;\/Applications\/CMake.app\/Contents\/MacOS\/cmake&#8221; &#8211;install<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WSJT-X<\/h2>\n\n\n\n<p>First fetch the source from the repository:<\/p>\n\n\n\n<p>$ mkdir -p ~\/wsjtx-prefix\/build<br>$ cd ~\/wsjtx-prefix<br>$ svn checkout svn:\/\/svn.code.sf.net\/p\/wsjt\/wsjt\/branches\/wsjtx src<\/p>\n\n\n\n<p>*** For the improved version download the src from sourceforge and put<br>the files from the downloaded file in the src. In the compressed file<br>go to the src directory then put the files in wsjtx.tgz in the src<br>folder at cd ~\/wsjtx-prefix\/src<\/p>\n\n\n\n<p>this links to the Subversion repository in a read-only fashion, if you<br>intend to contribute to the project then you probably want to get a<br>developer login and use a read-write checkout. Even if you don&#8217;t it<br>can be upgraded at a later date.<\/p>\n\n\n\n<p>The checkout is of the latest code on the project trunk, i.e. the<br>development branch. You can easily switch the checkout to another<br>branch or even a tag if you want to build a prior published<br>generation. For now we will build the latest development sources. To<br>configure:<\/p>\n\n\n\n<p>$ cd ~\/wsjtx-prefix\/build<br>$ <\/p>\n\n\n\n<p>FC=\/usr\/local\/Cellar\/gcc@9\/9.5.0\/bin\/gfortran-9 \\<\/p>\n\n\n\n<p>&nbsp;&nbsp; cmake \\<\/p>\n\n\n\n<p>&nbsp;&nbsp; -D CMAKE_PREFIX_PATH=&#8221;\/opt\/local\/libexec\/qt5;~\/hamlib-prefix;\/opt\/local&#8221; \\<\/p>\n\n\n\n<p>&nbsp;&nbsp; -D CMAKE_INSTALL_PREFIX=~\/wsjtx-prefix \\<\/p>\n\n\n\n<p>&nbsp;&nbsp; -D CMAKE_OSX_SYSROOT=\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/MacOSX.platform\/Developer\/SDKs\/MacOSX13.sdk \\<\/p>\n\n\n\n<p>&nbsp;&nbsp; ~\/wsjtx-prefix\/src<\/p>\n\n\n\n<p>Substitute the Mac OS X SDK version you have installed in the above<br>command if you have a different version from 10.11.<\/p>\n\n\n\n<p>Also make sure the paths for FC is correct also.<\/p>\n\n\n\n<p>The CMAKE_PREFIX_PATH variable specifies where CMake should look first<br>for other packages, the two elements may be different depending where<br>you have installed Qt and what version you have (~\/local\/qt-macx-clang<br>if you have built Qt from sources as described above in the Qt<br>section) and where you installed Hamlib (i.e. the &#8211;prefix configure<br>option above in the Hamlib section).<\/p>\n\n\n\n<p>If you already have the fftw3-dev package installed on your system it<br>may well get selected in preference to the one you built above in the<br>MacPorts installation. It is unlikely that a prior installation of<br>libfftw3f is correctly configured for use in a WSJT-X package, the<br>CMAKE_PREFIX_PATH above is augmented with the MacPorts installation<br>location (\/opt\/local) to ensure the correct libfftw3f.dylib and<br>headers are located.<\/p>\n\n\n\n<p>To build:<\/p>\n\n\n\n<p>$ cmake &#8211;build .<br>$ cmake &#8211;build . &#8211;target install<\/p>\n\n\n\n<p>which installs the WSJT-X application bundle into ~\/wsjtx-prefix<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Updating and Rebuilding Hamlib<\/h1>\n\n\n\n<p>From time to time new fixes will be pushed to the Hamlib fork<br>repository integration branch. To pick them up type:<\/p>\n\n\n\n<p>$ cd ~\/hamlib-prefix\/src<br>$ git pull<\/p>\n\n\n\n<p>*** If using improved version download the updated src files like above.<\/p>\n\n\n\n<p>To rebuild hamlib with the changed sources:<\/p>\n\n\n\n<p>$ cd ~\/hamlib-prefix\/build<br>$ make<br>$ make install-strip<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Updating and Rebuilding WSJT-X<\/h1>\n\n\n\n<p>To update to the latest sources type:<\/p>\n\n\n\n<p>$ cd ~\/wsjtx-prefix\/src<br>$ svn update<br>$ cd ~\/wsjtx-prefix\/build<br>$ cmake &#8211;build .<br>$ cmake &#8211;build . &#8211;target install<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Building from Source on Apple Mac You will need Xcode, MacPorts, HomeBrew, CMake and, Qt. The Xcode installinstructions are included in the MacPorts documentation. Xcode There are two parts to install Xcode one is just to install from the Mac AppStore. Then also fromthe command line from the MacPorts website to install needed Xcode utils &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.aa5sh.com\/?page_id=407\" class=\"more-link\">Read more<span class=\"screen-reader-text\"> &#8220;Notes on building WSJT-X on my Mac&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":72,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inspiro_hide_title":false,"footnotes":""},"class_list":["post-407","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.aa5sh.com\/index.php?rest_route=\/wp\/v2\/pages\/407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aa5sh.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.aa5sh.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.aa5sh.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aa5sh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=407"}],"version-history":[{"count":2,"href":"https:\/\/www.aa5sh.com\/index.php?rest_route=\/wp\/v2\/pages\/407\/revisions"}],"predecessor-version":[{"id":413,"href":"https:\/\/www.aa5sh.com\/index.php?rest_route=\/wp\/v2\/pages\/407\/revisions\/413"}],"up":[{"embeddable":true,"href":"https:\/\/www.aa5sh.com\/index.php?rest_route=\/wp\/v2\/pages\/72"}],"wp:attachment":[{"href":"https:\/\/www.aa5sh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}