On 6 May 2017 at 20:43, Tomasz Buchert wrote: | On 06/05/17 19:23, Tomasz Buchert wrote: | > [...] | | Ok, I confirm that dlopen() is required to properly resolve some | symbols later: I can only assume that openmpi does some magic | there. Here are 2 solutions I came up with: | | 1. Just like in #741297: add another dlopen() call to the chain (see | attached simple-but-wrong.debdiff)
Right. That is the obvious one. | 2. Figure out what is the libmpi to load. I attach a proof-of-concept that uses dl_iterate_phdr | to find this out (see attached findlibmpi.debdiff). That's for upstream. I would encourage you to send that to Hao Yu explaining the issue. Other distro may end up with the same sonames. | I've tested both approaches and they work for me. | | Btw, it would be good to add a smoke test to verify that loading from | R works, so that we can detect it just after build. It already does. At the end of each 'R CMD INSTALL foo' run (which what we do here to) the new library is loaded. But as we build, the libopenmpi-dev package is present, and then it passes (see my earlier messages based on poking around in a Debian unstable session in a Docker container). Thanks much for the patch, this really help. And I do appreciate that you tested it. This matters. Now, if I may: Going forward, you may want to think keeping a little bit of the attitude out of your posts. Nobody asked about your personal opinions regarding the build system, or judgement about certain patches (which, after all, were also initially wrong on your end). Dirk | | Let me know what you think. | Tomasz | x[DELETED ATTACHMENT simple-but-wrong.debdiff, plain text] | x[DELETED ATTACHMENT find-libmpi.debdiff, plain text] | x[DELETED ATTACHMENT signature.asc, application/pgp-signature] -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org