Tim O'Callaghan <tocallaghan@...>
I have a recipe that uses GNU autoopts, which generates a dependency on libopts. This is the library that is required for any package using autoopts to compile.
GNU autoopts is a tool that is found embedded in GNU autogen as an example of autogen use, but is also a package in its own right. When you configure and build autogen, you also configure and build autoopts. When you build autoopts, it in turn builds the libopts shared library, static library and source tarball. The tarball is so that it can be used inside your packages source tree, for systems that do not have libopts installed. As far as I can tell via Google, most packages just embed the libopts in their source tree e.g. TCPRELAY and ntp.
As autogen and autoopts are required native packages, If the target package requires libopts, then in this case it finds the libopts.so from native and then at image creation time it complains that the library is not available. To build libopts for the target, you need to either build the whole dependency tree behind autogen, which will build autoopts and the wanted library (with or without bludgeoning autogen's configure script into shape), or share the source tarball during the native building stage for downstream consumers. My first thought was to copy the src tarball to DL_DIR, and have a corresponding target libopts.bb recipe or similar, but as it turns out autogen has a mechanism for this, `autoopts-config libsrc` (as per the libopts tarball README). The tarball is not designed to be configured as a standalone library and plugs into the packages configure - which as you can guess I'm in the process of doing for this package.
So I'm posting this to the list for others who may trip over it, and as a question as to what to do, in the general case where you have something generated by a package in 'native' and you want to share it with a package in 'target'. Rebuild everything? Create a finder script?