[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cross-compilation leads to error "Your system must have getaddrinfo()"


On Wednesday, 1 April 2020 23:05:22 CEST Propp, Aaron wrote:
> Hi,
> 
> So I was cross-compiling libssh for QNX on ARM. This led to following error
> message:
> 
> /home/molex/libssh/src/connect.c:89:2: error: #error "Your system must have
> getaddrinfo()" #error "Your system must have getaddrinfo()"
>   ^
> cc:
> /home/molex/qnx/qnx700/host/linux/x86_64/usr/lib/gcc/arm-unknown-nto-qnx7.0
> .0eabi/5.4.0/cc1 error 1 src/CMakeFiles/ssh.dir/build.make:278: recipe for
> target 'src/CMakeFiles/ssh.dir/connect.c.o' failed make[2]: ***
> [src/CMakeFiles/ssh.dir/connect.c.o] Error 1
> CMakeFiles/Makefile2:171: recipe for target 'src/CMakeFiles/ssh.dir/all'
> failed make[1]: *** [src/CMakeFiles/ssh.dir/all] Error 2
> Makefile:151: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> Commenting out the lines in connect.c (88-90) did the trick. However, I was
> curious as to why this error occurred since QNX does have this function:
> http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neu
> trino_lib_ref%2Fg%2Fgetaddrinfo.html. I think it has to do with
> ConfigureChecks.cmake starting at line 247. Is there a way to specify which
> libsocket to use in a cross-compilation scenario? Using qcc as the
> compiler, Ubuntu 18.04 as the host and QNX 7 as the target.

How does your cmake toolchain file look like?

-- 
Andreas Schneider                 asn@xxxxxxxxxxxxxx
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D



References:
cross-compilation leads to error "Your system must have getaddrinfo()""Propp, Aaron" <Aaron.Propp@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org