0

I'm working on a buildroot-based linux for my actual project. I need to add the protobuf-c library and found that the library files, .a and .la, dissapear from the target directory after the "Finalizing target" step in buildroot, since it executes a command to arase all .a and .la files from target/usr/lib and target/lib, so they are empty on the target. Obviously after loading on the target files are still missing.

Can anyone help me on how I can find those files or how can I fix this?

I've tried installing other libraries from the buildroot menuconfig and the same happens, files are installd in /usr/lib directory, but at the end after the "Finalizing target" step they dissapear.

Thanks in advance

MoBa
  • 1

1 Answers1

1

Buildroot will typically strip and install the shared libraries which end in .so

The static library ending in .a can be installed by implementing a post install hook in your package makefile. This hook looks like the following for an example package called "pack". In this case the following would be put into the pack.mk makefile :

define PACK_INSTALL_MOD
    $(INSTALL) -D -m 755 $(@D)/.libs/libpack.a $(TARGET_DIR)/usr/lib/
endef
PACK_POST_INSTALL_TARGET_HOOKS += PACK_INSTALL_MOD
Matt
  • 509
  • 2
  • 14