the onsgmls binary seems to contain absolute path names to data files and it not relocatable via shared state.
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=bb024d7a8c771c189b94b1ae177e29f3c318e236 While this is a partial fix, we found another situation.
This fix works with iputils, but does not work correctly with linuxdoc-tools-native
To reproduce this create 2 builds with a shared SSTATE_DIR, first build opensp in build area 1, then move the tmp to tmp- (so sysroots from build area 1 is not available). Then in build area 2 attempt to build iputils and linuxdoc-tools-native. Currently iputils will succeed, but linuxdoc-tools-native will fail. Using devshell in linuxdoc-tools-native run Makedocs.sh to see the nsgmls command that is run and using strace (-e trace=open) you can see what files nsgmls tries to open. nsgmls is really a wrapper around nsgmls.real to try and pass the correct catalog. I also suggest trying to do an update to 1.5.2 to see if this is fixed there. This might require a source code change in nsgmls as I think there may be a search path bug.
Created attachment 226 [details] linuxdoc-tools-native install log do_install log of linuxdoc-tools-native
Saul, I have tried linuxdoc-tools-native building, and found it failed even without sstate. I suspect something wrong inside linuxdoc-tool-native. Attached install log.
I need to try and explain this problem better. The opensp recipe produces a binary (nsgmls), in the current master recreated a wrapper for this binary, such that the binary is now nsgmls.real and the wrapper is nsgmls. There are at least 2 packages that use nsgmls to build their documentation. These two packages iputils and linuxdoc-tools-native use nsgmls differently, such that the wrapper script is not correct. The wrapper script currently sets SGML_CATALOG_FILES, which overrides a setting that linuxdoc-tools-native does of SGML_CATALOG_FILES, so my initial wrapper is wrong. Another way to set where the catalog files comes from is either using the -c option (which points to a catalog) or -D option (which adds search directory), but when I first used it with iputils, I saw different behaviour. You can test these by modifying the sysroot/$BUILD_SYS/usr/bin/nsgmls wrapper scripts to use either the cmd line options instead of the SGML_CATALOG_FILES (which is flat out wrong). By using devshell with iputils or linuxdoc-tools-native and doing a make -n to see how the documentation is constructed, you can execute the nsgml command directly. For example in iputils, in the doc directory run the command nsgmls index.db then try to run to mkdir tmp.db2man (if it does not exisit) (cd tmp.db2man; nsgmls ../index.db) If you set the -c or -D you will different behaviour for index.db vs ../index.db This may be a bug in nsgmls
This bug comes from odd behavior of nsgmls: it append path to search directory according to the sysid path. e.g. if input ../index.db, it would search $search_directory/../ rather than $search_directory, which leads searching failure. Fixing nsgmls probably introduce some side effects, so use this hack in iputils: running nsgmls in current directory, and following handlings in tmp directory.
Fixed in master @ cba78fed34318bc1fda2af11e85aebb0467948a8