diff options
Diffstat (limited to 'INSTALL')
| -rw-r--r-- | INSTALL | 253 |
1 files changed, 150 insertions, 103 deletions
@@ -43,26 +43,34 @@ the libfftw library development package. Normally installing the library development package pulls in all the FFTW v3 libraries including the single precision variant. +The Hamlib library optionally requires the libusb-1.0 library, if the +development version (libusb-1.0-dev) is available Hamlib will +configure its custom USB device back end drivers. Most rigs do not +require this so normally you can choose not to install libusb-1.0-dev +but if you have a SoftRock USB or similar SDR that uses a custom USB +interface then it is required. + The Hamlib library is required. Currently WSJT-X needs to be built using a forked version of the Hamlib git master. This fork contains patches not yet accepted by the Hamlib development team which are essential for correct operation of WSJT-X. To build the Hamlib fork from sources something like the following recipe should suffice: - mkdir ~/hamlib-prefix - cd ~/hamlib-prefix - git clone git://git.code.sf.net/u/bsomervi/hamlib src - cd src - git checkout integration - mkdir ../build - cd ../build - ../src/autogen.sh --prefix=$HOME/hamlib-prefix \ - --disable-shared --enable-static \ - --without-cxx-binding --disable-winradio \ - CFLAGS="-fdata-sections -ffunction-sections" \ - LDFLAGS="-Wl,--gc-sections" - make - make install +$ mkdir ~/hamlib-prefix +$ cd ~/hamlib-prefix +$ git clone git://git.code.sf.net/u/bsomervi/hamlib src +$ cd src +$ git checkout integration +$ ./bootstrap +$ mkdir ../build +$ cd ../build +$ ../src/configure --prefix=$HOME/hamlib-prefix \ + --disable-shared --enable-static \ + --without-cxx-binding --disable-winradio \ + CFLAGS="-g -O2 -fdata-sections -ffunction-sections" \ + LDFLAGS="-Wl,--gc-sections" +$ make +$ make install-strip This will build a binary hamlib package located at ~/hamlib-prefix so you will need to add that to your CMAKE_PREFIX_PATH variable in your @@ -76,26 +84,26 @@ project's subversion repository. The project svn repository has a non-standard layout in that the WSJT-X project is not on the trunk, instead the main code line is in a branch at ^/branches/wsjtx - mkdir -p ~/wsjtx-prefix/build - cd ~/wsjtx-prefix - svn checkout svn://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx src +$ mkdir -p ~/wsjtx-prefix/build +$ cd ~/wsjtx-prefix +$ svn checkout svn://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx src To build WSJT-X you will need CMake and asciidoc installed. - cd ~/wsjtx-prefix/build - cmake -D CMAKE_PREFIX_PATH=~/hamlib-prefix ../src - cmake --build . - cmake --build . --target install +$ cd ~/wsjtx-prefix/build +$ cmake -D CMAKE_PREFIX_PATH=~/hamlib-prefix ../src +$ cmake --build . +$ cmake --build . --target install The recipe above will install into /usr by default, if you wish to install in you own directory you can add a prefix-path to the configure step like: - cd ~/wsjtx-prefix/build - cmake -D CMAKE_PREFIX_PATH=~/hamlib-prefix \ - -D CMAKE_INSTALL_PREFIX=~/wsjtx-prefix ../src - cmake --build . - cmake --build . --target install +$ cd ~/wsjtx-prefix/build +$ cmake -D CMAKE_PREFIX_PATH=~/hamlib-prefix \ + -D CMAKE_INSTALL_PREFIX=~/wsjtx-prefix ../src +$ cmake --build . +$ cmake --build . --target install this will install WSJT-X at ~/wsjtx-prefix. @@ -115,6 +123,13 @@ the JT-SDK the following recipe should help. Reasons for building Hamlib from source might include picking up the very latest patches or building a different branch that you wish to contribute to. +Hamlib optionally depends upon libusb-1.0, see "Building from Source" +above for more details. If you wish to include support for the +optional custom USB Hamlib rig drivers then you must install +libusb-1.0 before building Hamlib. The package may be obtained from +http://libusb.info/, install it in a convenient location like +C:\Tools. + On Windows there is a complication in that the compilers used to build Qt and WSJT-X are the MinGW ones bundled with the Qt package but Hamlib needs to be build from an MSYS shell with the tools required to @@ -126,26 +141,32 @@ Hamlib build recipe is something like: In an MSYS shell:- - mkdir ~/hamib-prefix - cd ~/hamlib-prefix - git clone git://git.code.sf.net/u/bsomervi/hamlib src - cd src - git checkout integration - mkdir ../build - cd ../build - ../src/autogen.sh --prefix=$HOME/hamlib-prefix \ - --disable-shared --enable-static \ - --without-cxx-binding --disable-winradio \ - CC=<path-to-Qt-MinGW-tools>/gcc \ - CXX=<path-to-Qt-MinGW-tools>/g++ \ - CFLAGS="-fdata-sections -ffunction-sections" \ - LDFLAGS="-Wl,--gc-sections" - make - make install +$ mkdir ~/hamib-prefix +$ cd ~/hamlib-prefix +$ git clone git://git.code.sf.net/u/bsomervi/hamlib src +$ cd src +$ git checkout integration +$ ./bootstrap +$ mkdir ../build +$ cd ../build + ../src/configure --prefix=$HOME/hamlib-prefix \ + --disable-shared --enable-static \ + --without-cxx-binding --disable-winradio \ + CC=<path-to-Qt-MinGW-tools>/gcc \ + CXX=<path-to-Qt-MinGW-tools>/g++ \ + CFLAGS="-g -O2 -fdata-sections -ffunction-sections -I<path-to-libusb-1.0>/include" \ + LDFLAGS="-Wl,--gc-sections" \ + LIBUSB_LIBS="-L<path-to-libusb-1.0>/MinGW32/dll -lusb-1.0" +$ make +$ make install NOTE: <path-to-Qt-MinGQ-tools> should be substituted with the actual path to your Qt bundled tools e.g on my system it is -C:\Tools\Qt\Tools\mingw48_32\bin +C:\Tools\Qt\Tools\mingw530_32\bin + +NOTE: <path-to-libusb-1.0> should be substituted with the actual path +to your libusb-1.0 installation directory e.g. on my system it is +C:\Tools\libusb-1.0.20 This will leave a Hamlib binary package installed at c:/Users/<user-name>/hamlib-prefix which is what needs to be on your @@ -185,15 +206,16 @@ automake libtool pkgconfig texinfo -gcc49 -fftw-3-single +gcc49 +gcc5 +fftw-3-single +gcc5 asciidoc +libusb-devel -These are install by typing: +These are installed by typing: - sudo port install autoconf automake \ - libtool pkgconfig texinfo gcc49 asciidoc \ - fftw-3-single +gcc49 +$ sudo port install autoconf automake \ + libtool pkgconfig texinfo gcc5 asciidoc \ + fftw-3-single +gcc5 libusb-devel Once complete you should have all the tools required to build WSJT-X. @@ -209,43 +231,51 @@ Hamlib First fetch hamlib from the repository, in this case my fork of Hamlib 3 until the official repository has all the fixes we need: - mkdir -p ~/hamlib-prefix/build - cd ~/hamlib-prefix - git clone git://git.code.sf.net/u/bsomervi/hamlib src - cd src - git checkout integration +$ mkdir -p ~/hamlib-prefix/build +$ cd ~/hamlib-prefix +$ git clone git://git.code.sf.net/u/bsomervi/hamlib src +$ cd src +$ git checkout integration +$ ./bootstrap The integration branch is my system testing branch which has all my latest published changes. -You need to make one small change to the sources to build on OS X -using the MacPorts tools, here is a sed command to make the change: - - sed -i.orig '/libtoolize/s/lib/glib/' autogen.sh - To build: - cd ~/hamlib-prefix/build - ../src/hamlib/autogen.sh \ - --enable-static \ - --disable-shared \ - --disable-winradio \ - --prefix=$HOME/hamlib-prefix - make - make install-strip +$ cd ~/hamlib-prefix/build +$ ../src/configure \ + --enable-static \ + --disable-shared \ + --disable-winradio \ + --prefix=$HOME/hamlib-prefix \ + CFLAGS="-g -O2 -mmacosx-version-min=10.7 -I/opt/local/include" \ + LIBUSB_LIBS="-L/opt/local/lib -lusb-1.0" +$ make +$ make install-strip -The above commands will build hamlib and install it into ~/hamlib-prefix +The above commands will build hamlib and install it into +~/hamlib-prefix. If `make install-strip` fails, try `make install`. Qt -- -The binary Qt distributions from http://www.qt.io/download -unfortunately are built to use the libstdc++ C++ support library, -WSJT-X uses a less geriatric C++ dialet which uses the libc++ C++ -support library. This means that you need to build Qt from -sources. This is not difficult but does take some time. -Download the Qt source tar ball from +NOTE: As of Qt v5.4 building Qt from source on Mac OS X is no longer +necessary since the Qt team have switched to using the modern libc++ +Standard C++ Library for all distributable run time +components. Instead you may simply download a binary installer for OS +X 64-bit. The binary installer is here: + + http://www.qt.io/download + +The binary Qt distributions prior to Qt v5.4 from +http://www.qt.io/download unfortunately are built to use the libstdc++ +C++ support library, WSJT-X uses a less geriatric C++ dialect which +uses the libc++ C++ support library. This means that you need to +build Qt from sources. This is not difficult but does take some time. + +Download the Qt source tarball from http://www.qt.io/download-open-source/, the link is about half way down the page, you want the full sources tar ball shown as a 'tar.gz' link. @@ -279,22 +309,34 @@ Fetch the latest CMake universal 64-bit DMG from http://www.cmake.org/download/ open the DMG then drag and drop the application bundle onto the supplied /Applications link. -To complete the install process you need to run the CMake application -as root from a terminal shell: +To complete the install process you need to run the CMake-gui +application as root from a terminal shell as follows: + +$ sudo "/Applications/CMake.app/Contents/MacOS/cmake" --install + +that installs the CMake command line tools which you can verify by +typing into a terminal window: - sudo /Applications/CMake.app/Contents/MacOS/CMake +$ cmake --version -in the CMake application choose "Tools->Install For Command Line Use" -from the menu and then click the "Install Command Line Links". +If the install command above fails with a "No such file or directory" +error, that probably means that /usr/local/bin does not exist. You can +create it correctly with the following commands: + +$ sudo mkdir -p /usr/local/bin +$ sudo chmod 755 /usr/local/bin +$ sudo chgrp wheel /usr/local/bin + +and then retry the install command. WSJT-X ------ First fetch the source from the repository: - mkdir -p ~/wsjtx-prefix/build - cd ~/wsjtx-prefix - svn checkout svn://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx src +$ mkdir -p ~/wsjtx-prefix/build +$ cd ~/wsjtx-prefix +$ svn checkout svn://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx src this links to the Subversion repository in a read-only fashion, if you intend to contribute to the project then you probably want to get a @@ -307,18 +349,23 @@ branch or even a tag if you want to build a prior published generation. For now we will build the latest development sources. To configure: - cd ~/wsjtx-prefix/build - FC=gfortran-mp-4.9 \ - cmake \ - -D CMAKE_PREFIX_PATH="~/local/qt-macx-clang;~/hamlib-prefix;/opt/local" \ - -D CMAKE_INSTALL_PREFIX=~/wsjtx-prefix \ - ~/wsjtx-prefix/src +$ cd ~/wsjtx-prefix/build +$ FC=gfortran-mp-5 \ + cmake \ + -D CMAKE_PREFIX_PATH="~/Qt/5.7/clang_64;~/hamlib-prefix;/opt/local" \ + -D CMAKE_INSTALL_PREFIX=~/wsjtx-prefix \ + -D CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk \ + ~/wsjtx-prefix/src + +Substitute the Mac OS X SDK version you have installed in the above +command if you have a different version from 10.11. The CMAKE_PREFIX_PATH variable specifies where CMake should look first for other packages, the two elements may be different depending where -you have installed Qt and what version you have and where you -installed Hamlib (i.e. the --prefix configure option above in the -hamlib section). +you have installed Qt and what version you have (~/local/qt-macx-clang +if you have built Qt from sources as described above in the Qt +section) and where you installed Hamlib (i.e. the --prefix configure +option above in the Hamlib section). If you already have the fftw3-dev package installed on your system it may well get selected in preference to the one you built above in the @@ -330,8 +377,8 @@ headers are located. To build: - cmake --build . - cmake --build . --target install +$ cmake --build . +$ cmake --build . --target install which installs the WSJT-X application bundle into ~/wsjtx-prefix @@ -342,14 +389,14 @@ Updating and Rebuilding Hamlib From time to time new fixes will be pushed to the Hamlib fork repository integration branch. To pick them up type: - cd ~/hamlib-prefix/src - git pull +$ cd ~/hamlib-prefix/src +$ git pull To rebuild hamlib with the changed sources: - cd ~/hamlib-prefix/build - make - make install-strip +$ cd ~/hamlib-prefix/build +$ make +$ make install-strip Updating and Rebuilding WSJT-X @@ -357,11 +404,11 @@ Updating and Rebuilding WSJT-X To update to the latest sources type: - cd ~/wsjtx-prefix/src - svn update - cd ~/wsjtx-prefix/build - cmake --build . - cmake --build . --target install +$ cd ~/wsjtx-prefix/src +$ svn update +$ cd ~/wsjtx-prefix/build +$ cmake --build . +$ cmake --build . --target install 73 |
