From xemacs-m  Tue Feb  4 17:29:28 1997
Received: from herald.cc.purdue.edu (herald.cc.purdue.edu [128.210.11.29])
	by xemacs.org (8.8.5/8.8.5) with SMTP id RAA12572
	for <xemacs-beta@xemacs.org>; Tue, 4 Feb 1997 17:29:25 -0600 (CST)
Received: from ppp-x9-13.ecn.purdue.edu by herald.cc.purdue.edu; Tue, 4 Feb 97 18:29:21 -0500
Received: (from somasekh@localhost) by ppp-x9-13.ecn.purdue.edu (8.8.4/8.6.12) id SAA06189; Tue, 4 Feb 1997 18:28:03 -0500
Date: Tue, 4 Feb 1997 18:28:03 -0500
Message-Id: <199702042328.SAA06189@ppp-x9-13.ecn.purdue.edu>
From: Dinesh Somasekhar <somasekh@ecn.purdue.edu>
To: xemacs-beta@xemacs.org
Subject: GNU libc-2.0 & xemacs-19.15-beta92: Failure then success on Linux 2.1.24
Reply-To: somasekh@ecn.purdue.edu
X-URL: http://albrecht.ecn.purdue.edu/~somasekh
X-Organization: Purdue University
X-face:  57,u^#nsk>2N2INb(Afe~^~B}j[t7+B)>u]%DYS:\XA8yL6?[*<0"yBBb@*u/e@K#F6?Fi5
 WB?GMJvJPt$5W0bRNZ{dH%ybQO%$]M)b~_G[!*0"[82&2t[3o{EQB87/0J@AtN6@cz1zM_FD1~{maV
 ;qd6T/s(+&j&QJ"zv5'GQU%10P\R)}aW1xq3(;U<M}8W^~Y:4M9cnj"M+R9_FKM%E[HEyle7['_!|i
 (



Hi,

  I had the following problems compiling xemacs-19.15-beta92 on
Linux2.1.24, with glibc-2.0.

o Compile fails in src/floatfuns.c unless -D_GNU_SOURCE is defined
(this is because struct exception and others are defined only if
__USE_SVID gets defined in math.h ). It compiles with D_GNU_SOURCE
defined.

floatfns.c:978: warning: `struct exception' declared inside parameter list
floatfns.c:978: warning: its scope is only this definition or declaration,
floatfns.c:978: warning: which is probably not what you want.
floatfns.c: In function `matherr':
floatfns.c:987: dereferencing pointer to incomplete type
floatfns.c:988: dereferencing pointer to incomplete type
floatfns.c:990: dereferencing pointer to incomplete type
floatfns.c:992: dereferencing pointer to incomplete type
floatfns.c:994: `DOMAIN' undeclared (first use this function)
....	

o xemacs seg-faults on startup in regex.c, I have attached the
trace. fault occurs in macro GET_BUFFER(34) line 2019: func
regex_compile. NOTE: I have --use-system-malloc defined.

Here are the configure options.
------------------------------------------------------------------------------
./configure i586-unknown-linux --with-gcc --cflags='-O2 -m486 -pipe' --dynamic --with-menubars=lucid --with-scrollbars=lucid --with-xpm --with-xface --with-gif --with-jpeg --with-png --with-dialogs=athena --use-system-malloc

Configured for `i586-unknown-linux'.

  Where should the build process find the source code?    /usr/local/src/xemacs-19.15-b92
  What installation prefix should install use?            /usr/local
  What operating system and machine description files should XEmacs use?
        `s/linux.h' and `m/intel386.h'
  What compiler should XEmacs be built with?              gcc -O2 -m486 -pipe -g
  Should XEmacs use the GNU version of malloc?            no
  (User chose not to use GNU allocators.)
  Should XEmacs use the relocating allocator for buffers? yes
  What window system should XEmacs use?                   x11
  Where do we find X Windows header files?                /usr/X11R6/include
  Where do we find X Windows libraries?                   /usr/X11R6/lib
  Compiling in support for XAUTH.
  Compiling in support for XPM.
  Compiling in support for X-Face headers.
  Compiling in support for GIF image conversion.
  Compiling in support for JPEG image conversion.
  Compiling in support for PNG image conversion.
  Compiling in support for Berkeley DB.
  Using the Lucid menubar.
  Using the Lucid scrollbar.
  Using the Athena dialog boxes.
  Compiling in extra code for debugging.
------------------------------------------------------------------------------
Starting program: /home/local/src/xemacs-19.15-b92/src/xemacs 

Program received signal SIGSEGV, Segmentation fault.
0x4027a363 in status ()
(gdb) where
#0  0x4027a363 in status ()
#1  0x4028df38 in status ()
#2  0x4027a2ce in status ()
#3  0x81198d3 in regex_compile (
    pattern=0x8274050 "\\`\\*?[-?*][^-]*[-?][^-]*[-?]\\([^-]*\\)[-?]\\([^-]?\\)[-?]\\([^-]*\\)[-?]\\([^-]*\\)[-?]\\(\\*\\|[0-9]+\\)[-?]\\(\\*\\|0\\|[0-9][0-9]+\\)[-?]\\([*0]\\|[0-9][0-9]+\\)[-?]\\([*0]\\|[0-9][0-9]+\\)[-?][cmp?*][-?]\\(\\*\\|[0-9]+\\)["..., size=219, syntax=262144, bufp=0x82b20b4) at regex.c:2019
#4  0x8121207 in sys_re_compile_pattern (
    pattern=0x8274050 "\\`\\*?[-?*][^-]*[-?][^-]*[-?]\\([^-]*\\)[-?]\\([^-]?\\)[-?]\\([^-]*\\)[-?]\\([^-]*\\)[-?]\\(\\*\\|[0-9]+\\)[-?]\\(\\*\\|0\\|[0-9][0-9]+\\)[-?]\\([*0]\\|[0-9][0-9]+\\)[-?]\\([*0]\\|[0-9][0-9]+\\)[-?][cmp?*][-?]\\(\\*\\|[0-9]+\\)["..., length=219, bufp=0x82b20b4) at regex.c:5304
#5  0x81231a4 in compile_pattern_1 (cp=0x82b20ac, pattern=942096452, 
    translate=0x82baa3c "", regp=0x828d5d0, posix=0, errb={
      really_unlikely_name_to_have_accidentally_in_a_non_errb_structure = 666})
    at search.c:137
#6  0x812326e in compile_pattern (pattern=942096452, regp=0x828d5d0, 
    translate=0x82baa3c "", posix=0, errb={
      really_unlikely_name_to_have_accidentally_in_a_non_errb_structure = 666})
    at search.c:178
#7  0x81237b1 in string_match_1 (regexp=942096452, string=943201556, 
    start=405519924, buf=0x82e5448, posix=0) at search.c:379
