From: Alexey Tourbin <at@altlinux.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] xplc-0.3.12-alt1.1: rebuild failed [6]
Date: Mon, 17 Apr 2006 01:45:32 +0400
Message-ID: <20060416214532.GD8403@localhost> (raw)
In-Reply-To: <20060416202457.80AE5B0D97@basalt.office.altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 2736 bytes --]
On Mon, Apr 17, 2006 at 12:24:57AM +0400, QA Team Robot wrote:
> i586-alt-linux-g++ -pipe -Wall -O2 -march=i586 -mtune=pentium4 -pipe -Wall -O2 -march=i586 -mtune=pentium4 -O2 -DNDEBUG -Wall -Woverloaded-virtual -fno-rtti -fno-exceptions -fpic -DUNSTABLE -pipe -Iinclude -ldl -shared -Wl,-hlibxplc-0.3.so -Wl,-z,defs,--version-script=config/exports.map xplc/category.o xplc/catiter.o xplc/catmgr.o xplc/loader.o xplc/moduleloader.o xplc/modulemgr.o xplc/monikers.o xplc/new.o xplc/servmgr.o xplc/statichandler.o libxplc-cxx.so -o libxplc.so
> xplc/loader.o: In function `loaderOpen(char const*, void**)':loader.cpp:(.text+0x16): undefined reference to `dlerror'
> :loader.cpp:(.text+0x29): undefined reference to `dlopen'
> :loader.cpp:(.text+0x40): undefined reference to `dlerror'
> xplc/loader.o: In function `loaderSymbol(void*, char const*, void**)':loader.cpp:(.text+0x63): undefined reference to `dlerror'
> :loader.cpp:(.text+0x75): undefined reference to `dlsym'
> :loader.cpp:(.text+0x7f): undefined reference to `dlerror'
> xplc/loader.o: In function `loaderClose(void*&)':loader.cpp:(.text+0xa6): undefined reference to `dlclose'
> collect2: ld returned 1 exit status
> make: *** [libxplc.so] Error 1
> make: Leaving directory `/usr/src/RPM/BUILD/xplc-0.3.12'
Глюк компилятора. Происходит примерно вот что (в упрощенном виде).
$ g++ -ldl -shared -Wl,-hlibxplc-0.3.so -Wl,--version-script=config/exports.map xplc/category.o xplc/catiter.o xplc/catmgr.o xplc/loader.o xplc/moduleloader.o xplc/modulemgr.o xplc/monikers.o xplc/new.o xplc/servmgr.o xplc/statichandler.o libxplc-cxx.so -o libxplc.so -Wl,-z,defs
xplc/loader.o: In function `loaderOpen(char const*, void**)':loader.cpp:(.text+0x1a): undefined reference to `dlerror'
:loader.cpp:(.text+0x2d): undefined reference to `dlopen'
:loader.cpp:(.text+0x45): undefined reference to `dlerror'
xplc/loader.o: In function `loaderSymbol(void*, char const*, void**)':loader.cpp:(.text+0x73): undefined reference to `dlerror'
:loader.cpp:(.text+0x85): undefined reference to `dlsym'
:loader.cpp:(.text+0x8f): undefined reference to `dlerror'
xplc/loader.o: In function `loaderClose(void*&)':loader.cpp:(.text+0xc0): undefined reference to `dlclose'
collect2: ld returned 1 exit status
$
То есть я даю ему -ldl, но он в упор не видит dlopen.
Теперь я переставляю -ldl с первого места на последнее:
$ g++ -shared -Wl,-hlibxplc-0.3.so -Wl,--version-script=config/exports.map xplc/category.o xplc/catiter.o xplc/catmgr.o xplc/loader.o xplc/moduleloader.o xplc/modulemgr.o xplc/monikers.o xplc/new.o xplc/servmgr.o xplc/statichandler.o libxplc-cxx.so -o libxplc.so -Wl,-z,defs -ldl
$
Получилось!
Документирован ли порядок аргументов у gcc?
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next parent reply other threads:[~2006-04-16 21:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-16 21:45 ` Alexey Tourbin [this message]
2006-04-16 21:50 ` Dmitry V. Levin
2006-04-16 22:37 ` Alexey Tourbin
2006-04-16 22:47 ` Dmitry V. Levin
2006-04-17 1:00 ` Alexey Tourbin
2006-04-17 11:27 ` [devel] gcc, порядок аргументов и --as-needed (was: xplc-0.3.12-alt1.1: rebuild failed [6]) Michael Shigorin
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=20060416214532.GD8403@localhost \
--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