On 24/09/2014 15:05, Joe Taylor wrote:
> Hi Bill,
Hi Joe,
>
> Some feedback on your build procedure for hamlib on Windows.
>
> I followed your suggested procedure:
>
>> 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
> Since I have Greg's JTSDK-QT installed, for "<path-to-Qt-MinGW-tools>" I
> substituted "C:/JTSDK-QT/qt5/Tools/mingw48_32/bin".
OK, that's correct.
>
>> this will leave a hamlib binary package installed at
>> c:/Users/<user-name>/hamlib-prefix which is what needs to be on your
>> CMAKE_PREFIX_PATH. On Windows you almost certainly will be using a CMake
>> toolchain file and this is where you will need to specify the hamlib
>> binary location as one of the paths in CMAKE_PREFIX_PATH.
> Both "make" and "make install" ran to completion without errors.
> I find no hamlib binary package installed at
> c:/Users/<user-name>/hamlib-prefix :
>
> joe@phy-joe ~/hamlib_g4wjs
> $ ls -l
> total 24
> drwxr-xr-x 50 joe Administrators  8192 Sep 24 09:11 build
> drwxr-xr-x 58 joe Administrators 16384 Sep 24 09:05 src
>
> However, I do find libhamlib.a and libhamlib.la in
> .../build/src/.libs, and after copying them to their normal location in
> Greg's JTSDK-QT, WSJT-X seems to build correctly.  (The build was,
> however, using the old (4/2/2014) include files, and perhaps other parts
> of the April 2014 build of hamlib.)
OK. That is the pre-install location. You need the install location 
because it puts the configured PkgConfig files there as well as the 
library. The PkgConfig file (<install-prefix>/lib/pkgconfig/hamlib.pc) 
is required for the WSJT-X build to correctly locate and link the hamlib 
static library.

So if the 'make install' worked without error then I suggest that the 
install prefix was not where you thought it was. The install prefix is 
set in the configure command line (in this case autogen.sh which passes 
it to configure) as the --prefix argument. If you review your command 
history in MSYS you should be able to check what you actually specified 
as the install prefix.

My example uses a structure like:

~/hamlib-prefix
     |
     +--------------------src
     |
     +--------------------build

where the source is checked out (cloned from git) into ~/hamlib-prefix/src,
the configure (autogen.sh) and the build (make) are run in 
~/hamlib-prefix/build,
with the products of the install phase going into ~/hamlib-prefix.

So after a successful build you should have:

~/hamlib-prefix
     |
     +--------------------src
     |
     +--------------------build
     |
     +--------------------bin
     |
     +--------------------lib
     |
     +--------------------include
     |
     +--------------------share
and a few other deeper sub-directories.
>
> So...
>
> 1. Has something in "make install" failed to work for me as you expected?
>
> 2. I see no use of CMAKE_PREFIX_PATH anywhere in CMakeLists.txt, and
> inserting the line
>       set (CMAKE_PREFIX_PATH C:/Users/Joe/hamlib_g4wjs)
> at the top of CMakeLists.txt seems to do nothing.  Have I got something
> wrong here?
CMAKE_PREFIX_PATH is something you normally pass to CMake on the command 
line because it is user or site specific. When there are several user or 
site specific variables, for example when cross compiling (which using 
MinGW virtually is) it is normal to gather all the non project specific 
CMake variables into a toolchain file. The idea is that the toolchain 
files defines a common environment, say for example all the setup for 
building Qt programs using MinGW compilers, fftw and hamlib. The path to 
the toolchain file is then specified on the CMake command line as the 
variable CMAKE_TOOLCHAIN_FILE. This is AFAIK the mechanism that the 
JTSDK-QT uses on Windows. You should never need to edit the 
CMakeLists.txt file for something specific to your system like the 
location of required tools or libraries.

Hope this helps decode what is going on and what has gone amiss with 
your first attempt at building hamlib on Windows.
>
>       -- Joe, K1JT
>
73
Bill
G4WJS.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to