[{"id":3613,"web_url":"https://patchwork.libcamera.org/comment/3613/","msgid":"<CAKQmDh-vZ1pnWcc+z7qbS_gp8DVk_4aJLQ4jxZPDXrXqmC0PWg@mail.gmail.com>","date":"2020-02-05T14:03:51","subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le mer. 5 févr. 2020 08 h 04, Kieran Bingham <\nkieran.bingham@ideasonboard.com> a écrit :\n\n> When developing and testing libcamera, the usual development model is to\n> compile and run one of the test or utility applications.\n>\n\nI like it. Be aware that it won't work for me. It only work if the build\npath matches run path, which isn't the case when cross compiling and\nexporting over NFS. Any suggestion ?\n\n\n> IPA modules are loaded by the IPAManager, from a system path, or by\n> parsing an\n> environment variable.\n>\n> Provide the build path to the library through a temporary storage in the\n> runpath of the ELF library strings table.  This entry is stripped at\n> install\n> time, but allows us to identify the location of the recently compiled IPA\n> modules without the user having to manually declare paths to the build\n> system.\n>\n> Previously to this series the IPA tests would only be able to be run from\n> the\n> root of the build tree, due to the hardcoded path relative to that point.\n> Now\n> that the IPAs can be found from their build location, we no longer need to\n> provide this hardcoded path through the LIBCAMERA_IPA_MODULE_PATH for\n> tests,\n> and as a further consequence they can be run directly without requiring the\n> launch to be run from the top level of the build tree.\n>\n> Kieran Bingham (5):\n>   libcamera: utils: Provide helper to get dynamic library runpath\n>   libcamera: ipa_manager: Split path handling\n>   libcamera: ipa_manager: Allow recursive parsing\n>   libcamera: ipa_manager: Search the runpath for IPA libraries\n>   tests: Remove IPA_MODULE_PATH environment variable\n>\n>  src/libcamera/include/ipa_manager.h |   5 +-\n>  src/libcamera/include/utils.h       |   1 +\n>  src/libcamera/ipa_manager.cpp       | 111 ++++++++++++++++++++++------\n>  src/libcamera/meson.build           |   1 +\n>  src/libcamera/utils.cpp             |  26 +++++++\n>  src/meson.build                     |   7 ++\n>  test/libtest/test.cpp               |   4 -\n>  7 files changed, 126 insertions(+), 29 deletions(-)\n>\n> --\n> 2.20.1\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel\n>","headers":{"Return-Path":"<nicolas@ndufresne.ca>","Received":["from mail-pg1-x542.google.com (mail-pg1-x542.google.com\n\t[IPv6:2607:f8b0:4864:20::542])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 791F8607EF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Feb 2020 15:04:03 +0100 (CET)","by mail-pg1-x542.google.com with SMTP id 6so1030543pgk.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 05 Feb 2020 06:04:03 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20150623.gappssmtp.com; s=20150623;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=6DemxTND6k8ouwt5fdcWgV7+YJ1yAf9PtzrzzcXCQr0=;\n\tb=pv4m1+5eAUQJNu2A69pihRzTCdjqAgIOmqpFycM52CGyQGkmOOuF7PBJN9WoQSDDMs\n\thIPndmI4bAy+ac38QI9iAzvLU1TXjcdJDM8yhScr8mzF6JIKErFiSgzTpWcqZ3bjUAvJ\n\tIiiIqs4av1LD6u0KJL16ZM7BqvrcBAmgEJrlSF0D0C+I7C79EFB2NMeQJOcTl/vpMGGD\n\tJCoVBugcFW/50TC0HNRzCZ3PNPJoONHJ2Aw5uA/K8BGOB2jtZ47ySs7j/m5SJC+2UINf\n\t8Hu7OgFz7aGsSeXlhqBT37+k9eUvFYIq8euqKrxv5THB7LS8m2CxXQPLod8TgUn/ia2w\n\tU94Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=6DemxTND6k8ouwt5fdcWgV7+YJ1yAf9PtzrzzcXCQr0=;\n\tb=PSKhQo7AL1vYm9PaF1sEBR33ylx8/ULg3pOZ/YA0+psctgCq5QKSxLlkqo3pI8DgLI\n\tj30pj+/uxJzLIcwf1X1FPsyKzs0NFv6N1DXEzYW4yraydQEXEe4h6aQ4nR4rR5+7Xhsh\n\tVMraL1O7uTOopASOHFOkf1vyJN+THXEir7O1L6AhNcWdAjDhaZnzwefr9oN2PLSQ0/Qg\n\tIhpHNki/QCotAogJlF1CQPAnZGywcbqofG7lwHPytr3OFlBfacS3QHAfoXP5OzRNJ3yl\n\tOheArfJxse0jkZ8rQ3+gQ5spmUhhbusaxQdh+haVPHx/hOZNT0lpnRzc+Lcv3z5h67Qs\n\tseNQ==","X-Gm-Message-State":"APjAAAVPZZJOoFZC22PnCkY9lQq6e9Hv3qw/pVgaOxryt29r6Yk8Yuht\n\tqWc2TNVXDvew1SbygrtcJJK5/hhUKR+2yUBvXDWgNGNk","X-Google-Smtp-Source":"APXvYqx+bJkRWLrnsW8J59i1vhmzwrVbjdCLS7XX3G+KRbYXGQv+vzDB7iNTNPyQTHHPQjC4NPYntyOhFFgU7P/mwoE=","X-Received":"by 2002:a63:504f:: with SMTP id q15mr36780225pgl.8.1580911441808;\n\tWed, 05 Feb 2020 06:04:01 -0800 (PST)","MIME-Version":"1.0","References":"<20200205130420.8736-1-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20200205130420.8736-1-kieran.bingham@ideasonboard.com>","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","Date":"Wed, 5 Feb 2020 09:03:51 -0500","Message-ID":"<CAKQmDh-vZ1pnWcc+z7qbS_gp8DVk_4aJLQ4jxZPDXrXqmC0PWg@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Content-Type":"multipart/alternative; boundary=\"000000000000e920e5059dd4a030\"","Subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 05 Feb 2020 14:04:03 -0000"}},{"id":3614,"web_url":"https://patchwork.libcamera.org/comment/3614/","msgid":"<55719e66-bfd3-f845-e86d-4e107f97e4d1@ideasonboard.com>","date":"2020-02-05T14:12:15","subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Nicolas,\n\nOn 05/02/2020 14:03, Nicolas Dufresne wrote:\n> \n> \n> Le mer. 5 févr. 2020 08 h 04, Kieran Bingham\n> <kieran.bingham@ideasonboard.com\n> <mailto:kieran.bingham@ideasonboard.com>> a écrit :\n> \n>     When developing and testing libcamera, the usual development model is to\n>     compile and run one of the test or utility applications.\n> \n> \n> I like it. Be aware that it won't work for me. It only work if the build\n> path matches run path, which isn't the case when cross compiling and\n> exporting over NFS. Any suggestion ?\n\nInteresting (and painful) point.\n\nIdeally it would be a relative path, but the binary path\n (/proc/self/exe) doesn't always have to stay relative to the library\npath ...\n\nI wonder if I can get the library path at runtime... Time to dig into\nwhat else is in the _DYNAMIC table perhaps.\n\nOtherwise, I'm certainly open to suggestions from the list here ;-)\n\n--\nKieran\n\n\n\n>     IPA modules are loaded by the IPAManager, from a system path, or by\n>     parsing an\n>     environment variable.\n> \n>     Provide the build path to the library through a temporary storage in the\n>     runpath of the ELF library strings table.  This entry is stripped at\n>     install\n>     time, but allows us to identify the location of the recently\n>     compiled IPA\n>     modules without the user having to manually declare paths to the\n>     build system.\n> \n>     Previously to this series the IPA tests would only be able to be run\n>     from the\n>     root of the build tree, due to the hardcoded path relative to that\n>     point. Now\n>     that the IPAs can be found from their build location, we no longer\n>     need to\n>     provide this hardcoded path through the LIBCAMERA_IPA_MODULE_PATH\n>     for tests,\n>     and as a further consequence they can be run directly without\n>     requiring the\n>     launch to be run from the top level of the build tree.\n> \n>     Kieran Bingham (5):\n>       libcamera: utils: Provide helper to get dynamic library runpath\n>       libcamera: ipa_manager: Split path handling\n>       libcamera: ipa_manager: Allow recursive parsing\n>       libcamera: ipa_manager: Search the runpath for IPA libraries\n>       tests: Remove IPA_MODULE_PATH environment variable\n> \n>      src/libcamera/include/ipa_manager.h |   5 +-\n>      src/libcamera/include/utils.h       |   1 +\n>      src/libcamera/ipa_manager.cpp       | 111 ++++++++++++++++++++++------\n>      src/libcamera/meson.build           |   1 +\n>      src/libcamera/utils.cpp             |  26 +++++++\n>      src/meson.build                     |   7 ++\n>      test/libtest/test.cpp               |   4 -\n>      7 files changed, 126 insertions(+), 29 deletions(-)\n> \n>     -- \n>     2.20.1\n> \n>     _______________________________________________\n>     libcamera-devel mailing list\n>     libcamera-devel@lists.libcamera.org\n>     <mailto:libcamera-devel@lists.libcamera.org>\n>     https://lists.libcamera.org/listinfo/libcamera-devel\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 60B6B607EF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Feb 2020 15:12:19 +0100 (CET)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CB3054F8;\n\tWed,  5 Feb 2020 15:12:18 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1580911939;\n\tbh=8WCA1ygpfSqBRTACa6fdabcb7NBt9HndFJgJqzIRteM=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=YwN+CAmU0XRJBuX74oqmIt1RZqOALEM1Of8txBccoNDXGsrehlE3Dbm/XzGndILIx\n\t5sKOVXk1DLTNZOZDv5/wbMpT6c2RYfNdP6WHw3uQuj5kFdM9MsrOgNzJYvir6IoRoC\n\tVhY9m56mlSZ5+pIzfUSB2hsXLkQ4vvEz8oo+k0y0=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","References":"<20200205130420.8736-1-kieran.bingham@ideasonboard.com>\n\t<CAKQmDh-vZ1pnWcc+z7qbS_gp8DVk_4aJLQ4jxZPDXrXqmC0PWg@mail.gmail.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAlcEEwEKAEECGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEWIQSQLdeYP70o/eNy1HqhHkZyEKRh/QUCXWTtygUJ\n\tCyJXZAAKCRChHkZyEKRh/f8dEACTDsbLN2nioNZMwyLuQRUAFcXNolDX48xcUXsWS2QjxaPm\n\tVsJx8Uy8aYkS85mdPBh0C83OovQR/OVbr8AxhGvYqBs3nQvbWuTl/+4od7DfK2VZOoKBAu5S\n\tQK2FYuUcikDqYcFWJ8DQnubxfE8dvzojHEkXw0sA4igINHDDFX3HJGZtLio+WpEFQtCbfTAG\n\tYZslasz1YZRbwEdSsmO3/kqy5eMnczlm8a21A3fKUo3g8oAZEFM+f4DUNzqIltg31OAB/kZS\n\tenKZQ/SWC8PmLg/ZXBrReYakxXtkP6w3FwMlzOlhGxqhIRNiAJfXJBaRhuUWzPOpEDE9q5YJ\n\tBmqQL2WJm1VSNNVxbXJHpaWMH1sA2R00vmvRrPXGwyIO0IPYeUYQa3gsy6k+En/aMQJd27dp\n\taScf9am9PFICPY5T4ppneeJLif2lyLojo0mcHOV+uyrds9XkLpp14GfTkeKPdPMrLLTsHRfH\n\tfA4I4OBpRrEPiGIZB/0im98MkGY/Mu6qxeZmYLCcgD6qz4idOvfgVOrNh+aA8HzIVR+RMW8H\n\tQGBN9f0E3kfwxuhl3omo6V7lDw8XOdmuWZNC9zPq1UfryVHANYbLGz9KJ4Aw6M+OgBC2JpkD\n\thXMdHUkC+d20dwXrwHTlrJi1YNp6rBc+xald3wsUPOZ5z8moTHUX/uPA/qhGsbkCDQRWBP1m\n\tARAAzijkb+Sau4hAncr1JjOY+KyFEdUNxRy+hqTJdJfaYihxyaj0Ee0P0zEi35CbE6lgU0Uz\n\ttih9fiUbSV3wfsWqg1Ut3/5rTKu7kLFp15kF7eqvV4uezXRD3Qu4yjv/rMmEJbbD4cTvGCYI\n\td6MDC417f7vK3hCbCVIZSp3GXxyC1LU+UQr3fFcOyCwmP9vDUR9JV0BSqHHxRDdpUXE26Dk6\n\tmhf0V1YkspE5St814ETXpEus2urZE5yJIUROlWPIL+hm3NEWfAP06vsQUyLvr/GtbOT79vXl\n\tEn1aulcYyu20dRRxhkQ6iILaURcxIAVJJKPi8dsoMnS8pB0QW12AHWuirPF0g6DiuUfPmrA5\n\tPKe56IGlpkjc8cO51lIxHkWTpCMWigRdPDexKX+Sb+W9QWK/0JjIc4t3KBaiG8O4yRX8ml2R\n\t+rxfAVKM6V769P/hWoRGdgUMgYHFpHGSgEt80OKK5HeUPy2cngDUXzwrqiM5Sz6Od0qw5pCk\n\tNlXqI0W/who0iSVM+8+RmyY0OEkxEcci7rRLsGnM15B5PjLJjh1f2ULYkv8s4SnDwMZ/kE04\n\t/UqCMK/KnX8pwXEMCjz0h6qWNpGwJ0/tYIgQJZh6bqkvBrDogAvuhf60Sogw+mH8b+PBlx1L\n\toeTK396wc+4c3BfiC6pNtUS5GpsPMMjYMk7kVvEAEQEAAYkCPAQYAQoAJgIbDBYhBJAt15g/\n\tvSj943LUeqEeRnIQpGH9BQJdizzIBQkLSKZiAAoJEKEeRnIQpGH9eYgQAJpjaWNgqNOnMTmD\n\tMJggbwjIotypzIXfhHNCeTkG7+qCDlSaBPclcPGYrTwCt0YWPU2TgGgJrVhYT20ierN8LUvj\n\t6qOPTd+Uk7NFzL65qkh80ZKNBFddx1AabQpSVQKbdcLb8OFs85kuSvFdgqZwgxA1vl4TFhNz\n\tPZ79NAmXLackAx3sOVFhk4WQaKRshCB7cSl+RIng5S/ThOBlwNlcKG7j7W2MC06BlTbdEkUp\n\tECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx\n\tS0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<55719e66-bfd3-f845-e86d-4e107f97e4d1@ideasonboard.com>","Date":"Wed, 5 Feb 2020 14:12:15 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.9.1","MIME-Version":"1.0","In-Reply-To":"<CAKQmDh-vZ1pnWcc+z7qbS_gp8DVk_4aJLQ4jxZPDXrXqmC0PWg@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 05 Feb 2020 14:12:19 -0000"}},{"id":3615,"web_url":"https://patchwork.libcamera.org/comment/3615/","msgid":"<8f4a71981275782eac030dda68f8068695058aab.camel@ndufresne.ca>","date":"2020-02-05T18:49:11","subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le mercredi 05 février 2020 à 14:12 +0000, Kieran Bingham a écrit :\n> Hi Nicolas,\n> \n> On 05/02/2020 14:03, Nicolas Dufresne wrote:\n> > \n> > Le mer. 5 févr. 2020 08 h 04, Kieran Bingham\n> > <kieran.bingham@ideasonboard.com\n> > <mailto:kieran.bingham@ideasonboard.com>> a écrit :\n> > \n> >     When developing and testing libcamera, the usual development model is to\n> >     compile and run one of the test or utility applications.\n> > \n> > \n> > I like it. Be aware that it won't work for me. It only work if the build\n> > path matches run path, which isn't the case when cross compiling and\n> > exporting over NFS. Any suggestion ?\n> \n> Interesting (and painful) point.\n> \n> Ideally it would be a relative path, but the binary path\n>  (/proc/self/exe) doesn't always have to stay relative to the library\n> path ...\n> \n> I wonder if I can get the library path at runtime... Time to dig into\n> what else is in the _DYNAMIC table perhaps.\n> \n> Otherwise, I'm certainly open to suggestions from the list here ;-)\n\nNote that meanwhile I can just set the env really, I'm a bit use to that anyway.\nGStreamer, GLib and Mesa (which are the kind of stuff I cross compile) all\nrequires few envs already.\n\n> \n> --\n> Kieran\n> \n> \n> \n> >     IPA modules are loaded by the IPAManager, from a system path, or by\n> >     parsing an\n> >     environment variable.\n> > \n> >     Provide the build path to the library through a temporary storage in the\n> >     runpath of the ELF library strings table.  This entry is stripped at\n> >     install\n> >     time, but allows us to identify the location of the recently\n> >     compiled IPA\n> >     modules without the user having to manually declare paths to the\n> >     build system.\n> > \n> >     Previously to this series the IPA tests would only be able to be run\n> >     from the\n> >     root of the build tree, due to the hardcoded path relative to that\n> >     point. Now\n> >     that the IPAs can be found from their build location, we no longer\n> >     need to\n> >     provide this hardcoded path through the LIBCAMERA_IPA_MODULE_PATH\n> >     for tests,\n> >     and as a further consequence they can be run directly without\n> >     requiring the\n> >     launch to be run from the top level of the build tree.\n> > \n> >     Kieran Bingham (5):\n> >       libcamera: utils: Provide helper to get dynamic library runpath\n> >       libcamera: ipa_manager: Split path handling\n> >       libcamera: ipa_manager: Allow recursive parsing\n> >       libcamera: ipa_manager: Search the runpath for IPA libraries\n> >       tests: Remove IPA_MODULE_PATH environment variable\n> > \n> >      src/libcamera/include/ipa_manager.h |   5 +-\n> >      src/libcamera/include/utils.h       |   1 +\n> >      src/libcamera/ipa_manager.cpp       | 111 ++++++++++++++++++++++------\n> >      src/libcamera/meson.build           |   1 +\n> >      src/libcamera/utils.cpp             |  26 +++++++\n> >      src/meson.build                     |   7 ++\n> >      test/libtest/test.cpp               |   4 -\n> >      7 files changed, 126 insertions(+), 29 deletions(-)\n> > \n> >     -- \n> >     2.20.1\n> > \n> >     _______________________________________________\n> >     libcamera-devel mailing list\n> >     libcamera-devel@lists.libcamera.org\n> >     <mailto:libcamera-devel@lists.libcamera.org>\n> >     https://lists.libcamera.org/listinfo/libcamera-devel\n> >","headers":{"Return-Path":"<nicolas@ndufresne.ca>","Received":["from mail-qk1-x744.google.com (mail-qk1-x744.google.com\n\t[IPv6:2607:f8b0:4864:20::744])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DC90860446\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Feb 2020 19:49:14 +0100 (CET)","by mail-qk1-x744.google.com with SMTP id 21so2920395qky.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 05 Feb 2020 10:49:14 -0800 (PST)","from nicolas-tpx395.localdomain ([2610:98:8005::527])\n\tby smtp.gmail.com with ESMTPSA id\n\t141sm238706qkk.62.2020.02.05.10.49.12\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 05 Feb 2020 10:49:12 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20150623.gappssmtp.com; s=20150623;\n\th=message-id:subject:from:to:cc:date:in-reply-to:references\n\t:user-agent:mime-version:content-transfer-encoding;\n\tbh=Eosqd+HUU9ZZMUzweLLML1Bowu7SP36oTDYH4oQoxLg=;\n\tb=QEIoPrqN/DloLhutANNB0RlFN9HMSLmgEFlHIolXYAANTYCN6nAnXw687mWD0ujNOw\n\tKjEFW/pjwkDRnIuoYswF5hCGMTeL8uqkm8dGIT7Llx6oTuxs7WYAWqC3FWtw9+Ptc+E9\n\ts2sBZKu8MypT3x412xRVSIYSEnEN1spZRvR4dkP+eIspFX//zNLjjg7Tu+M69+QZeS+W\n\t+YMq0Y31eKVLMAUDNjCqfhasYTvAkIK61S7mfgNKjX/WgGQVkYP5MC1Sh5PCdaiZjQlH\n\tIq/Cy71UPVyiXPxTtKKX3IHvmL+WIOnfUBj+CvWardIhPDW/U8uLV5TjxLLN8LwCSZEz\n\tY2/g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=Eosqd+HUU9ZZMUzweLLML1Bowu7SP36oTDYH4oQoxLg=;\n\tb=kh0jprWYzgnPZgm8LaUzlWOlGhTKqF1rFec4PYG+TWjCCf+mmZQoAdcN3OKbPGCmr4\n\tfYC8pyMfFELcni3RnXddUuCCTweEY/ajGKwzdOkA6TqSadt9cJecBifxFitrx9gogg0V\n\twbsvMUBL79PsbonypvFqgy7j5Z8MjEApD2bifotGB4Ypb+p4D1ldND3L33dbLFTenJFb\n\tAyT7lNAj4UjX8Rf0fITQ1ii0L6CAPLZqgSMJA9DQdjcjq0tRA2dpdYbHp8clVkcIz3r2\n\tJhb8d+C9ZczDs7uqcRW3FWFccLsDF3j+MIZrjSeI31YkF8pvxz48O2Gud5QwgPcGrxwP\n\tJtbw==","X-Gm-Message-State":"APjAAAWdgC0ENX0YUQJ0DlCr9tsCr5vNVni0BuX8qwWCg0bNe0+XdxCE\n\tRQXk4U+8HY+dLP0xb2mIgHPSiA==","X-Google-Smtp-Source":"APXvYqzQEBfxBXqngAwfq3KK4uZCkdb9r1q17YI9yuxLZ+W5T1HvuIUG+KPgmc5Uu0dKDHN+JPsp7w==","X-Received":"by 2002:a37:b842:: with SMTP id\n\ti63mr34788581qkf.451.1580928553461; \n\tWed, 05 Feb 2020 10:49:13 -0800 (PST)","Message-ID":"<8f4a71981275782eac030dda68f8068695058aab.camel@ndufresne.ca>","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"kieran.bingham@ideasonboard.com","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Date":"Wed, 05 Feb 2020 13:49:11 -0500","In-Reply-To":"<55719e66-bfd3-f845-e86d-4e107f97e4d1@ideasonboard.com>","References":"<20200205130420.8736-1-kieran.bingham@ideasonboard.com>\n\t<CAKQmDh-vZ1pnWcc+z7qbS_gp8DVk_4aJLQ4jxZPDXrXqmC0PWg@mail.gmail.com>\n\t<55719e66-bfd3-f845-e86d-4e107f97e4d1@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","User-Agent":"Evolution 3.34.3 (3.34.3-1.fc31) ","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 05 Feb 2020 18:49:15 -0000"}},{"id":3624,"web_url":"https://patchwork.libcamera.org/comment/3624/","msgid":"<20200206203941.GF7611@pendragon.ideasonboard.com>","date":"2020-02-06T20:39:41","subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Nicolas,\n\nOn Wed, Feb 05, 2020 at 01:49:11PM -0500, Nicolas Dufresne wrote:\n> Le mercredi 05 février 2020 à 14:12 +0000, Kieran Bingham a écrit :\n> > On 05/02/2020 14:03, Nicolas Dufresne wrote:\n> >> Le mer. 5 févr. 2020 08 h 04, Kieran Bingham a écrit :\n> >>>\n> >>> When developing and testing libcamera, the usual development model is to\n> >>> compile and run one of the test or utility applications.\n> >> \n> >> I like it. Be aware that it won't work for me. It only work if the build\n> >> path matches run path, which isn't the case when cross compiling and\n> >> exporting over NFS. Any suggestion ?\n> > \n> > Interesting (and painful) point.\n> > \n> > Ideally it would be a relative path, but the binary path\n> >  (/proc/self/exe) doesn't always have to stay relative to the library\n> > path ...\n> > \n> > I wonder if I can get the library path at runtime... Time to dig into\n> > what else is in the _DYNAMIC table perhaps.\n> > \n> > Otherwise, I'm certainly open to suggestions from the list here ;-)\n> \n> Note that meanwhile I can just set the env really, I'm a bit use to that anyway.\n> GStreamer, GLib and Mesa (which are the kind of stuff I cross compile) all\n> requires few envs already.\n\nHow about installing libcamera instead of copying binaries ? :-) You can\nset the prefix to the path on your target system, and install to your\nNFS directory by setting the DESTDIR variable for meson install.\n\n> >>> IPA modules are loaded by the IPAManager, from a system path, or by\n> >>> parsing an environment variable.\n> >>>\n> >>> Provide the build path to the library through a temporary storage in the\n> >>> runpath of the ELF library strings table.  This entry is stripped at\n> >>> install time, but allows us to identify the location of the recently\n> >>> compiled IPA modules without the user having to manually declare paths to the\n> >>> build system.\n> >>>\n> >>> Previously to this series the IPA tests would only be able to be run\n> >>> from the root of the build tree, due to the hardcoded path relative to that\n> >>> point. Now that the IPAs can be found from their build location, we no longer\n> >>> need to provide this hardcoded path through the LIBCAMERA_IPA_MODULE_PATH\n> >>> for tests, and as a further consequence they can be run directly without\n> >>> requiring the launch to be run from the top level of the build tree.\n> >>>\n> >>> Kieran Bingham (5):\n> >>>   libcamera: utils: Provide helper to get dynamic library runpath\n> >>>   libcamera: ipa_manager: Split path handling\n> >>>   libcamera: ipa_manager: Allow recursive parsing\n> >>>   libcamera: ipa_manager: Search the runpath for IPA libraries\n> >>>   tests: Remove IPA_MODULE_PATH environment variable\n> >>>\n> >>>  src/libcamera/include/ipa_manager.h |   5 +-\n> >>>  src/libcamera/include/utils.h       |   1 +\n> >>>  src/libcamera/ipa_manager.cpp       | 111 ++++++++++++++++++++++------\n> >>>  src/libcamera/meson.build           |   1 +\n> >>>  src/libcamera/utils.cpp             |  26 +++++++\n> >>>  src/meson.build                     |   7 ++\n> >>>  test/libtest/test.cpp               |   4 -\n> >>>  7 files changed, 126 insertions(+), 29 deletions(-)","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 50C5A60864\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 Feb 2020 21:39:57 +0100 (CET)","from pendragon.ideasonboard.com\n\t(117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A88BC9F0;\n\tThu,  6 Feb 2020 21:39:56 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1581021596;\n\tbh=rNs4aq6T6JPNxXtsWe/pJ+3xh8NpoYjv9zcCjO1lPik=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RI2sZ5708r+ncOOovJIZmaAi+NP10UC4XNoIyJ5rIn+grfJVg8iiyt+iOgpVz+b2x\n\ti1YpeHrh+L+e/sInvKBcWqEScC2Ju0CbYIfJUa1nCsOJWyKfFudUrWMiQaolEOwlKP\n\tvF+q32AGo4gfletYq9ydVIHcXgDZP8Jkc5Q4n3Ts=","Date":"Thu, 6 Feb 2020 22:39:41 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"kieran.bingham@ideasonboard.com,\n\tLibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20200206203941.GF7611@pendragon.ideasonboard.com>","References":"<20200205130420.8736-1-kieran.bingham@ideasonboard.com>\n\t<CAKQmDh-vZ1pnWcc+z7qbS_gp8DVk_4aJLQ4jxZPDXrXqmC0PWg@mail.gmail.com>\n\t<55719e66-bfd3-f845-e86d-4e107f97e4d1@ideasonboard.com>\n\t<8f4a71981275782eac030dda68f8068695058aab.camel@ndufresne.ca>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<8f4a71981275782eac030dda68f8068695058aab.camel@ndufresne.ca>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Thu, 06 Feb 2020 20:39:57 -0000"}},{"id":3642,"web_url":"https://patchwork.libcamera.org/comment/3642/","msgid":"<282f17911c4f0ea7003c405844e77ad9562d0d17.camel@ndufresne.ca>","date":"2020-02-08T17:54:52","subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le jeudi 06 février 2020 à 22:39 +0200, Laurent Pinchart a écrit :\n> Hi Nicolas,\n> \n> On Wed, Feb 05, 2020 at 01:49:11PM -0500, Nicolas Dufresne wrote:\n> > Le mercredi 05 février 2020 à 14:12 +0000, Kieran Bingham a écrit :\n> > > On 05/02/2020 14:03, Nicolas Dufresne wrote:\n> > > > Le mer. 5 févr. 2020 08 h 04, Kieran Bingham a écrit :\n> > > > > When developing and testing libcamera, the usual development model is to\n> > > > > compile and run one of the test or utility applications.\n> > > > \n> > > > I like it. Be aware that it won't work for me. It only work if the build\n> > > > path matches run path, which isn't the case when cross compiling and\n> > > > exporting over NFS. Any suggestion ?\n> > > \n> > > Interesting (and painful) point.\n> > > \n> > > Ideally it would be a relative path, but the binary path\n> > >  (/proc/self/exe) doesn't always have to stay relative to the library\n> > > path ...\n> > > \n> > > I wonder if I can get the library path at runtime... Time to dig into\n> > > what else is in the _DYNAMIC table perhaps.\n> > > \n> > > Otherwise, I'm certainly open to suggestions from the list here ;-)\n> > \n> > Note that meanwhile I can just set the env really, I'm a bit use to that anyway.\n> > GStreamer, GLib and Mesa (which are the kind of stuff I cross compile) all\n> > requires few envs already.\n> \n> How about installing libcamera instead of copying binaries ? :-) You can\n> set the prefix to the path on your target system, and install to your\n> NFS directory by setting the DESTDIR variable for meson install.\n\nI'm not sure what you refer to with \"installing instead of copying\nbinaries\" (that sounds like the same thing, as installing requires\ncopying binaries). I'm strictly speaking about running things from\nbuild tree here, something we happen to have been doing for more then a\ndecade in the GStreamer project. We use environments though, as your\nsolution isn't portable, we just don't have that luxury to ignore other\nOS.\n\n> \n> > > > > IPA modules are loaded by the IPAManager, from a system path, or by\n> > > > > parsing an environment variable.\n> > > > > \n> > > > > Provide the build path to the library through a temporary storage in the\n> > > > > runpath of the ELF library strings table.  This entry is stripped at\n> > > > > install time, but allows us to identify the location of the recently\n> > > > > compiled IPA modules without the user having to manually declare paths to the\n> > > > > build system.\n> > > > > \n> > > > > Previously to this series the IPA tests would only be able to be run\n> > > > > from the root of the build tree, due to the hardcoded path relative to that\n> > > > > point. Now that the IPAs can be found from their build location, we no longer\n> > > > > need to provide this hardcoded path through the LIBCAMERA_IPA_MODULE_PATH\n> > > > > for tests, and as a further consequence they can be run directly without\n> > > > > requiring the launch to be run from the top level of the build tree.\n> > > > > \n> > > > > Kieran Bingham (5):\n> > > > >   libcamera: utils: Provide helper to get dynamic library runpath\n> > > > >   libcamera: ipa_manager: Split path handling\n> > > > >   libcamera: ipa_manager: Allow recursive parsing\n> > > > >   libcamera: ipa_manager: Search the runpath for IPA libraries\n> > > > >   tests: Remove IPA_MODULE_PATH environment variable\n> > > > > \n> > > > >  src/libcamera/include/ipa_manager.h |   5 +-\n> > > > >  src/libcamera/include/utils.h       |   1 +\n> > > > >  src/libcamera/ipa_manager.cpp       | 111 ++++++++++++++++++++++------\n> > > > >  src/libcamera/meson.build           |   1 +\n> > > > >  src/libcamera/utils.cpp             |  26 +++++++\n> > > > >  src/meson.build                     |   7 ++\n> > > > >  test/libtest/test.cpp               |   4 -\n> > > > >  7 files changed, 126 insertions(+), 29 deletions(-)","headers":{"Return-Path":"<nicolas@ndufresne.ca>","Received":["from mail-qk1-x744.google.com (mail-qk1-x744.google.com\n\t[IPv6:2607:f8b0:4864:20::744])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 535BB607EC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  8 Feb 2020 18:54:56 +0100 (CET)","by mail-qk1-x744.google.com with SMTP id q15so2449322qke.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 08 Feb 2020 09:54:56 -0800 (PST)","from skullcanyon ([192.222.193.21])\n\tby smtp.gmail.com with ESMTPSA id\n\tj58sm3328931qtk.27.2020.02.08.09.54.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 08 Feb 2020 09:54:54 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20150623.gappssmtp.com; s=20150623;\n\th=message-id:subject:from:to:cc:date:in-reply-to:references\n\t:user-agent:mime-version:content-transfer-encoding;\n\tbh=BpkUqBxAQceC2rMcVxNDQCngeLA2kIXtvnPeEyKUysA=;\n\tb=lN2d6EZlP4XYcC7tj0ExLQYpBPYpfXbPVbMWBpNUZ/Golrc7OraqyYITwHWQSINRhH\n\tH/2d19QcYktaTw1zFhpIOsIDCRy2WFK380OIXFi2137z3x9YmYHREVA8kLBa5l6EVXtW\n\tIbKHyzVjfcNrsY47oI6mGw91U9FeMSsif1DB0qnNbj6WfB4aewTU2IB/7W6AUgPlZb/C\n\tGP3z37uYiljTIRjogetxxrd5M4IGOUKTv3u1cHAiV31gOjyeyoryXHyj4jNhLpNyB0eD\n\t232YYQbuKZS81raZHmSYJAtb/1qm1Cjd0qBJxGL6vOfTYN+LNwcGfVHI566zgXdtgpKI\n\t99rw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=BpkUqBxAQceC2rMcVxNDQCngeLA2kIXtvnPeEyKUysA=;\n\tb=Q8mwleGL1qH7Bbwcjd+8Z/XKmJ7ybL+GyQLBEHzPA+yYQ1TlQRkY1ffZKC00WssWQc\n\tT7gxf5JNJC/BZ8M5yTL/4reNqGRgHuMphcOQjR7vd4DrWcMqSFfLl1ZwB8ys0K+oXYl+\n\tPXlTJWkvrNku6WvQwPmR7ilHE1jNTejmhnxG/lhN2hWYMydpeNgrOtgW3FcYvoGGDV4L\n\tV1r3wfFVJKyFkXjQOP6ZfokGEjxKILuLtF+yd6Ua2zU6d19mFjSPAWxnCKjzsB0O/mwp\n\tYSSkT7A6De/+iajv2YGsSTClJz509v/RraS3PMfNSD4VEovcYLEKg7yvtpAFsghsuD8A\n\tIrPg==","X-Gm-Message-State":"APjAAAXjmo+s8RHLy4Ex2AoIDl+SxAY9hAP0G+cYSP/Qfx2pJSSD5KGt\n\tT5D20nsy9nvjS6e18pwaTlnYp77t2Qua5A==","X-Google-Smtp-Source":"APXvYqyukD6T//iOjtZQKhXMfTyHkLzesoNDLAj784RERrSpYWatEMBLr+uwA7Dj6oAWis4iGKUnDg==","X-Received":"by 2002:a05:620a:16a4:: with SMTP id\n\ts4mr4078723qkj.488.1581184494850; \n\tSat, 08 Feb 2020 09:54:54 -0800 (PST)","Message-ID":"<282f17911c4f0ea7003c405844e77ad9562d0d17.camel@ndufresne.ca>","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"kieran.bingham@ideasonboard.com, LibCamera Devel\n\t<libcamera-devel@lists.libcamera.org>","Date":"Sat, 08 Feb 2020 12:54:52 -0500","In-Reply-To":"<20200206203941.GF7611@pendragon.ideasonboard.com>","References":"<20200205130420.8736-1-kieran.bingham@ideasonboard.com>\n\t<CAKQmDh-vZ1pnWcc+z7qbS_gp8DVk_4aJLQ4jxZPDXrXqmC0PWg@mail.gmail.com>\n\t<55719e66-bfd3-f845-e86d-4e107f97e4d1@ideasonboard.com>\n\t<8f4a71981275782eac030dda68f8068695058aab.camel@ndufresne.ca>\n\t<20200206203941.GF7611@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","User-Agent":"Evolution 3.34.3 (3.34.3-1.fc31) ","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sat, 08 Feb 2020 17:54:56 -0000"}},{"id":3654,"web_url":"https://patchwork.libcamera.org/comment/3654/","msgid":"<20200211155111.GE22612@pendragon.ideasonboard.com>","date":"2020-02-11T15:51:11","subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Nicolas,\n\nOn Sat, Feb 08, 2020 at 12:54:52PM -0500, Nicolas Dufresne wrote:\n> Le jeudi 06 février 2020 à 22:39 +0200, Laurent Pinchart a écrit :\n> > On Wed, Feb 05, 2020 at 01:49:11PM -0500, Nicolas Dufresne wrote:\n> >> Le mercredi 05 février 2020 à 14:12 +0000, Kieran Bingham a écrit :\n> >>> On 05/02/2020 14:03, Nicolas Dufresne wrote:\n> >>>> Le mer. 5 févr. 2020 08 h 04, Kieran Bingham a écrit :\n> >>>>> When developing and testing libcamera, the usual development model is to\n> >>>>> compile and run one of the test or utility applications.\n> >>>> \n> >>>> I like it. Be aware that it won't work for me. It only work if the build\n> >>>> path matches run path, which isn't the case when cross compiling and\n> >>>> exporting over NFS. Any suggestion ?\n> >>> \n> >>> Interesting (and painful) point.\n> >>> \n> >>> Ideally it would be a relative path, but the binary path\n> >>>  (/proc/self/exe) doesn't always have to stay relative to the library\n> >>> path ...\n> >>> \n> >>> I wonder if I can get the library path at runtime... Time to dig into\n> >>> what else is in the _DYNAMIC table perhaps.\n> >>> \n> >>> Otherwise, I'm certainly open to suggestions from the list here ;-)\n> >> \n> >> Note that meanwhile I can just set the env really, I'm a bit use to that anyway.\n> >> GStreamer, GLib and Mesa (which are the kind of stuff I cross compile) all\n> >> requires few envs already.\n> > \n> > How about installing libcamera instead of copying binaries ? :-) You can\n> > set the prefix to the path on your target system, and install to your\n> > NFS directory by setting the DESTDIR variable for meson install.\n> \n> I'm not sure what you refer to with \"installing instead of copying\n> binaries\" (that sounds like the same thing, as installing requires\n> copying binaries). I'm strictly speaking about running things from\n> build tree here, something we happen to have been doing for more then a\n> decade in the GStreamer project. We use environments though, as your\n> solution isn't portable, we just don't have that luxury to ignore other\n> OS.\n\nYes, if you run directly from the build tree, it's an issue not solved\nby this series. But wouldn't it be better in that case to install to the\nNFS root as part of the (cross-)compilation on the host instead of\nrunning in the build tree ?\n\n> >>>>> IPA modules are loaded by the IPAManager, from a system path, or by\n> >>>>> parsing an environment variable.\n> >>>>> \n> >>>>> Provide the build path to the library through a temporary storage in the\n> >>>>> runpath of the ELF library strings table.  This entry is stripped at\n> >>>>> install time, but allows us to identify the location of the recently\n> >>>>> compiled IPA modules without the user having to manually declare paths to the\n> >>>>> build system.\n> >>>>> \n> >>>>> Previously to this series the IPA tests would only be able to be run\n> >>>>> from the root of the build tree, due to the hardcoded path relative to that\n> >>>>> point. Now that the IPAs can be found from their build location, we no longer\n> >>>>> need to provide this hardcoded path through the LIBCAMERA_IPA_MODULE_PATH\n> >>>>> for tests, and as a further consequence they can be run directly without\n> >>>>> requiring the launch to be run from the top level of the build tree.\n> >>>>> \n> >>>>> Kieran Bingham (5):\n> >>>>>   libcamera: utils: Provide helper to get dynamic library runpath\n> >>>>>   libcamera: ipa_manager: Split path handling\n> >>>>>   libcamera: ipa_manager: Allow recursive parsing\n> >>>>>   libcamera: ipa_manager: Search the runpath for IPA libraries\n> >>>>>   tests: Remove IPA_MODULE_PATH environment variable\n> >>>>> \n> >>>>>  src/libcamera/include/ipa_manager.h |   5 +-\n> >>>>>  src/libcamera/include/utils.h       |   1 +\n> >>>>>  src/libcamera/ipa_manager.cpp       | 111 ++++++++++++++++++++++------\n> >>>>>  src/libcamera/meson.build           |   1 +\n> >>>>>  src/libcamera/utils.cpp             |  26 +++++++\n> >>>>>  src/meson.build                     |   7 ++\n> >>>>>  test/libtest/test.cpp               |   4 -\n> >>>>>  7 files changed, 126 insertions(+), 29 deletions(-)","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 987726043D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Feb 2020 16:51:26 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 033112D2;\n\tTue, 11 Feb 2020 16:51:25 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1581436286;\n\tbh=lqvJzIgg9usAU3ed3ufgV7fVsEGpyE44uqYJOHNtVp4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jszRs7RRPv/8W+wdr0OVixl0ZVr4bHOBRpVdEJt3raKqH+TwWHf6LJOi3WfTaRMvl\n\tTWV11N/KGtgOUZT7v3pVfdJn4jexe5YzPJyLShXRZhe1roH/zVqNJWxLI+DnKJSK7M\n\tZdWDbZA5rq4hvUIIDgYCkUoOVzWihzk4/LGJfKYI=","Date":"Tue, 11 Feb 2020 17:51:11 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"kieran.bingham@ideasonboard.com,\n\tLibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20200211155111.GE22612@pendragon.ideasonboard.com>","References":"<20200205130420.8736-1-kieran.bingham@ideasonboard.com>\n\t<CAKQmDh-vZ1pnWcc+z7qbS_gp8DVk_4aJLQ4jxZPDXrXqmC0PWg@mail.gmail.com>\n\t<55719e66-bfd3-f845-e86d-4e107f97e4d1@ideasonboard.com>\n\t<8f4a71981275782eac030dda68f8068695058aab.camel@ndufresne.ca>\n\t<20200206203941.GF7611@pendragon.ideasonboard.com>\n\t<282f17911c4f0ea7003c405844e77ad9562d0d17.camel@ndufresne.ca>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<282f17911c4f0ea7003c405844e77ad9562d0d17.camel@ndufresne.ca>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 11 Feb 2020 15:51:26 -0000"}},{"id":3698,"web_url":"https://patchwork.libcamera.org/comment/3698/","msgid":"<357f4e0528fe0e17edaadd38586133fc62842dde.camel@ndufresne.ca>","date":"2020-02-12T17:55:07","subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le mardi 11 février 2020 à 17:51 +0200, Laurent Pinchart a écrit :\n> Hi Nicolas,\n> \n> On Sat, Feb 08, 2020 at 12:54:52PM -0500, Nicolas Dufresne wrote:\n> > Le jeudi 06 février 2020 à 22:39 +0200, Laurent Pinchart a écrit :\n> > > On Wed, Feb 05, 2020 at 01:49:11PM -0500, Nicolas Dufresne wrote:\n> > > > Le mercredi 05 février 2020 à 14:12 +0000, Kieran Bingham a écrit :\n> > > > > On 05/02/2020 14:03, Nicolas Dufresne wrote:\n> > > > > > Le mer. 5 févr. 2020 08 h 04, Kieran Bingham a écrit :\n> > > > > > > When developing and testing libcamera, the usual development model is to\n> > > > > > > compile and run one of the test or utility applications.\n> > > > > > \n> > > > > > I like it. Be aware that it won't work for me. It only work if the build\n> > > > > > path matches run path, which isn't the case when cross compiling and\n> > > > > > exporting over NFS. Any suggestion ?\n> > > > > \n> > > > > Interesting (and painful) point.\n> > > > > \n> > > > > Ideally it would be a relative path, but the binary path\n> > > > >  (/proc/self/exe) doesn't always have to stay relative to the library\n> > > > > path ...\n> > > > > \n> > > > > I wonder if I can get the library path at runtime... Time to dig into\n> > > > > what else is in the _DYNAMIC table perhaps.\n> > > > > \n> > > > > Otherwise, I'm certainly open to suggestions from the list here ;-)\n> > > > \n> > > > Note that meanwhile I can just set the env really, I'm a bit use to that anyway.\n> > > > GStreamer, GLib and Mesa (which are the kind of stuff I cross compile) all\n> > > > requires few envs already.\n> > > \n> > > How about installing libcamera instead of copying binaries ? :-) You can\n> > > set the prefix to the path on your target system, and install to your\n> > > NFS directory by setting the DESTDIR variable for meson install.\n> > \n> > I'm not sure what you refer to with \"installing instead of copying\n> > binaries\" (that sounds like the same thing, as installing requires\n> > copying binaries). I'm strictly speaking about running things from\n> > build tree here, something we happen to have been doing for more then a\n> > decade in the GStreamer project. We use environments though, as your\n> > solution isn't portable, we just don't have that luxury to ignore other\n> > OS.\n> \n> Yes, if you run directly from the build tree, it's an issue not solved\n> by this series. But wouldn't it be better in that case to install to the\n> NFS root as part of the (cross-)compilation on the host instead of\n> running in the build tree ?\n\nIn my setup, the build tree is exported over NFS. So on the nfs server,\nwhich is the build server too, I do:\n\n  cd /path/to/nfs/something/gst-build\n  ninja -C build\n\nAnd on the target:\n  cd something/gst-build\n  ./gst-unisntalled.py --sysroot /path/to/nfs\n\nI've aggregated libcamera to gst-build (it's extensible), but still\nneed some env specific to libcamera. I tried this patchset, but still\nneeded the env. Now my setup have no secret anymore ;-D\n\nThat in no way invalidate this patch, I think it's really nice for\nthose testing on host (should work with virtme too).\n\n> \n> > > > > > > IPA modules are loaded by the IPAManager, from a system path, or by\n> > > > > > > parsing an environment variable.\n> > > > > > > \n> > > > > > > Provide the build path to the library through a temporary storage in the\n> > > > > > > runpath of the ELF library strings table.  This entry is stripped at\n> > > > > > > install time, but allows us to identify the location of the recently\n> > > > > > > compiled IPA modules without the user having to manually declare paths to the\n> > > > > > > build system.\n> > > > > > > \n> > > > > > > Previously to this series the IPA tests would only be able to be run\n> > > > > > > from the root of the build tree, due to the hardcoded path relative to that\n> > > > > > > point. Now that the IPAs can be found from their build location, we no longer\n> > > > > > > need to provide this hardcoded path through the LIBCAMERA_IPA_MODULE_PATH\n> > > > > > > for tests, and as a further consequence they can be run directly without\n> > > > > > > requiring the launch to be run from the top level of the build tree.\n> > > > > > > \n> > > > > > > Kieran Bingham (5):\n> > > > > > >   libcamera: utils: Provide helper to get dynamic library runpath\n> > > > > > >   libcamera: ipa_manager: Split path handling\n> > > > > > >   libcamera: ipa_manager: Allow recursive parsing\n> > > > > > >   libcamera: ipa_manager: Search the runpath for IPA libraries\n> > > > > > >   tests: Remove IPA_MODULE_PATH environment variable\n> > > > > > > \n> > > > > > >  src/libcamera/include/ipa_manager.h |   5 +-\n> > > > > > >  src/libcamera/include/utils.h       |   1 +\n> > > > > > >  src/libcamera/ipa_manager.cpp       | 111 ++++++++++++++++++++++------\n> > > > > > >  src/libcamera/meson.build           |   1 +\n> > > > > > >  src/libcamera/utils.cpp             |  26 +++++++\n> > > > > > >  src/meson.build                     |   7 ++\n> > > > > > >  test/libtest/test.cpp               |   4 -\n> > > > > > >  7 files changed, 126 insertions(+), 29 deletions(-)","headers":{"Return-Path":"<nicolas@ndufresne.ca>","Received":["from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com\n\t[IPv6:2607:f8b0:4864:20::f43])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B89261917\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Feb 2020 18:55:10 +0100 (CET)","by mail-qv1-xf43.google.com with SMTP id y8so1328340qvk.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Feb 2020 09:55:10 -0800 (PST)","from skullcanyon ([192.222.193.21])\n\tby smtp.gmail.com with ESMTPSA id\n\tw53sm615504qtb.91.2020.02.12.09.55.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 12 Feb 2020 09:55:07 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20150623.gappssmtp.com; s=20150623;\n\th=message-id:subject:from:to:cc:date:in-reply-to:references\n\t:user-agent:mime-version:content-transfer-encoding;\n\tbh=nN9osN/WoQFYpambFFYT5tSGkT944dKR1TnDD9mPzPY=;\n\tb=qGz5AJJdO+zE/3niG7yVIbxdccqQE2ppSblfEhR75K1nQWQ+6TQe6ourYUMdKL8Kq3\n\tc31niRC7kQD7TlwrLYj35MCt6ZOZIlDuQ4fDDN8zrVdjaz/mja9geScK5MNGdH04UcDG\n\tiUxEkBna5e6jxLDXb+C59eJKg/5MJXBEKp3JD7TyL+fL7HNXlbbBQL+lxWyymhw5RXMT\n\tS6xBKuAQAYU76Ij6HRTi6P44C8CIYr4I420ESvdjp6bDSm4twpTp2SHc/INEGI+QS1FS\n\tYIrVX4Pi7j4Oj6/QGYhoqV5IQYecJhxwBgan7CFPcRb61FPDhN/y+bFMEaj3jf10oRDn\n\trCPA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=nN9osN/WoQFYpambFFYT5tSGkT944dKR1TnDD9mPzPY=;\n\tb=DZxH/UGUFBsEU2lgO/jkO8wBuAXRpCUlVn2CX6B9Qm/Yz9fev27MktugRbUaXqi6i4\n\teBs12VhmdO8ApN5xmdki9QcUWdLuKGcAaGmOX3df+4/awoFI/YrTXdTeTV0ZfQWe7uUE\n\tuVEzj/91Pq7oNLi9CkOEeXzo/3q6kUF97y8Sx5lGcq6tlclDpupdkqK/xudzmNjyWIvk\n\tIWKx2wBTSZp1AItl4UE3KLaz/tXPxn2LjMX2kwiFXccUczQFzXLnNUto2CcQyiVZmcXt\n\tZ6R1ug/T+znBM6Ihg4W0QLT1bntgfuQ+Tm87pyDhYBPhlNRuzncLDtFcFPL1lwEelKeb\n\tDKCQ==","X-Gm-Message-State":"APjAAAVdBpAbtZKe0eWtK8gy/BuoxzxRGMEpERvTliPQ2MndFbin6iBu\n\tITBAePecQiqPpwOuIjDANamCXvxGLKkauw==","X-Google-Smtp-Source":"APXvYqxc2MkZ19HoDcdeWuKuQPWUm90ipWx7eS+UW8U8HnEzcqgkLJ0JmVSbdL/GQGW8mf5COs8FNA==","X-Received":"by 2002:ad4:58ae:: with SMTP id\n\tea14mr8012089qvb.247.1581530108837; \n\tWed, 12 Feb 2020 09:55:08 -0800 (PST)","Message-ID":"<357f4e0528fe0e17edaadd38586133fc62842dde.camel@ndufresne.ca>","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"kieran.bingham@ideasonboard.com, LibCamera Devel\n\t<libcamera-devel@lists.libcamera.org>","Date":"Wed, 12 Feb 2020 12:55:07 -0500","In-Reply-To":"<20200211155111.GE22612@pendragon.ideasonboard.com>","References":"<20200205130420.8736-1-kieran.bingham@ideasonboard.com>\n\t<CAKQmDh-vZ1pnWcc+z7qbS_gp8DVk_4aJLQ4jxZPDXrXqmC0PWg@mail.gmail.com>\n\t<55719e66-bfd3-f845-e86d-4e107f97e4d1@ideasonboard.com>\n\t<8f4a71981275782eac030dda68f8068695058aab.camel@ndufresne.ca>\n\t<20200206203941.GF7611@pendragon.ideasonboard.com>\n\t<282f17911c4f0ea7003c405844e77ad9562d0d17.camel@ndufresne.ca>\n\t<20200211155111.GE22612@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","User-Agent":"Evolution 3.34.3 (3.34.3-1.fc31) ","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 0/5] Support loading IPAs from the\n\tbuild tree","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 12 Feb 2020 17:55:10 -0000"}}]