[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Problem with tempnam ... grrr....



Add
	#include "ldap_config.h"

to libraries/liblutil/tempnam.c and then try again. By the way, this file is
no longer used in OpenLDAP 2.1.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of Jan Banan
> Sent: Thursday, September 12, 2002 2:28 PM
> To: openldap-bugs@OpenLDAP.org
> Subject: Re: Problem with tempnam ... grrr....
>
>
> I have now tried the compilation of OpenLDAP 2.0.25-20020618 on different
> computers and it really won't compile on RedHat 7.2 , but it _do_
> compile on
> both RedHat 7.1 and 7.3 ...
>
> I'm trying to understand what this "tempnam" thing is... it seems like its
> icluded in the OpenLDAP distro (tempnam.c) so why is ./configure checking
> like this "checking for tempnam... no". On both RH 7.1 and 7.3 this is
> "yes"...
>
>        Best regards / FM
>
>
> >
> >Have anyone successfully compiled OpenLDAP 2.0.25-20020618 on i686 Linux
> >RedHat 7.2? I am wondering since I can compile it under RedHat
> 7.3 but not
> >under RedHat 7.2, frustrating... :(
> >
> >"make" tells me:
> >
> >/pkg-local/gcc/3.2/bin/gcc -g -O2 -I../../include        -I../../include
> >   -c -o tempnam.o tempnam.c
> >tempnam.c: In function `tempnam':
> >tempnam.c:20: `LDAP_TMPDIR' undeclared (first use in this function)
> >tempnam.c:20: (Each undeclared identifier is reported only once
> >tempnam.c:20: for each function it appears in.)
> >make[2]: *** [tempnam.o] Error 1
> >make[2]: Leaving directory
> >`/nfs/build/ior/openldap-2.0.25-20020618/libraries/liblutil'
> >make[1]: *** [all-common] Error 1
> >make[1]: Leaving directory
> >`/nfs/build/ior/openldap-2.0.25-20020618/libraries'
> >make: *** [all-common] Error 1
> >
> >Interesting line from "./configure":
> >
> >     checking for tempnam... no
> >
> >This is from "config.log":
> >
> >configure:16931: checking for tempnam
> >configure:16960: /pkg-local/gcc/3.2/bin/gcc -o conftest -g -O2
> conftest.c
> >-lresolv -ldl  1>&5
> >/usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
> >/usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
> >/usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
> >/tmp/ccCVn6VY.o: In function `main':
> >:16954: the use of `tempnam' is dangerous, better use `mkstemp'
> >collect2: ld returned 1 exit status
> >configure: failed program was:
> >#line 16936 "configure"
> >#include "confdefs.h"
> >/* System header to define __stub macros and hopefully few prototypes,
> >    which can conflict with char tempnam(); below.  */
> >#include <assert.h>
> >/* Override any gcc2 internal prototype to avoid an error.  */
> >/* We use char because int might match the return type of a gcc2
> >    builtin and then its argument prototype would still apply.  */
> >char tempnam();
> >char (*f)();
> >
> >int main() {
> >
> >/* 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_tempnam) || defined (__stub___tempnam)
> >choke me
> >#else
> >f = tempnam;
> >#endif
> >
> >; return 0; }
> >configure:16997: checking declaration of sys_errlist
> >configure:17016: /pkg-local/gcc/3.2/bin/gcc -c -g -O2  conftest.c 1>&5
> >
> >
> >Any idea why "make" failes? For me it seems to be a problem with "tempnam"
> >here. Is it possible to solve in some way?
> >
> >Any hints are welcome! This shit drives me crazy..
> >
> >        Best regards / Jan
> >
> >_________________________________________________________________
> >MSN Hotmail är världens populäraste e-posttjänst. Skaffa dig ett
> eget konto
> >du också: http://www.hotmail.com
>
>
>
>
> _________________________________________________________________
> Med MSN Foto kan du enkelt dela med dig av dina fotografier och beställa
> kopior: http://photos.msn.se
>
>
>