[vlc-devel] configure doesn't include nsl in LIBS on illumos
Jon Tibble
meths at btinternet.com
Fri Jan 3 22:34:35 CET 2014
Hi Rémi,
On 03/01/2014 20:52, R�mi Denis-Courmont wrote:
> Hello,
>
> Le vendredi 3 janvier 2014, 20:40:10 Jon Tibble a écrit :
>> On illumos/Solaris based systems the socket libraries come as a pair and
>> should be linked to together.
>>
>> The attached patch adds nsl on illumos if the check for connect in
>> socket succeeds.
>
> This is already taken care of by the getaddrinfo() check right below, at least
> it is supposed to be. I guess the problem and fix are more subtle.
>
The getaddrinfo check doesn't add nsl as the link fails. It then
incorrectly sets the following in config.h
/* Define to 1 if you have inet_pton function */
/* #undef HAVE_INET_PTON */
which then causes the build to fail.
The relevant config.log section is pasted below.
If the getaddrinfo check was put there to cater to solaris systems then
that check could just be changed to check for inet_pton instead of
getaddrinfo. getaddrinfo is in socket like connect which is why it's
failing.
Jon
configure:23273: checking for library containing connect
configure:23304: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
Undefined first referenced
symbol in file
connect /var/tmp//ccR6aalD.o
ld: fatal: symbol referencing errors. No output written to conftest
collect2: error: ld returned 1 exit status
configure:23304: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "vlc"
| #define PACKAGE_TARNAME "vlc"
| #define PACKAGE_VERSION "2.2.0-git"
| #define PACKAGE_STRING "vlc 2.2.0-git"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "vlc"
| #define VERSION "2.2.0-git"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define _FORTIFY_SOURCE 2
| #define _FILE_OFFSET_BITS 64
| #define _REENTRANT /**/
| #define _THREAD_SAFE /**/
| #define __LIBVLC__ /**/
| #define WIN32_LEAN_AND_MEAN /**/
| #define restrict __restrict
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define ENABLE_NLS 1
| #define HAVE_GETTEXT 1
| #define HAVE_DCGETTEXT 1
| #define HAVE_ICONV 1
| #define ICONV_CONST const
| #define VLC_WINSTORE_APP 0
| #define LIBEXT ".so"
| #define HAVE_DECL_NANOSLEEP 1
| #define HAVE_DAEMON 1
| #define HAVE_FCNTL 1
| #define HAVE_FSTATVFS 1
| #define HAVE_FORK 1
| #define HAVE_GETENV 1
| #define HAVE_GETPWUID_R 1
| #define HAVE_ISATTY 1
| #define HAVE_LSTAT 1
| #define HAVE_MEMALIGN 1
| #define HAVE_MMAP 1
| #define HAVE_OPENAT 1
| #define HAVE_PREAD 1
| #define HAVE_POSIX_FADVISE 1
| #define HAVE_POSIX_MADVISE 1
| #define HAVE_SETLOCALE 1
| #define HAVE_STRPTIME 1
| #define HAVE_ATOF 1
| #define HAVE_ATOLL 1
| #define HAVE_DIRFD 1
| #define HAVE_FDOPENDIR 1
| #define HAVE_FLOCKFILE 1
| #define HAVE_FSYNC 1
| #define HAVE_GETDELIM 1
| #define HAVE_GETPID 1
| #define HAVE_GMTIME_R 1
| #define HAVE_LLDIV 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_NRAND48 1
| #define HAVE_POLL 1
| #define HAVE_POSIX_MEMALIGN 1
| #define HAVE_REWIND 1
| #define HAVE_SETENV 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRCASESTR 1
| #define HAVE_STRDUP 1
| #define HAVE_STRLCPY 1
| #define HAVE_STRNDUP 1
| #define HAVE_STRNLEN 1
| #define HAVE_STRSEP 1
| #define HAVE_STRTOF 1
| #define HAVE_STRTOK_R 1
| #define HAVE_STRTOLL 1
| #define HAVE_SWAB 1
| #define HAVE_FDATASYNC 1
| #define HAVE_ASPRINTF 1
| #define HAVE_VASPRINTF 1
| #define HAVE_STRCOLL 1
| #define HAVE_STRUCT_POLLFD 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char connect ();
| int
| main ()
| {
| return connect ();
| ;
| return 0;
| }
configure:23304: gcc -std=gnu99 -o conftest -g -O2 conftest.c -lsocket
>&5
configure:23304: $? = 0
configure:23321: result: -lsocket
configure:23344: checking for library containing getaddrinfo
configure:23375: gcc -std=gnu99 -o conftest -g -O2 conftest.c -lsocket
>&5
configure:23375: $? = 0
configure:23392: result: none required
configure:23431: gcc -std=gnu99 -o conftest -g -O2 conftest.c -lsocket
-lsocket >&5
Undefined first referenced
symbol in file
inet_pton /var/tmp//ccI9aypD.o (symbol
belongs to implicit dependency /lib/libnsl.so.1)
ld: fatal: symbol referencing errors. No output written to conftest
collect2: error: ld returned 1 exit status
configure:23431: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "vlc"
| #define PACKAGE_TARNAME "vlc"
| #define PACKAGE_VERSION "2.2.0-git"
| #define PACKAGE_STRING "vlc 2.2.0-git"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "vlc"
| #define VERSION "2.2.0-git"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define _FORTIFY_SOURCE 2
| #define _FILE_OFFSET_BITS 64
| #define _REENTRANT /**/
| #define _THREAD_SAFE /**/
| #define __LIBVLC__ /**/
| #define WIN32_LEAN_AND_MEAN /**/
| #define restrict __restrict
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define ENABLE_NLS 1
| #define HAVE_GETTEXT 1
| #define HAVE_DCGETTEXT 1
| #define HAVE_ICONV 1
| #define ICONV_CONST const
| #define VLC_WINSTORE_APP 0
| #define LIBEXT ".so"
| #define HAVE_DECL_NANOSLEEP 1
| #define HAVE_DAEMON 1
| #define HAVE_FCNTL 1
| #define HAVE_FSTATVFS 1
| #define HAVE_FORK 1
| #define HAVE_GETENV 1
| #define HAVE_GETPWUID_R 1
| #define HAVE_ISATTY 1
| #define HAVE_LSTAT 1
| #define HAVE_MEMALIGN 1
| #define HAVE_MMAP 1
| #define HAVE_OPENAT 1
| #define HAVE_PREAD 1
| #define HAVE_POSIX_FADVISE 1
| #define HAVE_POSIX_MADVISE 1
| #define HAVE_SETLOCALE 1
| #define HAVE_STRPTIME 1
| #define HAVE_ATOF 1
| #define HAVE_ATOLL 1
| #define HAVE_DIRFD 1
| #define HAVE_FDOPENDIR 1
| #define HAVE_FLOCKFILE 1
| #define HAVE_FSYNC 1
| #define HAVE_GETDELIM 1
| #define HAVE_GETPID 1
| #define HAVE_GMTIME_R 1
| #define HAVE_LLDIV 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_NRAND48 1
| #define HAVE_POLL 1
| #define HAVE_POSIX_MEMALIGN 1
| #define HAVE_REWIND 1
| #define HAVE_SETENV 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRCASESTR 1
| #define HAVE_STRDUP 1
| #define HAVE_STRLCPY 1
| #define HAVE_STRNDUP 1
| #define HAVE_STRNLEN 1
| #define HAVE_STRSEP 1
| #define HAVE_STRTOF 1
| #define HAVE_STRTOK_R 1
| #define HAVE_STRTOLL 1
| #define HAVE_SWAB 1
| #define HAVE_FDATASYNC 1
| #define HAVE_ASPRINTF 1
| #define HAVE_VASPRINTF 1
| #define HAVE_STRCOLL 1
| #define HAVE_STRUCT_POLLFD 1
| /* end confdefs.h. */
|
| #ifdef _WIN32
| # if _WIN32_WINNT < 0x600
| # error Needs vista+
| # endif
| #include <ws2tcpip.h>
| #else
| #include <sys/socket.h>
| #include <arpa/inet.h>
| #endif
| int
| main ()
| {
|
| char dst[sizeof(struct in_addr)];
| inet_pton(AF_INET, "127.0.0.1", dst);
|
| ;
| return 0;
| }
configure:23448: checking for if_nameindex
configure:23448: gcc -std=gnu99 -o conftest -g -O2 conftest.c -lsocket
-lsocket >&5
configure:23448: $? = 0
configure:23448: result: yes
More information about the vlc-devel
mailing list