From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 Date: Tue, 13 Jul 2010 13:37:31 +0300 From: "Kirill A. Shutemov" To: ALT Linux Team development discussions Message-ID: <20100713103731.GB31562@shutemov.name> References: <201007110243.34339.ledest@gmail.com> <20100711064000.GA31072@mw.office.seiros.ru> <20100711083357.GA1847@wo.int.altlinux.org> <20100711092651.GB1847@wo.int.altlinux.org> <20100712165450.GL23050@altlinux.org> <20100712165906.GE19836@wo.int.altlinux.org> <20100712191703.GM23050@altlinux.org> <20100712201914.GN23050@altlinux.org> <20100713080706.GP23050@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20100713080706.GP23050@altlinux.org> User-Agent: Mutt/1.5.20 (2009-12-10) Subject: Re: [devel] linkage_problems abiword unjoined X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 10:37:36 -0000 Archived-At: List-Archive: List-Post: On Tue, Jul 13, 2010 at 12:07:06PM +0400, Alexey Tourbin wrote: > On Tue, Jul 13, 2010 at 12:19:14AM +0400, Alexey Tourbin wrote: > > Ну вот например показывает что libabiword-2.8 недолинкован с libX11. > > > > [at@people at]$ fgrep libabiword-2.8 unjoined > > abiword /usr/lib64/libabiword-2.8.so U XFreeModifiermap > > abiword /usr/lib64/libabiword-2.8.so U XGetModifierMapping > > abiword /usr/lib64/libabiword-2.8.so U XKeycodeToKeysym > > abiword /usr/lib64/libabiword-2.8.so U XKeysymToKeycode > > abiword /usr/lib64/libabiword-2.8.so U XParseGeometry > > abiword-light /usr/lib64/libabiword-2.8.so U XFreeModifiermap > > abiword-light /usr/lib64/libabiword-2.8.so U XGetModifierMapping > > abiword-light /usr/lib64/libabiword-2.8.so U XKeycodeToKeysym > > abiword-light /usr/lib64/libabiword-2.8.so U XKeysymToKeycode > > abiword-light /usr/lib64/libabiword-2.8.so U XParseGeometry > > [at@people at]$ rpm -qpR /ALT/Sisyphus/files/x86_64/RPMS/abiword-2.8.4-alt1.x86_64.rpm |grep libX > > [at@people at]$ > > > > Как могло получиться, что abiword недолинкован с libX11? > > У нас же и в binutils подержка есть "подцепить недостающие библиотеки", > > и pkg-config для линковки рекурсивно раскрывает список Libs. > > В ld/bfd что-то не так работает. Хм... Похоже логика --as-needed работает до --copy-dt-needed-entries. Это странно. Пример: $ cat 1.c #include #include int main(int argc, char **argv) { XFreeModifiermap(NULL); return 0; } $ objdump -p /usr/lib/libgtk-x11-2.0.so | grep NEEDED NEEDED libgdk_pixbuf-2.0.so.0 NEEDED libgdk-x11-2.0.so.0 NEEDED libpangocairo-1.0.so.0 NEEDED libX11.so.6 NEEDED libXfixes.so.3 NEEDED libatk-1.0.so.0 NEEDED libcairo.so.2 NEEDED libgio-2.0.so.0 NEEDED libpangoft2-1.0.so.0 NEEDED libpango-1.0.so.0 NEEDED libfontconfig.so.1 NEEDED libgobject-2.0.so.0 NEEDED libgmodule-2.0.so.0 NEEDED libglib-2.0.so.0 NEEDED libm.so.6 NEEDED libpthread.so.0 NEEDED libc.so.6 $ gcc 1.c -lgtk-x11-2.0 /usr/src/tmp/cc80cbEj.o: In function `main': 1.c:(.text+0x11): undefined reference to `XFreeModifiermap' collect2: ld returned 1 exit status $ gcc 1.c -Wl,--no-as-needed -lgtk-x11-2.0 $ objdump -p |grep NEEDED NEEDED libgtk-x11-2.0.so.0 NEEDED libc.so.6 NEEDED libX11.so.6 -- Kirill A. Shutemov