{"id":3166,"url":"https://patchwork.libcamera.org/api/patches/3166/?format=json","web_url":"https://patchwork.libcamera.org/patch/3166/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200318115846.7975-5-kgupta@es.iitr.ac.in>","date":"2020-03-18T11:58:44","name":"[libcamera-devel,v3,4/6] libcamera: ipa_proxy: search for proxy in build tree","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"3d311ae6522fc13bbea89ea14637a07270ccf396","submitter":{"id":39,"url":"https://patchwork.libcamera.org/api/people/39/?format=json","name":"Kaaira Gupta","email":"kgupta@es.iitr.ac.in"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3166/mbox/","series":[{"id":731,"url":"https://patchwork.libcamera.org/api/series/731/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=731","date":"2020-03-18T11:58:40","name":"libcamera: determine IPA_PROXY_PATH at runtime","version":3,"mbox":"https://patchwork.libcamera.org/series/731/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3166/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3166/checks/","tags":{},"headers":{"Return-Path":"<kgupta@es.iitr.ac.in>","Received":["from mail-pg1-x544.google.com (mail-pg1-x544.google.com\n\t[IPv6:2607:f8b0:4864:20::544])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 89DDA60419\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 12:59:29 +0100 (CET)","by mail-pg1-x544.google.com with SMTP id m5so13571828pgg.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 04:59:29 -0700 (PDT)","from kaaira-HP-Pavilion-Notebook ([103.113.213.153])\n\tby smtp.gmail.com with ESMTPSA id\n\tg6sm2288456pjv.13.2020.03.18.04.59.26\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 18 Mar 2020 04:59:27 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=S9PynKcuJpQuOHFN0kYzs6do1Q7f5BCY5H/KXRXtOSw=;\n\tb=0fH4m7JPOKML1jbO5sadrOwmzYctIEJNi0shwkBi1nJWytq0MsPF99JWvozUZapOK+\n\t4ceanhci/SwPr8GWIC9QlZMddwPZa4qoCaVSIeQWHP163X7vfuzfF6VZrGTSRLC6+LW7\n\tcb93j+CIgqws15DtWm/spu0TR2+qz6rDiFk7Onn+XIFEQ3b+1X6vqTlkfM6M/qTxIWCF\n\t42obaQNvVB747wV1XXukyUfRxB2C2OXOj2kyot1HPkNH3tAcRhQ6kWBlc+6ZumbkQhlV\n\tWEk1z7aeGU4SwZI+L8V0CKU3ZB5OKL2GXtERtZG7sQpVpVMh/ilL3n8mhOYaK0v3okPi\n\tAryw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=S9PynKcuJpQuOHFN0kYzs6do1Q7f5BCY5H/KXRXtOSw=;\n\tb=TUA5PUYjr30Y1Kwc9eO4AJwXRqAcf9ZGj6+Bkbn/jvMMG+PuVQUPjl4FISudmo1P8V\n\tBV0HgolpOw7qpXiDcQu+LzblmKs08y79WXrwaKVKTa9H7ktHnZOc4nguPalOOXniSIwa\n\tEsnU/uOtvTGWn1jwJS626lnP/a6lrjrEtjV+rcRwEkJNYn9+76BZ06yPqbmtpMZKWf/Z\n\tyAXdv2SYIhQGMmp4u+8WpZ6ltXXzER9q/p+7kaWWR7dwr6jMXHwefYEu3ugAwSbgsyRU\n\tFwKmOFzlNmzvn92FN+x6Bp2e6t/cQxNBPom0w/LgIBRSNYc8G9xnEF4r0FnnCeIHmQ6j\n\tT7GA==","X-Gm-Message-State":"ANhLgQ0kvkTBS5btJ+6sPNUwUuF5Hfub61Gn3hrEWrsvt9F5rSHvxrIh\n\tvSr7dwlBrj8cpdz7Icck+M83aJiobiU=","X-Google-Smtp-Source":"ADFU+vvouxoXglSf1HSkQuIcmGFk+yvofKmvOvPRdpjXMeMX5Odc0iQv3sIvAstb3Q2I7XPmCwZaow==","X-Received":"by 2002:a63:8b42:: with SMTP id j63mr4038255pge.27.1584532768129;\n\tWed, 18 Mar 2020 04:59:28 -0700 (PDT)","From":"Kaaira Gupta <kgupta@es.iitr.ac.in>","To":"Helen Koike <helen.koike@collabora.com>,\n\tVaishali Thakkar <vthakkar@vaishalithakkar.in>,\n\tkieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org","Cc":"Kaaira Gupta <kgupta@es.iitr.ac.in>","Date":"Wed, 18 Mar 2020 17:28:44 +0530","Message-Id":"<20200318115846.7975-5-kgupta@es.iitr.ac.in>","X-Mailer":"git-send-email 2.17.1","In-Reply-To":"<20200318115846.7975-1-kgupta@es.iitr.ac.in>","References":"<20200318115846.7975-1-kgupta@es.iitr.ac.in>","Subject":"[libcamera-devel] [PATCH LIBCAMERA v3 4/6] libcamera: ipa_proxy:\n\tsearch for proxy in build 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, 18 Mar 2020 11:59:29 -0000"},"content":"When libcamera is built and tested before installing, it will\nbe unable to locate the path to proxy files, or previously\ninstalled files in the system path may be incorrect to load.\n\nHence, when libcamera is not installed and running from a build\ntree, identify the location of that tree by using libcameraPath(), and\nfrom that point add relative path to the proxy file.\n\nSigned-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>\n---\n src/libcamera/ipa_proxy.cpp | 21 +++++++++++++++++----\n 1 file changed, 17 insertions(+), 4 deletions(-)","diff":"diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\nindex b409e1d..1014e79 100644\n--- a/src/libcamera/ipa_proxy.cpp\n+++ b/src/libcamera/ipa_proxy.cpp\n@@ -91,10 +91,23 @@ std::string IPAProxy::resolvePath(const std::string &file) const\n \t\t}\n \t}\n \n-\t/* Try finding the exec target from the install directory. */\n-\tstd::string proxyPath = std::string(IPA_PROXY_DIR) + proxyFile;\n-\tif (!access(proxyPath.c_str(), X_OK))\n-\t\treturn proxyPath;\n+\t/*\n+\t * When libcamera is used before it is installed, load proxies from the\n+\t * same build directory as the libcamera directory itself. This requires\n+\t * identifying the path of the libcamera.so, and referencing a relative\n+\t * path for the proxies from that point.\n+\t */\n+\tif (!utils::isLibcameraInstalled()) {\n+\t\tstd::string ipaProxyDir = utils::dirname(utils::libcameraPath()) + \"/../../proxy\";\n+\n+\t\tLOG(IPAProxy, Info)\n+\t\t\t<< \"libcamera is not installed. Adding '\"\n+\t\t\t<< ipaProxyDir << \"' to the Proxy search path\";\n+\n+\t\tstd::string proxyPath = ipaProxyDir + proxyFile;\n+\t\tif (!access(proxyPath.c_str(), X_OK))\n+\t\t\treturn proxyPath;\n+\t}\n \n \treturn std::string();\n }\n","prefixes":["libcamera-devel","v3","4/6"]}