pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkgtools/libnbcompat on Linux older than 2008



Hi,

since the latest update on pkgtools/libnbcompat, I get build failures in
pkgtools/pkg_install and net/libfetch on some very old Linux systems:

  Ubuntu 8.04 (released 2008), glibc 2.7
  Ubuntu 6.06 (released 2006), glibc 2.3.6
  SuSE 9.0    (released 2003), glibc 2.3.2

On Ubuntu 10.04 and newer, building succeeds.

On these old systems configure fails to detect isblank (seems to be a
macro). libnbcompat then supplies its own declaration instead but it
gets mangled because of the existing macro definition.

I found the following workaround for this:

  - add "-D_ISOC99_SOURCE=1 -D_BSD_SOURCE=1" to CFLAGS for pkg_install
    and libfetch
       (both required, providing just one leads to other errors)

Building pkg_install with these CFLAGS also succeeds on modern Linux
distributions (Ubuntu 10.04/12.04/14.04 and Debian 8.0) as
well as on NetBSD5.1 and NetBSD6.1.

I was tempted to ask if perhaps these CLFAGS could be integrated in
libnbcompat itself, but: the other packages using
"USE_FEATURES=nbcompat" do not require "-D_ISOC99_SOURCE=1
-D_BSD_SOURCE=1" to build on these old systems, and some of them don't
even compile with it (but they might if these CFLAGS were limited to
libnbcompat itself):

    net/fetch
    pkgtools/pkgin

Are the CFLAGS settings acceptable for inclusion in pkg_install /
libfetch?

Regards
Matthias Ferdinand

-----------------------------------------------------------------------

Error message for pkgtools/pkg_install:

    In file included from /opt/pkgsrc/work/pkgsrc/pkgtools/pkg_install/default/libnbcompat/nbcompat.h:50,
                     from ftp.c:69:
    /opt/pkgsrc/work/pkgsrc/pkgtools/pkg_install/default/libnbcompat/nbcompat/ctype.h:44: error: parse error before ')' token
    *** Error code 1


config.log:

    configure:5927: checking whether isblank is declared
    configure:5927: gcc -c -O2 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 -I/opt/pkgsrc/work/pkgsrc/pkgtools/pkg_install/default/bzip2 -I/opt/pkgsrc/work/pkgsrc/pkgtools/pkg_install/default/zlib -I/opt/pkgsrc/work/pkgsrc/pkgtools/pkg_install/default/libarchive/libarchive -I/opt/pkgsrc/work/pkgsrc/pkgtools/pkg_install/default/libfetch -DHAVE_NBCOMPAT_H=1 -I/opt/pkgsrc/work/pkgsrc/pkgtools/pkg_install/default/libnbcompat conftest.c >&5
    conftest.c: In function `main':
    conftest.c:105: error: `isblank' undeclared (first use in this function)
    conftest.c:105: error: (Each undeclared identifier is reported only once
    conftest.c:105: error: for each function it appears in.)
    configure:5927: $? = 1



/usr/include/ctype.h (SuSE 9.0):

    124 /* ISO C99 introduced one new function.  */
    125 #ifdef  __USE_ISOC99
    126 __BEGIN_NAMESPACE_C99
    127
    128 __exctype (isblank);
    129
    130 __END_NAMESPACE_C99
    131 #endif
 


Home | Main Index | Thread Index | Old Index