[gtk-server] Re: Problem during compilation under Solaris

  • From: Peter van Eerten <administrator@xxxxxxxxxxxxxx>
  • To: gtk-server@xxxxxxxxxxxxx
  • Date: Sun, 11 Dec 2005 16:21:29 +0100

Hi Pascal,

Actually this is more or less the same problem, but with another library (nsl).

Extend line 23 in 'configure.in' to: LDFLAGS="-lffi -lsocket -lnsl" and recreate
the configure script. Then run 'configure' and after that 'make' and see if it
can compile.

Peter


Citeren Pascal Kreyer <Pascal.Kreyer@xxxxxxxxxx>:

> Hi Peter,
>
> your procedure work fine. :-)
>
> But, i have now a new problem, with the make command :
>
> gcc -o gtk-server gtk-server.o  -lffi -lsocket -lgtk-x11-2.0
> -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lmlib -lpangoxft-1.0
> -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
> Undefined                       first referenced
>  symbol                             in file
> gethostbyname                       gtk-server.o  (symbol belongs to
> implicit dependency /usr/lib/libnsl.so.1)
> inet_ntoa                           gtk-server.o  (symbol belongs to
> implicit dependency /usr/lib/libnsl.so.1)
> ld: fatal: Symbol referencing errors. No output written to gtk-server
> collect2: ld returned 1 exit status
> gmake: *** [gtk-server] Error 1
>
>
> The problem with DTKSH that it is use the Motif toolkit and not GTK2. :-(
>
> :-)
>
> Pascal
>
>
> Peter van Eerten wrote:
>
> >Hi Pascal,
> >
> >The configure script only takes Linux and BSD into account. I would be
> >pleasantly surpised if the GTK-server works on Solaris out-of-the-box :-)
> >
> >With Solaris you can use DTKSH as well. It's a KornShell which is able to
> create
> >graphical user interfaces. DTKSH was the inspiration for GTK-server, but you
> >need CDE to run it.
> >
> >Anyway, there may be a hack if you have the 'autoconf'-tool installed on
> your
> >system. The problem seems to come from the fact that the configure script
> does
> >not link with the Solaris socket library. Here is what you can try:
> >
> >1) in the file 'configure.in' change line 23 to: LDFLAGS="-lffi -lsocket"
> >2) run 'autoconf' to generate a new configure script
> >3) run ./configure again and see if it passes the test
> >4) the new Makefile should contain a reference to -lsocket now also, run
> 'make'
> >
> >Please let me know your results.
> >
> >Br,
> >Peter
> >
> >
> >Citeren Pascal Kreyer <Pascal.Kreyer@xxxxxxxxxx>:
> >
> >
> >
> >>Hi,
> >>
> >>do have anyone that have experience with the compilation of gtk-server
> >>under Solaris ?
> >>
> >>During the compilation, i receive the following error :
> >>
> >>------------------------------------------------------
> >>
> >>configure:4925: checking for socket
> >>configure:4982: gcc -o conftest -I/usr/include/gtk-2.0
> >>-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
> >>-I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include
> >>-I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0
> >>-I/usr/lib/glib-2.0/include    -lffi conftest.c -lgtk-x11-2.0
> >>-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lmlib -lpangoxft-1.0
> >>-lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   >&5
> >>Undefined                       first referenced
> >> symbol                             in file
> >>socket                              /var/tmp//cce7KPqy.o  (symbol
> >>belongs to implicit dependency /usr/lib/libsocket.so.1)
> >>ld: fatal: Symbol referencing errors. No output written to conftest
> >>collect2: ld returned 1 exit status
> >>configure:4988: $? = 1
> >>configure: failed program was:
> >>| /* confdefs.h.  */
> >>|
> >>| #define PACKAGE_NAME "gtk-server"
> >>| #define PACKAGE_TARNAME "gtk-server"
> >>| #define PACKAGE_VERSION "2.0 build 5"
> >>| #define PACKAGE_STRING "gtk-server 2.0 build 5"
> >>| #define PACKAGE_BUGREPORT "peter@xxxxxxxxxxxxxx"
> >>| #define LINUX 1
> >>| #define GTK2x 1
> >>| #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
> >>| /* end confdefs.h.  */
> >>| /* Define socket to an innocuous variant, in case <limits.h> declares
> >>socket.
> >>|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
> >>| #define socket innocuous_socket
> >>|
> >>| /* System header to define __stub macros and hopefully few prototypes,
> >>|     which can conflict with char socket (); below.
> >>|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
> >>|     <limits.h> exists even on freestanding compilers.  */
> >>|
> >>| #ifdef __STDC__
> >>| # include <limits.h>
> >>| # include <assert.h>
> >>| #endif
> >>|
> >>| #undef socket
> >>|
> >>| /* Override any gcc2 internal prototype to avoid an error.  */
> >>| #ifdef __cplusplus
> >>| extern "C"
> >>| {
> >>| #endif
> >>| /* We use char because int might match the return type of a gcc2
> >>|    builtin and then its argument prototype would still apply.  */
> >>| char socket ();
> >>| /* The GNU C library defines this for functions which it implements
> >>|     to always fail with ENOSYS.  Some functions are actually named
> >>|     something starting with __ and the normal name is an alias.  */
> >>| #if defined (__stub_socket) || defined (__stub___socket)
> >>| choke me
> >>| #else
> >>| char (*f) () = socket;
> >>| #endif
> >>| #ifdef __cplusplus
> >>| }
> >>| #endif
> >>|
> >>| int
> >>| main ()
> >>| {
> >>| return f != socket;
> >>|   ;
> >>|   return 0;
> >>| }
> >>configure:5013: result: no
> >>configure:5018: error: Cannot compile - missing function: socket
> >>
> >>-----------------------------------------------------
> >>
> >>
> >>Thanks,
> >>
> >>
> >>Regards
> >>
> >>
> >>Pascal
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
>
>


-- 
http://www.gtk-server.org

Other related posts: