ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Vladimir Zhirov <vvzh.lists@gmail.com>
To: community@lists.altlinux.org
Subject: [Comm] Сборка mongoose web server и  cc -ldl
Date: Wed, 1 Dec 2010 10:51:36 +0300
Message-ID: <20101201105136.093259b9@discovery.localdomain> (raw)

Всем привет.

Возникла задача собрать веб-сервер mongoose
http://code.google.com/p/mongoose/. 
Пока не пакет, только бинарный исполняемый файл.

Поскольку в проекте используется динамическая загрузка
библиотек, в командной строке cc необходимо передавать 
опцию -ldl. Возникла проблема с расположением этой опции.

Строка в makefile выглядит примерно так:
$(CC) -ldl <другие опции> mongoose.c main.c -o $(PROG)

У меня на Simply Linux в результате получается:
main.c -o mongoose /tmp/.private/vvzh/ccwJbBvT.o: In function `load_dll':
mongoose.c:(.text+0x110b): undefined reference to `dlopen'
mongoose.c:(.text+0x1123): undefined reference to `dlsym' 
collect2: ld returned 1 exit status
make: *** [linux] Error 1

Если я перемещаю -ldl так:
$(CC) <другие опции> mongoose.c main.c -ldl -o $(PROG)
Всё нормально собирается.

Разработчику был направлен багрепорт c предложением переместить опцию, 
на что был получен ответ:

> It looks like "cc" command does something weird on your distribution.
> It does not behave like it needs to.

В связи с чем вопрос: есть ли отличия в gcc из p5, по сравнению
с другими бранчами/дистрибутивами (от ALT и не от ALT),
которые могли бы вызвать такое поведение?


             reply	other threads:[~2010-12-01  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01  7:51 Vladimir Zhirov [this message]
2010-12-01  7:50 ` Damir

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=20101201105136.093259b9@discovery.localdomain \
    --to=vvzh.lists@gmail.com \
    --cc=community@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 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