[kde-solaris] Re: Unhelpful error building dcop in kdelibs

Michael Lambrellis michael.lambrellis at gmail.com
Mon Jan 31 05:57:09 CET 2005


OK. I got past this. I had to replace all the "SHELL = /bin/sh" lines
in the Makefiles with "SHELL = /my/bash". By the way, is there an easy
way to do this using the configure script? Is it as simple as:
SHELL=/my/bash ./configure ...
In any case, I used a little search-and replace tool called gsar that
I HIGHLY recommend to have around.
(http://gnuwin32.sourceforge.net/packages/gsar.htm)

I have sinced bumped into this error:
In file included from kresolvermanager.cpp:34:
/usr/include/resolv.h:140: error: `MAXDNAME' was not declared in this scope

On Sol.2.6, this is defined in arpa/nameser.h so you have to add this include:

+ #include <arpa/nameser.h>
  #include <resolv.h>

to every file that includes resolv.h. Strangely, this is already in
some of the files.

I then stumbled on:

kresolverstandardworkers.cpp: In member function `virtual bool
<unnamed>::GetHostByNameThread::run()':
kresolverstandardworkers.cpp:134: error: cannot convert `hostent**' to
`int*' for argument `5' to `hostent* gethostbyname_r(const char*,
hostent*, char*, int, int*)'
make: *** [kresolverstandardworkers.lo] Error 1

On Solaris, gethostbyname_r has the definition:

     struct hostent *gethostbyname_r(const char *name,
          struct hostent *result, char *buffer, int buflen,
          int *h_errnop);

So I edited kresolverstandardworkers.cpp and changed the offending line to:

resultptr = gethostbyname_r(m_hostname, &my_results, buf, buflen, &my_h_errno);

The next error was:
kreverseresolver.cpp: In member function `virtual bool
<unnamed>::ReverseThread::run()':
kreverseresolver.cpp:209: error: `NI_MAXHOST' undeclared (first use
this function)
kreverseresolver.cpp:209: error: (Each undeclared identifier is
reported only once for each function it appears in.)
kreverseresolver.cpp:209: error: `NI_MAXSERV' undeclared (first use
this function)
kreverseresolver.cpp:212: error: `h' undeclared (first use this function)
kreverseresolver.cpp:212: error: `s' undeclared (first use this function)
kreverseresolver.cpp:215: error: `NI_NUMERICHOST' undeclared (first
use this function)
kreverseresolver.cpp:217: error: `NI_NUMERICSERV' undeclared (first
use this function)
kreverseresolver.cpp:219: error: `NI_NOFQDN' undeclared (first use
this function)
kreverseresolver.cpp:221: error: `NI_DGRAM' undeclared (first use this function)
kreverseresolver.cpp:223: error: `NI_NAMEREQD' undeclared (first use
this function)
kreverseresolver.cpp:229: error: `::getnameinfo' has not been declared
make: *** [kreverseresolver.lo] Error 1

Apparently, these NI_* are not defined on Solaris 2.6, so I found some
definitions on the net and added them to the top of
kreverseresolver.cpp:

#ifndef NI_MAXHOST
# define NI_MAXHOST      1025
#endif
#ifndef NI_MAXSERV
# define NI_MAXSERV      32
#endif
#ifndef NI_NUMERICHOST
# define NI_NUMERICHOST        1       /* Don't try to look up hostname.  */
#endif
#ifndef NI_NUMERICSERV
# define NI_NUMERICSERV 2      /* Don't convert port number to name.  */
#endif
#ifndef NI_NOFQDN
# define NI_NOFQDN     4       /* Only return nodename portion.  */
#endif
#ifndef NI_NAMEREQD
# define NI_NAMEREQD   8       /* Don't return numeric addresses.  */
#endif
#ifndef NI_DGRAM
# define NI_DGRAM      16      /* Look up UDP service rather than TCP.  */
#endif

But this still leaves:

kreverseresolver.cpp: In member function `virtual bool
<unnamed>::ReverseThread::run()':
kreverseresolver.cpp:258: error: `::getnameinfo' has not been declared
make: *** [kreverseresolver.lo] Error 1

