libgendep on Ubuntu 11.10

Christian Helmuth <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Organization Genode Labs
Message-ID <[email protected]>
Hi,

with current SVN (r38) I get the following error:

  gcc -fPIC -Wall -pedantic -g -m64 -c /plain/krishna/src/genode/genode.git/base-foc/contrib/l4/tool/gendep/deptrack.c -o /plain/krishna/build/genode.foc_x86_32/l4/tool/gendep/deptrack.64.o
  gcc -fPIC -Wall -pedantic -g -m64 -c /plain/krishna/src/genode/genode.git/base-foc/contrib/l4/tool/gendep/syscall.c -o /plain/krishna/build/genode.foc_x86_32/l4/tool/gendep/syscall.64.o
  mkdir -p /plain/krishna/build/genode.foc_x86_32/l4/tool/gendep/64
  gcc -m64 -shared -Wl,-soname,/plain/krishna/build/genode.foc_x86_32/l4/tool/gendep/64/libgendep.so -ldl -o /plain/krishna/build/genode.foc_x86_32/l4/tool/gendep/64/libgendep.so /plain/krishna/build/genode.foc_x86_32/l4/tool/gendep/deptrack.64.o /plain/krishna/build/genode.foc_x86_32/l4/tool/gendep/syscall.64.o
  /usr/local/genode-gcc/bin/genode-x86-gcc: symbol lookup error: /plain/krishna/build/genode.foc_x86_32/l4/tool/gendep/64/libgendep.so: undefined symbol: dlsym

The attached patch fixed the issue for me and I'd like to share it
here ;-)

Greets
-- 
Christian Helmuth
Genode Labs

http://www.genode-labs.com/ · http://genode.org/ · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
gendep.patch (text/x-diff, 567 B)
Index: l4/tool/gendep/Makefile
===================================================================
--- l4/tool/gendep/Makefile	(revision 38)
+++ l4/tool/gendep/Makefile	(working copy)
@@ -23,7 +23,7 @@
 ifneq ($(filter linux freebsd,$(HOST_SYSTEM)),)
 LIB     := $(LIB32) $(LIB64)
 LIBDL-linux := -ldl
-cmd_link = $(HOST_CC) -m$(2) -shared -Wl,-soname,$(1) $(LIBDL-$(HOST_SYSTEM)) -o $(1)
+cmd_link = $(HOST_CC) -m$(2) -shared -Wl,--no-as-needed -Wl,-soname,$(1) $(LIBDL-$(HOST_SYSTEM)) -o $(1)
 else
 ifeq ($(HOST_SYSTEM),darwin)
 LIB     := $(OBJ_DIR)/libgendep.so
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.