#8  0x81238a8 in Fstring_match (regexp=942096452, string=943201556, 
    start=405519924, buffer=405519924) at search.c:411
#9  0x8087bc1 in primitive_funcall (fn=0x8123880 <Fstring_match>, nargs=4, 
    args=0xbfffe164) at eval.c:3502
#10 0x8087d88 in funcall_subr (subr=0x82822e4, args=0xbfffe164) at eval.c:3524
#11 0x8087380 in funcall_recording_as (recorded_as=405620916, nargs=3, 
    args=0xbfffe1c0) at eval.c:3208
#12 0x8087463 in Ffuncall (nargs=3, args=0xbfffe1c0) at eval.c:3254
#13 0x8060ef6 in Fbyte_code (bytestr=942097328, vector=1210532860, maxdepth=5)
    at bytecode.c:450
#14 0x8088178 in funcall_lambda (fun=405226544, nargs=2, arg_vector=0xbfffe2d0)
    at eval.c:3634
#15 0x808741e in funcall_recording_as (recorded_as=406222980, nargs=3, 
    args=0xbfffe2cc) at eval.c:3224
#16 0x8087463 in Ffuncall (nargs=3, args=0xbfffe2cc) at eval.c:3254
#17 0x8060ef6 in Fbyte_code (bytestr=942097868, vector=1210533364,maxdepth=4)
-----------------------------------------------------------------------------

Recompiled after removing --use-system-malloc. 

o Compilation failed in src/gmalloc.c. This is because glibc-2.0 has 
/usr/include/unistd.h defining

extern int __getpagesize __P ((void));

while gmalloc.c defines it as

extern size_t __getpagesize __P ((void));

changed size_t to int.  Compiled successfully.

No more segfaults. I have not had any problems as yet. configuration
options same as above except there is no --use-system-malloc.

--
Dinesh Somasekhar

