ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
To: "Sergey Y. Afonin" <asy@altlinux.ru>
Cc: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Принудительно установить версию GCC в SPEC
Date: Thu, 10 Apr 2014 20:35:27 +0400
Message-ID: <20140410163526.GA23327@glebfm.cloud.tilaa.com> (raw)
In-Reply-To: <201404100146.27487.asy@altlinux.ru>


[-- Attachment #1.1: Type: text/plain, Size: 1857 bytes --]

On Thu, Apr 10, 2014 at 01:46:27AM +0400, Sergey Y. Afonin wrote:
> Может, делать удаление gcc/gcc-c++, отличных от X.Y, если макрос есть ?
> Или что-то мешает ?

Что мешает использовать тот gcc, который вам нужен вместо того, который
лежит и не мешает?

> А gccX.Y-с++ ? Или, в этом случае, "BuildRequires: gccX.Y-c++" требуется
> всё равно, если c++ надо ?

Да, требуется, также как и для всех gcc-что-нибудь (удобно писать
'gcc%{?_gcc_version}-что-нибудь' вместо gccX.Y-что-нибудь).

> Или это вот
> 
> Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
> ldd: ERROR: ./usr/lib/xorp/bin/rip_show_stats: trace failed

Возможно, это может быть результатом работы chrpath. После его отключения
такие проблемы у меня исчезают.

> последствие не gcc4.8, а чего-то другого ? Хотя, если посмотреть в xorp-овский
> git https://github.com/greearb/xorp.ct/tree/master/xorp, видно, что какие-то
> исправления для 4.8 были уже, правда давно.

Вы так говорите, будто между t6 и Сизифом мог измениться только gcc. ;)

А в 4.7 правда какой-то internal error, используйте 4.6.
Так (см. diff) у меня всё собирается (в Сизифе на 4.8, в t7 на 4.6, в t6
на 4.5)

-- 
glebfm
 
Глеб Фотенгауэр-Малиновский

