Thread: [Hamlib-developer] How to build latest sources using Cygwin
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Bill S. <g4...@cl...> - 2013-07-22 00:42:29
|
Hi, I have cloned the latest sources and want to build in Cygwin. I have the Cygwin mingw32 cross tools installed and expect to: ./configure --prefix=<my-install-dir> --host=i686-pc-mingw32 make make install Can someone enlighten me as to how I get to the point I can run configure please. 73 Bill G4WJS. |
From: Nate B. <n0...@n0...> - 2013-07-22 01:08:47
|
* On 2013 21 Jul 19:43 -0500, Bill Somerville wrote: > Hi, > > I have cloned the latest sources and want to build in Cygwin. > > I have the Cygwin mingw32 cross tools installed and expect to: > > ./configure --prefix=<my-install-dir> --host=i686-pc-mingw32 > make > make install > > Can someone enlighten me as to how I get to the point I can run > configure please. You should just need to run the autogen.sh script first. It's been a couple of months since I tested on Cygwin (native, not using MinGW as I use it from Linux) but so long as the Autotools are installed (Autoconf, Automake, and Libtool) of the later versions it should work. While I did not use MinGW from within Cygwin, I was able to build in Msys from a daily snapshot tarball. 73, de Nate >> -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Ham radio, Linux, bikes, and more: http://www.n0nb.us |
From: Bill S. <g4...@cl...> - 2013-07-22 01:52:32
|
On 22/07/2013 02:08, Nate Bargmann wrote: Hi Nate, thanks for the quick reply. Sorry for the duplicate replies, I forgot to reply to the list. > * On 2013 21 Jul 19:43 -0500, Bill Somerville wrote: >> Hi, >> >> I have cloned the latest sources and want to build in Cygwin. >> >> I have the Cygwin mingw32 cross tools installed and expect to: >> >> ./configure --prefix=<my-install-dir> --host=i686-pc-mingw32 >> make >> make install >> >> Can someone enlighten me as to how I get to the point I can run >> configure please. > You should just need to run the autogen.sh script first. It's been a > couple of months since I tested on Cygwin (native, not using MinGW as I > use it from Linux) but so long as the Autotools are installed (Autoconf, > Automake, and Libtool) of the later versions it should work. > > While I did not use MinGW from within Cygwin, I was able to build in > Msys from a daily snapshot tarball. Ok I got passed the initial problems - was my fault - stupid Windoze line endings which I have now banished. Now I have a problem with the generated config.h ------------------------------------------------------------------------------------------- $ make Making all in libltdl make[1]: Entering directory `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' make all-am make[2]: Entering directory `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' CC loadlibrary.lo In file included from ../include/config.h:578:0, from libltdl/lt__private.h:35, from loaders/loadlibrary.c:32: /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2: error: #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead." In file included from ../include/config.h:578:0, from libltdl/lt__private.h:35, from loaders/loadlibrary.c:32: /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:147:8: error: redefinition of 'struct ip_mreq' In file included from /usr/i686-pc-mingw32/sys-root/mingw/include/windows.h:93:0, from ../include/config.h:491, from libltdl/lt__private.h:35, from loaders/loadlibrary.c:32: /usr/i686-pc-mingw32/sys-root/mingw/include/winsock.h:315:8: note: originally defined here Makefile:746: recipe for target `loadlibrary.lo' failed make[2]: *** [loadlibrary.lo] Error 1 make[2]: Leaving directory `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' Makefile:491: recipe for target `all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' Makefile:511: recipe for target `all-recursive' failed make: *** [all-recursive] Error 1 ---------------------------------------------------------------------------------- Looks like including both windows.h and ws2tcpip.h is not valid unless WIN32_LEAN_AND_MEAN is defined. I get this info from http://msdn.microsoft.com/en-us/library/windows/desktop/ms738562%28v=vs.85%29.aspx I'm no autotools expert so not sure what to do here, any ideas? > > 73, de Nate >> > 73 Bill. |
From: Nate B. <n0...@n0...> - 2013-07-22 02:10:57
|
* On 2013 21 Jul 20:52 -0500, Bill Somerville wrote: > Now I have a problem with the generated config.h > > ------------------------------------------------------------------------------------------- > > $ make > Making all in libltdl > make[1]: Entering directory > `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' > make all-am > make[2]: Entering directory > `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' > CC loadlibrary.lo > In file included from ../include/config.h:578:0, > from libltdl/lt__private.h:35, > from loaders/loadlibrary.c:32: > /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2: error: > #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h > instead." > In file included from ../include/config.h:578:0, > from libltdl/lt__private.h:35, > from loaders/loadlibrary.c:32: > /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:147:8: error: > redefinition of 'struct ip_mreq' > In file included from > /usr/i686-pc-mingw32/sys-root/mingw/include/windows.h:93:0, > from ../include/config.h:491, > from libltdl/lt__private.h:35, > from loaders/loadlibrary.c:32: > /usr/i686-pc-mingw32/sys-root/mingw/include/winsock.h:315:8: note: > originally defined here > Makefile:746: recipe for target `loadlibrary.lo' failed > make[2]: *** [loadlibrary.lo] Error 1 > make[2]: Leaving directory > `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' > Makefile:491: recipe for target `all' failed > make[1]: *** [all] Error 2 > make[1]: Leaving directory > `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' > Makefile:511: recipe for target `all-recursive' failed > make: *** [all-recursive] Error 1 This error is occuring in the libltdl code which is placed in the Hamlib tree by the autogen.sh bootstrap process. As this code came from your Libtool installation, I'm afraid that I'm in the dark as to the reason. > ---------------------------------------------------------------------------------- > > Looks like including both windows.h and ws2tcpip.h is not valid unless > WIN32_LEAN_AND_MEAN is defined. > > I get this info from > http://msdn.microsoft.com/en-us/library/windows/desktop/ms738562%28v=vs.85%29.aspx > > > I'm no autotools expert so not sure what to do here, any ideas? I suspect it is more of a MinGW issue than Autotools. As there are intentions to remove the need for libltdl at some point in the future, this issue may resolve itself at some point. ;-) 73, de Nate >> -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Ham radio, Linux, bikes, and more: http://www.n0nb.us |
From: Bill S. <g4...@cl...> - 2013-07-22 02:29:02
|
On 22/07/2013 03:10, Nate Bargmann wrote: Hi again Nate, > * On 2013 21 Jul 20:52 -0500, Bill Somerville wrote: >> Now I have a problem with the generated config.h >> >> ------------------------------------------------------------------------------------------- >> >> $ make >> Making all in libltdl >> make[1]: Entering directory >> `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' >> make all-am >> make[2]: Entering directory >> `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' >> CC loadlibrary.lo >> In file included from ../include/config.h:578:0, >> from libltdl/lt__private.h:35, >> from loaders/loadlibrary.c:32: >> /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2: error: >> #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h >> instead." >> In file included from ../include/config.h:578:0, >> from libltdl/lt__private.h:35, >> from loaders/loadlibrary.c:32: >> /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:147:8: error: >> redefinition of 'struct ip_mreq' >> In file included from >> /usr/i686-pc-mingw32/sys-root/mingw/include/windows.h:93:0, >> from ../include/config.h:491, >> from libltdl/lt__private.h:35, >> from loaders/loadlibrary.c:32: >> /usr/i686-pc-mingw32/sys-root/mingw/include/winsock.h:315:8: note: >> originally defined here >> Makefile:746: recipe for target `loadlibrary.lo' failed >> make[2]: *** [loadlibrary.lo] Error 1 >> make[2]: Leaving directory >> `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' >> Makefile:491: recipe for target `all' failed >> make[1]: *** [all] Error 2 >> make[1]: Leaving directory >> `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/libltdl' >> Makefile:511: recipe for target `all-recursive' failed >> make: *** [all-recursive] Error 1 > This error is occuring in the libltdl code which is placed in the Hamlib > tree by the autogen.sh bootstrap process. As this code came from your > Libtool installation, I'm afraid that I'm in the dark as to the reason. > >> ---------------------------------------------------------------------------------- >> >> Looks like including both windows.h and ws2tcpip.h is not valid unless >> WIN32_LEAN_AND_MEAN is defined. >> >> I get this info from >> http://msdn.microsoft.com/en-us/library/windows/desktop/ms738562%28v=vs.85%29.aspx >> >> >> I'm no autotools expert so not sure what to do here, any ideas? > I suspect it is more of a MinGW issue than Autotools. As there are > intentions to remove the need for libltdl at some point in the future, > this issue may resolve itself at some point. ;-) This problem lies purely in the generated config.h, it is just thrown up in the libtool stuff because that is the first directory to build. I have inserted this: AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.]) into the configure.ac before the ws2tcpip.h header file test and things are moving on. > > 73, de Nate >> > 73 Bill. |
From: Bill S. <g4...@cl...> - 2013-07-22 02:34:11
|
Hi, the next issue was an error building the tests: -------------------------------------------------------------------------------------- Making all in tests make[1]: Entering directory `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests' CC rigctl.o CC rigctl_parse.o CC dumpcaps.o CC sprintflst.o CCLD rigctl.exe rigctl_parse.o: In function `rigctl_parse': /cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests/rigctl_parse.c:1033: undefined reference to `_imp__pthread_mutex_lock' /cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests/rigctl_parse.c:1062: undefined reference to `_imp__pthread_mutex_unlock' /cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests/rigctl_parse.c:1033: undefined reference to `_imp__pthread_mutex_lock' collect2: error: ld returned 1 exit status Makefile:645: recipe for target `rigctl.exe' failed make[1]: *** [rigctl.exe] Error 1 make[1]: Leaving directory `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests' Makefile:511: recipe for target `all-recursive' failed make: *** [all-recursive] Error 1 ---------------------------------------------------------------------------------------------- this is a link ordering issue I have seen before. I had to add "LIBS=-lpthread" to the configure invocation to fix this. I'm pretty sure that shouldn't be needed. I now have a complete build and will test later. 73 Bill. |
From: <rem...@gm...> - 2013-07-22 21:45:59
|
Hi Bill, It is probably worth having a look at MXE : http://mxe.cc/ Remi Le 22.07.2013 03:34, Bill Somerville a écrit : > Hi, > > the next issue was an error building the tests: > > -------------------------------------------------------------------------------------- > Making all in tests > make[1]: Entering directory > `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests' > CC rigctl.o > CC rigctl_parse.o > CC dumpcaps.o > CC sprintflst.o > CCLD rigctl.exe > rigctl_parse.o: In function `rigctl_parse': > /cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests/rigctl_parse.c:1033: > undefined reference to `_imp__pthread_mutex_lock' > /cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests/rigctl_parse.c:1062: > undefined reference to `_imp__pthread_mutex_unlock' > /cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests/rigctl_parse.c:1033: > undefined reference to `_imp__pthread_mutex_lock' > collect2: error: ld returned 1 exit status > Makefile:645: recipe for target `rigctl.exe' failed > make[1]: *** [rigctl.exe] Error 1 > make[1]: Leaving directory > `/cygdrive/c/Cygwin/home/bill/src/hamlib-code/tests' > Makefile:511: recipe for target `all-recursive' failed > make: *** [all-recursive] Error 1 > ---------------------------------------------------------------------------------------------- > > this is a link ordering issue I have seen before. I had to add > "LIBS=-lpthread" to the configure invocation to fix this. I'm pretty > sure that shouldn't be needed. > > I now have a complete build and will test later. > > 73 > Bill. > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Hamlib-developer mailing list > Ham...@li... > https://lists.sourceforge.net/lists/listinfo/hamlib-developer > |