ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Re: [mdk-re] Re: [mdk-re] include_next, kdevelop и все такое
  @ 2001-04-30  8:48       ` Sergey Vlasov
  0 siblings, 0 replies; only message in thread
From: Sergey Vlasov @ 2001-04-30  8:48 UTC (permalink / raw)
  To: mandrake-russian; +Cc: devel

On Mon, 30 Apr 2001 11:09:16 +0300
Alexander Bokovoy <ab@avilink.net> wrote:

> On Mon, Apr 30, 2001 at 05:49:43AM +0400, Dmitry Samoyloff wrote:
> > 29 Апрель 2001 12:06, Sergey Vlasov wrote:
> > > On Sun, 29 Apr 2001 02:21:06 +0400
> > >
> > > Dmitry Samoyloff <dsamoyloff@mail.ru> wrote:
> > > > Здравствуйте!
> > > >
> > > > Извиняйте за оффтопик, но это появилось после установки Spring и
> кто-то,
> > > > может быть, знает в чем дело. Во-первых, мой Qt/KDE-проект стал
> выдавать
> > > > такие вот warnings:
> > > >
> > > > In file included from /usr/lib/qt2/include/qwindowdefs.h:48,
> > > > <...>
> > > > /usr/include/limits.h:124:3: warning: ISO C does not allow
> #include_next
> > > >
> > > > В /usr/include/limits.h написано следующее:
> > > >
> > > > #if defined __GNUC__ && !defined _GCC_LIMITS_H_
> > > > /* `_GCC_LIMITS_H_' is what GCC's file defines.  */
> > > > # include_next <limits.h>
> > > >
> > > > Думаю, что-то надо подкрутить в configure.in или где-то рядом :-)
> > > > Помогите
> > > > pls, а то в проекте полсотни исходных файлов -- и почти каждый
> ругается,
> > > > ужас
> > > > просто!
> > >
> > > А с какими ключами вызывается компилятор? Похоже, что это виновата
> > > комбинация -ansi -pedantic c -I/usr/include. Кстати, надо бы найти,
> откуда
> > > берется -I/usr/include, и выкорчевать - даже в info gcc написано,
> что эта
> > > опция может вызывать глюки.
> > 
> > Спасибо, что откликнулись на мой вопрос!
> > Опции такие:
> > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/lib/qt2/include
> > -I/usr/X11R6/include     -O2 -fno-exceptions -fno-check-new -Wall
> -pedantic 
> > -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long
> > -fno-builtin -O0 -g3 -Wall  -c file.cpp
> > 
> > Значит, нужно попробовать убрать -pedantic и -I/usr/include (странно,
> кстати, 
> > такой ведь безобидный ключик). Только вот эти опции генерятся
> автоматически 
> > из Makefile.am, а что в нем подправить -- не знаю :( Буду очень
> признателен 
> > за подсказку.
> -I/usr/include является отнюдь не безобидным ключем, ведь он вносит
> /usr/include в список директорий для поиска пользовательских файлов
> заголовков, причем в самое начало этого списка. Тем самым, Вы
> заставляете
> компилятор игнорировать, например, foo.h в /usr/lib/qt2/include, 
> если он есть в /usr/include.

В данном случае проблема не в таком конфликте, а в файлах из каталога
/usr/lib/gcc-lib/i586-mandrake-linux/2.96/include/. Например, там есть
limits.h от компилятора, а в /usr/include - от glibc, и они друг друга
включают через #include_next. Но при обработке файлов из gcc-lib
расширения gcc разрешены даже при использовании -pedantic, а в
/usr/include возникает ругань.

А вообще с -I/usr/include у меня были серьезные проблемы, когда цеплялся
не тот db.h, который был нужен.

И, кстати, подобная ошибка встречается во многих местах:

$ gnome-config --cflags gnome
-I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/usr/X11R6/include
$ rpm -qf `which gnome-config`
gnome-libs-devel-1.2.11-ipl4mdk
$ gtkmm-config --cflags
-I/usr/lib/gtkmm/include -I/usr/include -I/usr/lib/glib/include
-I/usr/X11R6/include -I/usr/lib/sigc++/include
$ rpm -qf `which gtkmm-config`
gtkmm-devel-1.2.5-ipl1mdk
$ sane-config --cflags
-I/usr/include
$ rpm -qf `which sane-config`
sane-1.0.4-ipl1mdk

Так что возможностей нацеплять -I/usr/include хоть отбавляй.
_______________________________________________
Devel mailing list
Devel@linux.iplabs.ru
http://www.logic.ru/mailman/listinfo/devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-04-30  8:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-30  8:48       ` [devel] Re: [mdk-re] Re: [mdk-re] include_next, kdevelop и все такое Sergey Vlasov

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git