[-- Attachment #1.2: xorp.spec.diff --]
[-- Type: text/plain, Size: 2342 bytes --]

diff --git a/xorp.spec b/xorp.spec
index c134a1f..4492f35 100644
--- a/xorp.spec
+++ b/xorp.spec
@@ -37,7 +37,7 @@ BuildRequires:    chrpath
 
 # Automatically added by buildreq on Tue Apr 08 2014
 # optimized out: libstdc++-devel libtinfo-devel python-base python-modules python-modules-compiler python-modules-email xz
-BuildRequires:    cvs flex gcc4.5-c++ libncurses-devel libpcap-devel libpcre-devel libssl-devel scons
+BuildRequires:    cvs flex gcc-c++ libncurses-devel libpcap-devel libpcre-devel libssl-devel scons
 
 
 %description
@@ -53,9 +53,7 @@ functionality, including support for custom hardware and software forwarding.
 
 
 %build
-%set_gcc_version 4.5
-
-scons -j4 \
+[ -n "$NPROCS" ] || NPROCS='%__nprocs'; scons -j$NPROCS \
 	DESTDIR=${RPM_BUILD_ROOT}     \
 	sbindir=%{_sbindir}           \
 	prefix=%{prefixdir}           \
@@ -63,6 +61,8 @@ scons -j4 \
 	sysconfdir=%{_sysconfdir}     \
 	xorp_confdir=%{_sysconfdir}   \
 	localstatedir=%{_localstatedir} \
+	build=%_configure_platform \
+	rtld_origin=false \
 %if %with_shared
 	shared=yes \
 %endif
@@ -92,6 +92,8 @@ scons \
 	sysconfdir=%{_sysconfdir}     \
 	xorp_confdir=%{_sysconfdir}   \
 	localstatedir=%{_localstatedir} \
+	build=%_configure_platform \
+	rtld_origin=false \
 %if %with_shared
 	shared=yes \
 %endif
@@ -106,15 +108,8 @@ scons \
 %{__install} -m 0644 %{SOURCE3}           ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/xorp
 %{__install} -m 0660 %{SOURCE4}           ${RPM_BUILD_ROOT}%{_sysconfdir}/xorp
 
-
-# remove rpath
-find %buildroot -type f -exec file {} \; | grep ELF | sed "s/^\([^ ]*\): ELF.*/\1/" | \
-	while read f; do chrpath -d $f; done
-
-%set_verify_elf_method unresolved=relaxed
-
 %pre
-if ! getent group  xorp >/dev/null 2>&1; then
+if ! getent group xorp >/dev/null 2>&1; then
 	/usr/sbin/groupadd -r xorp
 
 	# xorpsh is using group's permission for access to xorp.
@@ -141,12 +136,12 @@ exit 0
 %attr(660,root,xorp) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xorp/xorp.conf
 
 %dir %_datadir/%name
-%dir %_libexecdir/%name
+%dir /usr/lib/%name
 %dir %_logdir/%name
 
 %_sbindir/*
 %_datadir/%name/*
-%_libexecdir/%name/*
+/usr/lib/%name/*
 
 %changelog
 * Wed Apr 09 2014 Sergey Y. Afonin <asy@altlinux.ru> 1.8.6-alt0.20130830.1

[-- Attachment #1.3: xorp.spec.t7.diff --]
[-- Type: text/plain, Size: 2491 bytes --]

diff --git a/xorp.spec b/xorp.spec
index c134a1f..230b761 100644
--- a/xorp.spec
+++ b/xorp.spec
@@ -4,6 +4,7 @@
 %define prefixdir	/usr
 %define snapshot	1
 
+%set_gcc_version 4.6
 Name: xorp
 
 %define baseversion 1.8.6
@@ -37,7 +38,7 @@ BuildRequires:    chrpath
 
 # Automatically added by buildreq on Tue Apr 08 2014
 # optimized out: libstdc++-devel libtinfo-devel python-base python-modules python-modules-compiler python-modules-email xz
-BuildRequires:    cvs flex gcc4.5-c++ libncurses-devel libpcap-devel libpcre-devel libssl-devel scons
+BuildRequires:    cvs flex gcc%{?_gcc_version}-c++ libncurses-devel libpcap-devel libpcre-devel libssl-devel scons
 
 
 %description
@@ -53,9 +54,7 @@ functionality, including support for custom hardware and software forwarding.
 
 
 %build
-%set_gcc_version 4.5
-
-scons -j4 \
+[ -n "$NPROCS" ] || NPROCS='%__nprocs'; scons -j$NPROCS \
 	DESTDIR=${RPM_BUILD_ROOT}     \
 	sbindir=%{_sbindir}           \
 	prefix=%{prefixdir}           \
@@ -63,6 +62,8 @@ scons -j4 \
 	sysconfdir=%{_sysconfdir}     \
 	xorp_confdir=%{_sysconfdir}   \
 	localstatedir=%{_localstatedir} \
+	build=%_configure_platform \
+	rtld_origin=false \
 %if %with_shared
 	shared=yes \
 %endif
@@ -92,6 +93,8 @@ scons \
 	sysconfdir=%{_sysconfdir}     \
 	xorp_confdir=%{_sysconfdir}   \
 	localstatedir=%{_localstatedir} \
+	build=%_configure_platform \
+	rtld_origin=false \
 %if %with_shared
 	shared=yes \
 %endif
@@ -106,15 +109,8 @@ scons \
 %{__install} -m 0644 %{SOURCE3}           ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/xorp
 %{__install} -m 0660 %{SOURCE4}           ${RPM_BUILD_ROOT}%{_sysconfdir}/xorp
 
-
-# remove rpath
-find %buildroot -type f -exec file {} \; | grep ELF | sed "s/^\([^ ]*\): ELF.*/\1/" | \
-	while read f; do chrpath -d $f; done
-
-%set_verify_elf_method unresolved=relaxed
-
 %pre
-if ! getent group  xorp >/dev/null 2>&1; then
+if ! getent group xorp >/dev/null 2>&1; then
 	/usr/sbin/groupadd -r xorp
 
 	# xorpsh is using group's permission for access to xorp.
@@ -141,12 +137,12 @@ exit 0
 %attr(660,root,xorp) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xorp/xorp.conf
 
 %dir %_datadir/%name
-%dir %_libexecdir/%name
+%dir /usr/lib/%name
 %dir %_logdir/%name
 
 %_sbindir/*
 %_datadir/%name/*
-%_libexecdir/%name/*
+/usr/lib/%name/*
 
 %changelog
 * Wed Apr 09 2014 Sergey Y. Afonin <asy@altlinux.ru> 1.8.6-alt0.20130830.1

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

  parent reply	other threads:[~2014-04-10 16:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21  9:12 Roman Savochenko
2014-03-21 16:06 ` Roman Savochenko
2014-03-21 16:30 ` Gleb Fotengauer-Malinovskiy
2014-03-24 11:43   ` Sergei Epiphanov
2014-03-24 12:33     ` Dmitry V. Levin
2014-04-09 21:46       ` Sergey Y. Afonin
2014-04-10  6:25         ` Sergey Y. Afonin
2014-04-10 16:35         ` Gleb Fotengauer-Malinovskiy [this message]
2014-04-10 22:03           ` Sergey Y. Afonin
2014-04-11  8:37           ` [devel] сборка xorp, glibc-kernheaders и gcc4.7 Sergey Y. Afonin

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=20140410163526.GA23327@glebfm.cloud.tilaa.com \
    --to=glebfm@altlinux.org \
    --cc=asy@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