ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: devel@lists.altlinux.org
Subject: [devel] rpm-build-4.0.4-alt78 pkgconfig dependencies
Date: Tue, 11 Sep 2007 12:43:20 +0400
Message-ID: <20070911084320.GJ6051@solemn.turbinal> (raw)

[-- Attachment #1: Type: text/plain, Size: 7443 bytes --]

Ещё около десяти пакетов не собралось из-за проблем с pkg-config.
Раньше при поиске зависимостей все ошибки pkg-config тихо игнорировались.
Но игнорировать их не следует даже в принципе, посольку это связано не
только с Requires, но и с Provides.

При поиске зависимостей pkg-config делает как бы штатную проверку
возможности использования "пакета", то есть, в частности, проверяет,
что все пререквизиты *.pc файла установлены в системе (либо находятся в
RPM_BUILD_ROOT).  Ниже большая часть ошибок pkg-config связана с тем, что
в пакетах не хватает каких-то BuildRequires.  Но обнаружилось и две
реальные (совсем плохие) ошибки, которые я ниже поясню отдельно.

Прежде всего напомню, что *.pc файлы должны лежать в *-devel пакетах.
Семантика pkg-config зависимостей -- это сборочные зависимости, которые
связывают между собой *-devel пакеты, чтобы в одном *-devel пакете не
нужно было вручную писать зависимость на другой *-devel пакет.

Что нужно делать, если при поиске зависимостей pkg-config отваливает?
Во-первых, нужно запустить buildreq (на свежей сборочной среде).
Если buildreq сразу же не добавил никаких зависимостей, тогда
потребуется анализ ситуации.  Ситуация такая: в *.pc файле находятся
зависимости, которые не использовались на стадии сборки пакета,
что несколько странно.  Нужно подумать, не являются ли эти зависимости
лишними, то есть избыточными, не указаны ли они там на всякий случай.
Нужно посмотреть где используется или может использоваться пакет с
недостающей зависимостью, проверить хедеры и т.п.  Если же зависимость
реально требуется, то можно попробовать запустить buildreq -bi.
Впрочем, buildreq -bi, скорее всего, ничего не добавит, потому что
у него есть паттерн игнорирования файлов типа /usr/*/pkgconfig/.
В таком случае остается только проставить дополнительный BuildRequires
вручную.  Хотя, можно на стадии %build скомпилировать какую-нибудь
простенькую тестовую программу, чтобы все pkg-config пререквизиты
реально подцепились.

> devhelp-0.14-alt1
> 	find-provides: running scripts (alternatives,lib,pam,perl,pkgconfig,python,shell,tcl)
> 	Package libgnomeui-2.0 was not found in the pkg-config search path.
> 	Perhaps you should add the directory containing `libgnomeui-2.0.pc'
> 	to the PKG_CONFIG_PATH environment variable
> 	Package 'libgnomeui-2.0', required by 'devhelp', not found
> 	RPM build errors:
> 	error: /bin/sh failed
> 	error: Failed to find Provides
> 	/bin/sh failed

> fedora-ds-adminutil-1.1.2-alt1.20070817
> 	find-provides: running scripts (alternatives,lib,pam,perl,pkgconfig,python,shell,tcl)
> 	Package icu was not found in the pkg-config search path.
> 	Perhaps you should add the directory containing `icu.pc'
> 	to the PKG_CONFIG_PATH environment variable
> 	Package 'icu', required by 'adminutil', not found
> 	error: /bin/sh failed
> 	error: Failed to find Provides
> 	RPM build errors:

> libalut-1.1.0-alt1.2
> 	find-provides: running scripts (alternatives,lib,pam,perl,pkgconfig,python,shell,tcl)
> 	Package libopenal was not found in the pkg-config search path.
> 	Perhaps you should add the directory containing `libopenal.pc'
> 	to the PKG_CONFIG_PATH environment variable
> 	Package 'libopenal', required by 'freealut', not found
> 	RPM build errors:
> 	error: /bin/sh failed
> 	error: Failed to find Provides
> 	/bin/sh failed

> libgtkmathview-0.7.7-alt1
> 	find-provides: running scripts (alternatives,lib,pam,perl,pkgconfig,python,shell,tcl)
> 	Package mathmlview-backend-gtk was not found in the pkg-config search path.
> 	Perhaps you should add the directory containing `mathmlview-backend-gtk.pc'
> 	to the PKG_CONFIG_PATH environment variable
> 	Package 'mathmlview-backend-gtk', required by 'GtkMathView', not found
> 	RPM build errors:
> 	error: /bin/sh failed
> 	error: Failed to find Provides
> 	/bin/sh failed

> libopenal-0.0.8-alt3
> 	./usr/lib:
> 	/sbin/ldconfig: Cannot stat ./usr/lib/libopenal.so: No such file or directory
> 	/sbin/ldconfig: Cannot stat ./usr/lib/libopenal.so.0: No such file or directory
> 	libopenal.so.0 -> libopenal.so.0.0.0 (changed)
> 	--
> 	find-provides: running scripts (alternatives,lib,pam,perl,pkgconfig,python,shell,tcl)
> 	Package @requirements@ was not found in the pkg-config search path.
> 	Perhaps you should add the directory containing `@requirements@.pc'
> 	to the PKG_CONFIG_PATH environment variable
> 	Package '@requirements@', required by 'OpenAL', not found
> 	error: /bin/sh failed
> 	error: Failed to find Provides
> 	RPM build errors:

Отлов грубых ошибок -- крупная удача для того, кто пишет всякие
проверки.  В данном случае, скорее всего, где-то потерялась подстановка
s/@requirements@/что-то/.  То есть имеем реально битый *.pc файл.

> planner-0.14.2-alt3
> 	find-provides: running scripts (alternatives,lib,pam,perl,pkgconfig,python,shell,tcl)
> 	Package libgsf-1 was not found in the pkg-config search path.
> 	Perhaps you should add the directory containing `libgsf-1.pc'
> 	to the PKG_CONFIG_PATH environment variable
> 	Package 'libgsf-1', required by 'libplanner', not found
> 	RPM build errors:
> 	error: /bin/sh failed
> 	error: Failed to find Provides
> 	File listed twice: /usr/share/gnome/help/planner

> python-module-gst-0.10.8-alt1
> 	find-provides: running scripts (alternatives,lib,pam,perl,pkgconfig,python,shell,tcl)
> 	Package pygtk-2.0 was not found in the pkg-config search path.
> 	Perhaps you should add the directory containing `pygtk-2.0.pc'
> 	to the PKG_CONFIG_PATH environment variable
> 	Package 'pygtk-2.0', required by 'gst-python', not found
> 	RPM build errors:
> 	error: /bin/sh failed
> 	error: Failed to find Provides
> 	/bin/sh failed

> wbxml2-0.9.2-alt2.svn49synce
> 	find-provides: running scripts (alternatives,lib,pam,perl,pkgconfig,python,shell,tcl)
> 	Package libxml-2.0 was not found in the pkg-config search path.
> 	Perhaps you should add the directory containing `libxml-2.0.pc'
> 	to the PKG_CONFIG_PATH environment variable
> 	Package 'libxml-2.0', required by 'libwbxml2', not found
> 	error: /bin/sh failed
> 	error: Failed to find Provides
> 	RPM build errors:

> xmms2-0.2-alt5.DrHouse
> 	pkgconfig.prov: /usr/src/tmp/xmms2-buildroot/usr/lib/pkgconfig/xmms2-client-cpp-glib.pc:
> 	invalid pkg-config output: xmms2-client-cpp-glib = 0.2 DrHouse
> 	error: /bin/sh failed
> 	error:

Я также встроил дополнительную проверку на вывод pkg-config.  В данном
случае pkg-config вернул "четыре слова" вместо трех, то есть, надо
думать, вернул версию "0.2 DrHouse".  Эта версия явно не подходит для
rpm.  Вообще ситуация забавная.

$ rpm -qp --provides /ALT/Sisyphus/files/i586/RPMS/xmms2-devel-0.2-alt5.DrHouse.i586.rpm
pkgconfig(xmms2-client) = 0.2
DrHouse
pkgconfig(xmms2-client-cpp) = 0.2
pkgconfig(xmms2-client-cpp-glib) = 0.2
pkgconfig(xmms2-client-ecore) = 0.2
pkgconfig(xmms2-client-glib) = 0.2
pkgconfig(xmms2-plugin) = 0.2
xmms2-devel = 0.2-alt5.DrHouse
$

> xorg-x11-proto-devel-7.3.0-alt4
> 	find-provides: running scripts (alternatives,lib,pam,perl,pkgconfig,python,shell,tcl)
> 	Package xau was not found in the pkg-config search path.
> 	Perhaps you should add the directory containing `xau.pc'
> 	to the PKG_CONFIG_PATH environment variable
> 	Package 'xau', required by 'PrintProto', not found
> 	error: /bin/sh failed
> 	error: Failed to find Provides
> 	RPM build errors:

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

                 reply	other threads:[~2007-09-11  8:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20070911084320.GJ6051@solemn.turbinal \
    --to=at@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /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 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