ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Dmitry Samoyloff <dsamoyloff@mail.ru>
To: mandrake-russian@altlinux.ru
Subject: Re: [mdk-re] Re: [mdk-re] include_next, kdevelop и вс е такое
Date: Thu May  3 12:30:09 2001
Message-ID: <01050107065800.07703@localhost.localdomain> (raw)
In-Reply-To: <20010430124809.783c4cf1.vsu@mivlgu.murom.ru>

30 Апрель 2001 12:48, Sergey Vlasov wrote:
> 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 хоть отбавляй.

Спасибо, я узнал много нового! Но вот как мне повлиять на ситуацию (через 
Makefile.am?) я не знаю :( Подскажите, пожалуйста. То есть, как сгенерить 
нужные опции?

С уважением, Дмитрий Самойлов



  reply	other threads:[~2001-05-03 12:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-29  3:22 [mdk-re] include_next, kdevelop и все такое Dmitry Samoyloff
2001-04-29 12:03 ` Sergey Vlasov
2001-04-30  5:50   ` Dmitry Samoyloff
2001-04-30 12:11     ` [mdk-re] " Alexander Bokovoy
2001-04-30 12:45       ` Sergey Vlasov
2001-05-03 12:30         ` Dmitry Samoyloff [this message]
2001-05-04 14:06           ` [mdk-re] Re: [mdk-re] include_next, kdevelop и вс е такое Sergey Vlasov
2001-05-05  5:08             ` Dmitry Samoyloff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01050107065800.07703@localhost.localdomain \
    --to=dsamoyloff@mail.ru \
    --cc=mandrake-russian@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

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


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