Cannot find dynamic linker binary.

Norman Feske norman.feske at ...1...
Mon Dec 9 19:06:13 CET 2013


Hi Edgar,

> I am trying to add some libraries in my build.conf:
> 
> LIBS = base libm

The LIBS declaration does not belong in your 'build.conf' but in your
'target.mk' file. If declared, the libraries on which the target depends
are built automatically. Because 'libm' is a shared library, 'ld.lib.so'
will be built as well.

> But it doesn't seem to load. The error message I get is:
> 
> [init] Could not open file "ld.lib.so <http://ld.lib.so>"
> [init] Dynamically linked file found, but no dynamic linker binary present
> [init] unknown exception?
> [init] Dynamically linked file found, but no dynamic linker binary present
> [init] unknown exception?
> 
> I am using the nova_x86_32 kernel, but on other kernels this also
> happens. If I remove libm my image works again. I haven't found anything
> to build a dynamic linker in the source.
> 
> Steps I did:
> 
> create build dir.
> 
> add libports to etc/build.conf
> add my source repository to the build dir
> 
> make prepare PKG=libc && make prepare PKG=stdcxx
> 
> make run/something
> 
> The run script starts up qemu. The kernel boots.
> 
> And then in qemu it cannot find a linker binary.

After adding the LIBS declaration in your 'target.mk' file, the build
system should have built the following libraries for you:

  libm.lib.so  (the math library)
  libc.lib.so  (the C library, on which libm depends)
  ld.lib.so    (the dynamic linker)

Just take a look at your '<build-dir>/bin/' directory to see if the
build succeeded.

In order to let Genode access those libraries, we need to include them
in the boot image. This can be done by adding the corresponding file
names to the list of 'boot_modules' in your 'something.run' script.

> How should I add libraries to my project? I am probably missing some
> stupid step.

Not stupid at all. Please keep asking! :-)

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

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




More information about the users mailing list