On Sun, Jul 29, 2001 at 11:19:20PM +0400, Andy Igoshin wrote:
> Итого, где проблема то?
В компиляторе.
При сборке, если berkeleydb находится в /usr (или по какой-либо
другой причине) в командную строку вперед вылазит -I/usr/include
и включена оптимизация, то начинаются глюки.
lithium(/5)arkadi:~/tmp/b/oops-1.5.18.1/src> gcc -O -I/usr/include -DREGEX
-DHAVE_STRING_H -c gnu_regex.c
gnu_regex.c:83: conflicting types for `malloc'
/usr/include/stdlib.h:526: previous declaration of `malloc'
lithium(/5)arkadi:~/tmp/b/oops-1.5.18.1/src> gcc -O -DREGEX -DHAVE_STRING_H -c
gnu_regex.c
lithium(/5)arkadi:~/tmp/b/oops-1.5.18.1/src> gcc -I/usr/include -DREGEX
-DHAVE_STRING_H -c gnu_regex.c
lithium(/5)arkadi:~/tmp/b/oops-1.5.18.1/src> gcc -O -I/usr/include -DREGEX
-DHAVE_STRING_H -E gnu_regex.c -o a
lithium(/5)arkadi:~/tmp/b/oops-1.5.18.1/src> gcc -O -DREGEX -DHAVE_STRING_H -E
gnu_regex.c -o b
lithium(/5)arkadi:~/tmp/b/oops-1.5.18.1/src> diff a b |egrep -v '^([<>] #|[0-9]|---)'
lithium(/5)arkadi:~/tmp/b/oops-1.5.18.1/src> diff a b |head -20
4,11c4,11
< # 27 "/usr/include/sys/types.h" 1
< # 284 "/usr/include/features.h" 1
< # 1 "/usr/include/sys/cdefs.h" 1
< # 284 "/usr/include/features.h" 2
< # 312 "/usr/include/features.h"
< # 1 "/usr/include/gnu/stubs.h" 1
< # 312 "/usr/include/features.h" 2
< # 27 "/usr/include/sys/types.h" 2
---
> # 27 "/usr/include/sys/types.h" 1 3
> # 284 "/usr/include/features.h" 1 3
> # 1 "/usr/include/sys/cdefs.h" 1 3
> # 284 "/usr/include/features.h" 2 3
> # 312 "/usr/include/features.h" 3
> # 1 "/usr/include/gnu/stubs.h" 1 3
> # 312 "/usr/include/features.h" 2 3
> # 27 "/usr/include/sys/types.h" 2 3
16c16
< # 30 "/usr/include/bits/types.h" 1
Broken pipe
lithium(/5)arkadi:~/tmp/b/oops-1.5.18.1/src> gcc -v
Reading specs from /usr/lib/gcc-lib/i386-asplinux-linux/2.96/specs
gcc version 2.96 20000731 (ASPLinux)
lithium(/5)arkadi:~/tmp/b/oops-1.5.18.1/src> /lib/libc.so.6 |head -1
GNU C Library stable release version 2.2, by Roland McGrath et al.
2.95.3 ведет себя также.
Если применить -save-temps, то результирующий .s фаил можно
потом оттранслировать as, несмотря на ошибку компилятора, и
он не будет отличаться от "нормального" gnu_regex.o.
-pedantic-errors и -Wstrict-prototypes наводят на мысль о
странном заскоке с обработкой варнингов/ошибок.
Все-же gnu_regex надо поправить. Неправильно это определять
malloc() когда есть stdlib.h.
arkadi.
=====================================================================
If you would like to unsubscribe from this list send message to
[EMAIL PROTECTED] with "unsubscribe oops" in message body.
Archive is accessible on http://www.paco.net/oops/