[Nut-upsdev] cross-compiling the windows_port branch (socklen_t)

Frédéric Bohé fredericbohe at eaton.com
Wed Oct 20 13:30:38 UTC 2010


On mer., 2010-10-20 at 09:05 -0400, Charles Lepple wrote:
> Frédéric,
> 
> I'm curious as to how you are configuring the windows_port branch.  
> When I try to cross-compile, configure complains about socklen_t:
> 
> $ ./configure --host=i686-pc-mingw32
> Network UPS Tools version 2.4.3
> [...]
> checking for socklen_t... no
> checking for socklen_t equivalent... configure: error: Cannot find a  
> type to use in place of socklen_t
> 
> The test (m4/nut_type_socklen_t.m4) is only looking in sys/types.h and  
> sys/socket.h, which don't exist in either of the two mingw32 cross- 
> compiler setups that I have tried (on Ubuntu 10.04 and Fink).
> 
> I am unsure as to whether rsync (the apparent source of that autoconf  
> test) will properly compile on mingw32.
> 
> We might be able to do something like this, but I am open to other  
> ideas (and I am not suggesting we depend on gnulib):
> 
> http://www.mail-archive.com/bug-gnulib@gnu.org/msg01920.html

Indeed, the current configure.in has a number of issues.
They are related to :
	- libusb detection
	- libneon detection
	- linking to regex
	- duplication of DATADIR macro
	- definition of socklen_t
	- inet_aton detection

Arnaud is currently working on all this.

The way I use to build the project is by commenting out faulty macros in
configure.in and adding LIBS=-lregex to the configure command line (and
--without-serial too, because those drivers has not been ported yet).
Not the clean way but it is just a temporary workaround while waiting
for Arnaud's commit.

regards,
Fred

--------------------------------------------------------------------------



More information about the Nut-upsdev mailing list