Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What can cause dlopen: no suitable image found (can't map)?

Tags:

macos

dlopen

What can cause the following error when loading an additional bundle using dlopen:

dlopen($(OBJ_DIR)/Test-20091217211256.ob, 6): no suitable image found.  Did find:
    $(OBJ_DIR)/Test-20091217211256.ob: can't map

Before this error, the process allocates large amounts of memory.

(Substituted $(OBJ_DIR) in the error for the actual path to make it more legible).

like image 628
Tobias Avatar asked Dec 17 '09 20:12

Tobias


2 Answers

One possibility is that the shared library you're trying to open isn't actually a shared library. Run the file(1) program on your library to make sure it's actually a shared library. It should report something like Mach-O 64-bit dynamically linked shared library x86_64 on a 64-bit system or Mach-O dynamically linked shared library i386 on a 32-bit system.

like image 130
Adam Rosenfield Avatar answered Oct 14 '22 10:10

Adam Rosenfield


  1. 32 bit shared object on 64-bit operating system?

  2. missing dependencies?

like image 25
bmargulies Avatar answered Oct 14 '22 11:10

bmargulies