Hi Peter, Thank you very much for your reply. That helped me understand the problem better. I alternatively tried compiling using Cmake and was able to get it to compile easily.
Thanks, Milind On Fri, Jul 20, 2018 at 6:36 AM Peter Stuge <pe...@stuge.se> wrote: > Milind Gupta wrote: > > I have attached the config.log file. > > Great that you included the complete config.log file! Thanks. This > was absolutely neccessary in order to recognize the actual problem. > > > Daniel Stenberg wrote: > > Your compiler found two conflicting declarations of gethostname(). > > That seems like a problem that's not up to libssh2 to fix... > > The problem isn't just with gethostname() but also with other > functions, including select(). > > > Various headers in /usr/include in the environment where you invoked > configure are incompatible with the MSYS headers in > /usr/i686-pc-msys/include in that same environment. > > If this is not an error with your system and/or environment and you > want to build for MSYS then you actually want to cross-compile > libssh2, which is supported, but you have to be explicit about that > when invoking configure. > > That could look like so: (This is just an example, you have to know > what is appropriate for your environment.) > > ./configure --host=i686-pc-msys > > The key here is that your cross-compiler toolchain (MSYS gcc and > binutils) executables have an i686-pc-msys- filename prefix. So if > this is the correct prefix then you should be able to invoke e.g. > i686-pc-msys-gcc and i686-pc-msys-ld. > > > //Peter > _______________________________________________ > libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel >
_______________________________________________ libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel