www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Build fails on OpenSolaris

Build fails on OpenSolaris

From: Tom Weber <tom.weber_at_cryptzone.com>
Date: Wed, 29 Feb 2012 16:29:34 +0100

Hi!

The build of 1.4.0 fails in example/x11.c on OpenSolaris snv_89, since that
platform lacks cfmakeraw(). I only need the library so I don't need a working
x11 example, I just want the example to not be compiled, either through an
automatic check or a configure option such as --disable-examples. Right now
I'm patching the Makefile but a more sustainable solution would be nicer.

This is my configure output:

$ ./configure --with-openssl --with-libz
checking whether to enable maintainer-specific portions of Makefiles... no
checking for sed... /usr/bin/sed
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking libssh2 version... 1.4.0
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
configure: autobuild project... libssh2
configure: autobuild revision... 1.4.0
configure: autobuild hostname...
configure: autobuild timestamp... 20120229-161414
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/pd/bin/grep
checking for egrep... /usr/pd/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for long long... yes
checking if _REENTRANT is already defined... no
checking if _REENTRANT is actually needed... yes
checking if _REENTRANT is onwards defined... yes
checking for library containing socket... -lsocket
checking for library containing inet_addr... -lnsl
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for sshd... no
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/pd/bin/grep -F
checking for ld used by gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/pd/opt/gcc3/bin/nm -B
checking the name lister (/usr/pd/opt/gcc3/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 786240
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/pd/opt/gcc3/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/ccs/bin/ld) supports shared libraries...
yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether byte ordering is bigendian... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for ld used by GCC... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking for libssl... yes
checking how to link with libssl... -lssl -lcrypto
checking for EVP_aes_128_ctr... no
checking for libz... yes
checking how to link with libz... -lz
checking whether to enable pedantic and debug compiler options... no
checking whether to enable hidden symbols in the library... no
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking ws2tcpip.h usability... no
checking ws2tcpip.h presence... no
checking for ws2tcpip.h... no
checking for poll... yes
checking for gettimeofday... yes
checking for select... yes
checking for strtoll... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking non-blocking sockets style... O_NONBLOCK
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating example/Makefile
config.status: creating docs/Makefile
config.status: creating libssh2.pc
config.status: creating src/libssh2_config.h
config.status: creating example/libssh2_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: summary of build options:

  version: 1.4.0
  Host type: i386-pc-solaris2.11
  Install prefix: /usr/local
  Compiler: gcc
  Compiler flags: -g -O2
  Library types: Shared=yes, Static=yes
  Crypto library: openssl: yes (AES-CTR: no) libgcrypt: no
  Debug build: no
  Path to sshd: (only for self-tests)
  libz compression: yes

And this is the relevant portion of the gmake output:

...
/bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -o x11 x11.o
../src/libssh2.la -lnsl -lsocket
libtool: link: gcc -g -O2 -o .libs/x11 x11.o ../src/.libs/libssh2.so -lssl
-lcrypto -lz -lnsl -lsocket -R/usr/local/lib
Undefined first referenced
 symbol in file
cfmakeraw x11.o
ld: fatal: Symbol referencing errors. No output written to .libs/x11
collect2: ld returned 1 exit status
gmake[2]: *** [x11] Error 1
...
gmake: *** [all-recursive] Error 1

-- 
Best regards,
Tom Weber
Cryptzone Group AB
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-02-29

the libssh2 team