Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* findutils 4.1 compile probs
@ 1998-08-04  4:00 Pedro Saraiva
  1998-08-07  4:00 ` Frank Durda IV
  1998-08-08  4:00 ` Hans Schwengeler
  0 siblings, 2 replies; 3+ messages in thread
From: Pedro Saraiva @ 1998-08-04  4:00 UTC (permalink / raw)


	Hi,

I got compile errors during the make run of findutils 4.1. Here is the error
message

make
for subdir in lib find xargs locate doc testsuite; do  echo making all in $subdi
r ;  (cd $subdir; make all);  done
making all in lib
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O fnmatch.c
fnmatch.c: In function `fnmatch':
fnmatch.c:58: `FNM_CASEFOLD' undeclared (first use this function)
fnmatch.c:58: (Each undeclared identifier is reported only once
fnmatch.c:58: for each function it appears in.)
fnmatch.c:65: `FNM_FILE_NAME' undeclared (first use this function)
fnmatch.c:193: `FNM_LEADING_DIR' undeclared (first use this function)
*** Exit 1
Stop.
*** Exit 1
Stop.

Is there someone who knows how to solve this problem ? Thanks,

					Pedro

-- 
"I've seen things you people wouldn't believe.  Attack ships on fire
  off the shoulder of Orion. I've watched C-beams glitter in the dark
  near the Tannhauser Gate.  All these memories will be lost in time,
  like tears in rain. Time to die."                       -- Roy Baty



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: findutils 4.1 compile probs
  1998-08-04  4:00 findutils 4.1 compile probs Pedro Saraiva
@ 1998-08-07  4:00 ` Frank Durda IV
  1998-08-08  4:00 ` Hans Schwengeler
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Durda IV @ 1998-08-07  4:00 UTC (permalink / raw)


Pedro Saraiva wrote:
> I got compile errors during the make run of findutils 4.1. Here is the error
> message
> 
> make
> for subdir in lib find xargs locate doc testsuite; do  echo making all in $subdi
> r ;  (cd $subdir; make all);  done
> making all in lib
> gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O fnmatch.c
> fnmatch.c: In function `fnmatch':
> fnmatch.c:58: `FNM_CASEFOLD' undeclared (first use this function)
> fnmatch.c:58: (Each undeclared identifier is reported only once
> fnmatch.c:58: for each function it appears in.)
> fnmatch.c:65: `FNM_FILE_NAME' undeclared (first use this function)
> fnmatch.c:193: `FNM_LEADING_DIR' undeclared (first use this function)
> *** Exit 1
> Stop.
> Is there someone who knows how to solve this problem ? Thanks,


Yep, it's yet another "not quite POSIX" problem in DEC/Compaq OSF.
I had to install GNU find recently due to fatal bugs in the OSF find
program (DEC OSF 4.0B or D find exits if a file or dir disappears
between the directory read and the file stat() call so you can't
use it on an active filesystem - Ticket C980612-609 if you want to
sing along) and ran into the same problem trying to build GNU find.

The problem is that /usr/include/fnmatch.h from DEC/Compaq is missing
some things it is supposed to have.  GNU Find comes with a fnmatch
of its own, but configure elects to use the DEC/Compaq version since
the OS claims to be POSIX compliant, but it is not.  The solution is to
lie to GNU and tell it to use its own copies of fnmatch.

The quick fix is to run "configure", do a make clean, then apply
these two patches to lib/fnmatch,c and lib/fnmatch.h:

*** fnmatch.c00 Mon Sep 26 17:04:34 1994
--- fnmatch.c   Tue Jul 28 13:53:11 1998
***************
*** 20,26 ****
  #endif
  
  #include <errno.h>
! #include <fnmatch.h>
  #include <ctype.h>
  
  
--- 20,27 ----
  #endif
  
  #include <errno.h>
! /*#include <fnmatch.h>*/
! #include "fnmatch.h"
  #include <ctype.h>


** fnmatch.h00 Mon Sep 26 17:03:58 1994
--- fnmatch.h   Tue Jul 28 13:54:33 1998
***************
*** 46,56 ****
  #define       FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
  #define       FNM_PERIOD      (1 << 2) /* Leading `.' is matched only explicitly.  */
  
! #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
  #define       FNM_FILE_NAME   FNM_PATHNAME /* Preferred GNU name.  */
  #define       FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match.  */
  #define       FNM_CASEFOLD    (1 << 4) /* Compare without regard to case.  */
! #endif
  
  /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
  #define       FNM_NOMATCH     1
--- 46,56 ----
  #define       FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
  #define       FNM_PERIOD      (1 << 2) /* Leading `.' is matched only explicitly.  */
  
! /*#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)*/
  #define       FNM_FILE_NAME   FNM_PATHNAME /* Preferred GNU name.  */
  #define       FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match.  */
  #define       FNM_CASEFOLD    (1 << 4) /* Compare without regard to case.  */
! /*#endif*/
  
  /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
  #define       FNM_NOMATCH     1

This has not been tested exhaustively, but it compiles with no warnings, and has
worked for what I want to use GNU find for.

I'll leave writing a more sophisticated configure script or fixing
the missing includes/functions in OSF to someone else.


Frank Durda IV - only these addresses work:|"If a problem is reported and the
   <uhclem.aug98%nemesis.lonestar.org>     | vendor ignores it, does the
This Anti-spam address expires August 31st | customer make any sound? 
(c) 1998, ask before reprinting.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: findutils 4.1 compile probs
  1998-08-04  4:00 findutils 4.1 compile probs Pedro Saraiva
  1998-08-07  4:00 ` Frank Durda IV
@ 1998-08-08  4:00 ` Hans Schwengeler
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Schwengeler @ 1998-08-08  4:00 UTC (permalink / raw)


In article <35c6ddbc.0@rainbow.hrz.uni-siegen.de>,
	Pedro Saraiva <saraiva@siux00.physik.uni-siegen.de> writes:
> 	Hi,
> 
> I got compile errors during the make run of findutils 4.1. Here is the error
> message
> 
> make
> for subdir in lib find xargs locate doc testsuite; do  echo making all in $subdi
> r ;  (cd $subdir; make all);  done
> making all in lib
> gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O fnmatch.c
> fnmatch.c: In function `fnmatch':
> fnmatch.c:58: `FNM_CASEFOLD' undeclared (first use this function)
> fnmatch.c:58: (Each undeclared identifier is reported only once
> fnmatch.c:58: for each function it appears in.)
> fnmatch.c:65: `FNM_FILE_NAME' undeclared (first use this function)
> fnmatch.c:193: `FNM_LEADING_DIR' undeclared (first use this function)
> *** Exit 1
> Stop.
> *** Exit 1
> Stop.
> 
> Is there someone who knows how to solve this problem ? Thanks,
> 
> 					Pedro
> 

According to an e-mail exchange with another user with similar problems,
one can compile findutils-4.1 if one specifies -D_GNU_SOURCE.

Yours, hs.
-- 
===============================================================================
Hans Schwengeler                DECNET/SPAN:	20579::48130::SCHWENGELER
Astronomical Institute		INTERNET:	schweng@astro.unibas.ch
University of Basel                             schwengeler@urz.unibas.ch
Venusstrasse 7
CH-4102 Binningen               PHONE:    +41 61 20 55 422
Switzerland                     FAX:      +41 61 20 55 455
===============================================================================



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-08-08  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-04  4:00 findutils 4.1 compile probs Pedro Saraiva
1998-08-07  4:00 ` Frank Durda IV
1998-08-08  4:00 ` Hans Schwengeler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox