Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#217 acinclude.m4 on FreeBSD problem

v1.6
open
nobody
5
2009-01-27
2009-01-27
Osprey
No

* OVERVIEW *
I have a problem with latest revision of acinclude.m4 on FreeBSD.
Error on make:
[...]
Making all in cel3ds
if c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I.. -O0 -march=nocona -I/usr/local/include -Wno-long-long -Wundef -Wall -W -Wpointer-arith -pg -DNDEBUG -DNO_DEBUG -O2 -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -O2 -Wall -ffast-math -fexpensive-optimizations -pg -DORBIT2=1 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/libgnomeui-2.0 -I/usr/local/include/libart-2.0 -I/usr/local/include/gconf/2 -I/usr/local/include/gnome-keyring-1 -I/usr/local/include/libgnome-2.0 -I/usr/local/include/libbonoboui-2.0 -I/usr/local/include/libgnomecanvas-2.0 -I/usr/local/include/gtk-2.0 -I/usr/local/include/gnome-vfs-2.0 -I/usr/local/lib/gnome-vfs-2.0/include -I/usr/local/include/orbit-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/libbonobo-2.0 -I/usr/local/include/bonobo-activation-2.0 -I/usr/local/include/libxml2 -I/usr/local/include/pango-1.0 -I/usr/local/include/gail-1.0 -I/usr/local/include/freetype2 -I/usr/local/include/atk-1.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/gtkglext-1.0 -I/usr/local/lib/gtkglext-1.0/include -D_THREAD_SAFE -I/usr/local/include/cairo -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/pixman-1 -I/usr/local/include -I/usr/local/include/lua51 -DLUA_VER=0x050100 -DCELX -MT 3dsread.o -MD -MP -MF ".deps/3dsread.Tpo" -c -o 3dsread.o 3dsread.cpp; then mv -f ".deps/3dsread.Tpo" ".deps/3dsread.Po"; else rm -f ".deps/3dsread.Tpo"; exit 1; fi
In file included from ../celutil/util.h:42,
from ../celutil/bytes.h:19,
from 3dsread.cpp:15:
/usr/local/include/libintl.h:91:25: warning: "__APPLE_CC__" is not defined
/usr/local/include/libintl.h:113:24: warning: "__APPLE_CC__" is not defined
In file included from ../celutil/bytes.h:15,
from 3dsread.cpp:15:
../../config.h:257: error: declaration of C function 'long unsigned int strlcat(char*, const char*, long unsigned int)' conflicts with
/usr/include/string.h:88: error: previous declaration 'size_t strlcat(char*, const char*, size_t)' here
../../config.h:269: error: declaration of C function 'long unsigned int strlcpy(char*, const char*, long unsigned int)' conflicts with
/usr/include/string.h:89: error: previous declaration 'size_t strlcpy(char*, const char*, size_t)' here
../celutil/bytes.h:25: warning: 'short unsigned int bswap_16(short unsigned int)' defined but not used
../celutil/bytes.h:30: warning: 'unsigned int bswap_32(unsigned int)' defined but not used
*** Error code 1
[...]

The problem is in KDE_MISC_TESTS. when checking KDE_CHECK_STRLCPY

I have no qt4.2 and can't say is it really needed for kde build

* SOLUTION *

Use old revision?

Patch:
Index: acinclude.m4
===================================================================
--- acinclude.m4 (revision 4607)
+++ acinclude.m4 (working copy)
@@ -807,7 +807,7 @@

KDE_CHECK_TYPES
KDE_CHECK_LIBDL
- KDE_CHECK_STRLCPY
+# KDE_CHECK_STRLCPY
KDE_CHECK_PIE_SUPPORT

# darwin needs this to initialize the environment

Discussion

  • Pat Suwalski
    Pat Suwalski
    2009-02-11

    I don't see how this can have any effect.

    Number 1:
    QT 4.2 has nothing to do with anything. How does it matter?

    Number 2:
    KDE_MISC_TESTS only gets executed if you're building --with-kde. If KDE_CHECK_STRLCPY was executed by configure, you would see the following output:

    checking sizeof size_t == sizeof unsigned long

    I don't see that, so I know it's not happening.

    Are you certain that fixes it?

     
  • Osprey
    Osprey
    2009-04-07

    The main problem is that `configure` generate in config.h HAVE_STRLCAT_PROTO, and
    other *STR* protos like that:

    config.h:
    [...]
    #if !defined(HAVE_STRLCAT_PROTO)
    #ifdef __cplusplus
    extern "C" {
    #endif
    unsigned long strlcat(char*, const char*, unsigned long);
    #ifdef __cplusplus
    }
    #endif
    #endif
    [...]

    and it _not_ depend on backend i.e. --with-gnome, etc. All this protos ( 4example HAVE_STRLCAT_PROTO) not defined in _not_ KDE backend
    I mean in config.h will be:
    - when --with-gnome
    /* #undef HAVE_STRLCAT_PROTO */.
    - when --with-kde
    #define HAVE_STRLCAT_PROTO 1

    * JOKE *

    I just put AC_PATH_KDE in some place in configure.in to:

    --- configure.in (revision 4695)
    +++ configure.in (working copy)
    @@ -329,7 +329,7 @@

    dnl Make certain ARTS is not conditionally defined, like GConf for Gnome
    AM_CONDITIONAL(include_ARTS, test "x" = "y")
    -
    +AC_PATH_KDE
    if (test "$ui_kde" != "no"); then
    dnl KDE_SET_PREFIX
    AC_ENABLE_SHARED(yes)

    All work, but it not correct to do KDE checks when no kde backend wanted.