Apparently, getnameinfo is not available on Solaris 2.6. I have come
across several "getnameinfo.c" implementations on the net but am
wondering if anyone else has successfully crossed this hurdle before I
start experimenting with code of strange provenance.

Cheers,
Mike.


On Mon, 31 Jan 2005 14:41:19 +1100, Michael Lambrellis
<michael.lambrellis at gmail.com> wrote:
> I am trying to build kde 3.3.2 on Solaris 2.6. I have built my own
> development environment from scratch (in my own user area). This
> environment includes, gcc (3.4.3), binutils 2.15 (+ patches for
> Solaris), various 3rd party libraries (including bash and gnu make)
> and qt 3.3.4.
> 
> My gcc was successfully bootstrapped (using Sun Workshop 5.0) and is
> coded to use the binutils I built. I ran the gcc test suite against
> gcc/g++ and got flying colours.
> I successfully built qt, configured as follows:
> 
> ./configure -release -shared -platform solaris-g++ -thread -qt-gif
> -system-libpng -system-libjpeg -plugin-imgfmt-mng -system-zlib -no-stl
> -no-nis -no-g++-exceptions -fast
> 
> I have added my personal bin directory to the head of PATH, as well as
> my lib to LD_LIBRARY_PATH. I have added QTDIR/bin and QTDIR/lib to the
> head of these as well. QTDIR is defined as is KDEDIR (although this
> directory is currently empty). Various qt apps (designer, doxywizard)
> have been successfully built and work fine.
> 
> I edited the configure script in kdelibs to change /bin/sh to my copy of bash.
> I configured kdelibs as follows:
> 
> ./configure --prefix=$KDEDIR --with-gnu-ld --disable-debug
> --disable-nls --disable-cups --without-arts --with-qt-dir=$QTDIR
> --with-extra-includes=$DEVTOOLS/include
> --with-extra-libs=$DEVTOOLS/lib
> 
> where DEVTOOLS points to the dev environment in my user area.
> 
> I have no desire to use arts or build any of the multimedia bits (my
> X-windows session is run via Xvnc and I'm not interested in
> audio/video). I thus did not build arts (I presume that since kde
> configure offrs a "without-arts" option that I don't have to do this.
> 
> The tail of the output from my kdelibs configure command is:
> 
> make[4]: Entering directory `/apps/home/mlambre/build/kdelibs-3.3.2/dcop'
> /bin/sh ../libtool --silent --mode=link --tag=CXX
> /export/home/mlambre/devtools/bin/g++  -Wnon-virtual-dtor
> -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings
> -DNDEBUG -DNO_DEBUG -O2 -fno-exceptions -fno-check-new -fno-common
> -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT
> -DQT_NO_TRANSLATION    -o libkdeinit_dcopserver.la -rpath
> /export/home/mlambre/devtools/kde/lib -no-undefined -avoid-version
> -L/export/home/mlambre/devtools/qt/lib
> -L/export/home/mlambre/devtools/kde/lib
> -L/export/home/mlambre/devtools/lib dcopserver.lo dcopsignals.lo
> libDCOP.la
> make[4]: *** [libkdeinit_dcopserver.la] Error 1
> make[4]: Leaving directory `/apps/home/mlambre/build/kdelibs-3.3.2/dcop'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/apps/home/mlambre/build/kdelibs-3.3.2/dcop'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/apps/home/mlambre/build/kdelibs-3.3.2/dcop'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/apps/home/mlambre/build/kdelibs-3.3.2'
> make: *** [all] Error 2
> 
> I have tried manually running the above libtool command but changing
> --silent to --debug and get reams of output that I don't understand.
> Is there anything specific I should be looking for?
> 
> Everything I have built so far has worked fine. I have successfully
> build (most of) KDE in the past on Solaris 2.6 (KDE 3.2.0, QT, 3.3.3,
> gcc 3.3.4, binutils 2.14) but that was about a year(?) ago.
> 
> Can anyone help me with the above error? I don't know what I should be
> looking at or how to diagnose this further?
> 
> When responding, please email me directly on
> michael.lambrellis at gmail.com, as I only receive the daily digest of
> this list. Thanks in advance.
> 
> Cheers,
> Mike.
>


More information about the kde-solaris mailing list