0

I have this error which is not directly referenced anywere but has a simple solution.

Context:

One custom host library compiled in Buildroot.
One custom host program compiled with Buildroot and uses this very library.

During make, Buildroot complains like this :

*** ERROR: package host-zic installs executables without proper RPATH: *** /home/aurelien/Project/[...]/BR_dir/host/bin/my_program

how do I solve this error ?

grorel
  • 1,408
  • 15
  • 21

1 Answers1

0

The answer is given by Nikos C. there. This is a copy/paste of his answer :

When you link, specify the directory of the library and also use an rpath:

-Wl,-rpath,/absolute/path/to/your/library -L/absolute/path/to/your/library -llibrary

-L tells the linker where to find your library at link time, and -rpath tells it where to search for the library at runtime.

Note that -L and -rpath need the directory that contains your .so file, not the actual path of the library file itself.

To translate in buildroot language :

-Wl,-rpath,$(HOST_DIR)/lib -L$(HOST_DIR)/lib -llibrary
grorel
  • 1,408
  • 15
  • 21