ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Viacheslav Dubrovskyi <dubrsl@gmail.com>
To: devel@lists.altlinux.org
Subject: Re: [devel] Circular link for libraries
Date: Sat, 27 Apr 2013 20:51:17 +0300
Message-ID: <517C1015.9040000@gmail.com> (raw)
In-Reply-To: <20130427214541.079b13f7@deimos.localdomain>

27.04.2013 20:45, Ivan A. Melnikov пишет:
> On Fri, 26 Apr 2013 14:23:29 +0700
> REAL <real@kemsu.ru> wrote:
>
>> Привет!
>>
>> Есть проект на CMake, там необходимо выполнить взаимолинковку пары 
>> библиотек, типа такого:
>>
>> target_link_libraries(foo bar)
>> target_link_libraries(bar foo)
>>
>> cmake на это резонно ругается, но без таких взаимолинковок сборка не 
>> проходит в части verify-elf. Есть какой-нибудь трюк, чтобы это 
>> заработало? В autotools такие вещи делались довольно просто.
> Не расскажите, как? А то я не представляю себе, как можно слинковаться
> с библиотекой, которой ещё нет.
Недавно патчил pacemaker на эту тему.
Вот тут собирается libcib которая должна линковться с libpe. И на оборот.
Добавляем дополнительное правило. При этом собирается libpe и с ней
линкуется libcib. Потом, когда доходит очередь до неё, она перелинкуется
опять с ранее собранной либой.

libcib_la_LDFLAGS    = -version-info 3:0:0
-L$(top_builddir)/lib/pengine/.libs
libcib_la_LIBADD        = $(CRYPTOLIB)
$(top_builddir)/lib/pengine/libpe_rules.la
$(top_builddir)/lib/common/libcrmcommon.la
libcib_la_CFLAGS    = -I$(top_srcdir)
 
libcib_la_DEPENDENCIES  = libpe_rules
libpe_rules:
    make -C ../../lib/pengine libpe_rules.la

Вообщем как выяснилось это по сути плохо, т.к. возникает резонный
вопрос: - а зачем выделять тогда либы?

-- 
WBR,
Viacheslav Dubrovskyi



  reply	other threads:[~2013-04-27 17:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26  7:23 REAL
2013-04-27 17:45 ` Ivan A. Melnikov
2013-04-27 17:51   ` Viacheslav Dubrovskyi [this message]
2013-04-28  4:09     ` REAL
2013-04-29 10:07       ` Ildar Mulyukov
2013-04-28  4:07   ` REAL

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=517C1015.9040000@gmail.com \
    --to=dubrsl@gmail.com \
    --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