{"action":"opened","issue":{"url":"https://api.github.com/repos/RaiMan/SikuliX-2014/issues/187","repository_url":"https://api.github.com/repos/RaiMan/SikuliX-2014","labels_url":"https://api.github.com/repos/RaiMan/SikuliX-2014/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/RaiMan/SikuliX-2014/issues/187/comments","events_url":"https://api.github.com/repos/RaiMan/SikuliX-2014/issues/187/events","html_url":"https://github.com/RaiMan/SikuliX-2014/issues/187","id":132736291,"number":187,"title":"LinuxSupport saying it has found OpenCV libs when it has not","user":{"login":"lordoku","id":1112973,"avatar_url":"https://avatars.githubusercontent.com/u/1112973?v=3","gravatar_id":"","url":"https://api.github.com/users/lordoku","html_url":"https://github.com/lordoku","followers_url":"https://api.github.com/users/lordoku/followers","following_url":"https://api.github.com/users/lordoku/following{/other_user}","gists_url":"https://api.github.com/users/lordoku/gists{/gist_id}","starred_url":"https://api.github.com/users/lordoku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordoku/subscriptions","organizations_url":"https://api.github.com/users/lordoku/orgs","repos_url":"https://api.github.com/users/lordoku/repos","events_url":"https://api.github.com/users/lordoku/events{/privacy}","received_events_url":"https://api.github.com/users/lordoku/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-10T15:47:21Z","updated_at":"2016-02-10T15:47:21Z","closed_at":null,"body":"My team and I were attempting to install sikuli x on a system that was disconnected from the internet. We currently have all of the external dependencies but we were unable to get the installation to work. We turned up debugging and saw the following lines of output: \r\n\r\n```\r\nLinuxSupport: we have to build libVisionProxy.so\r\nLinuxSupport: checking: availability of OpenCV and Tesseract\r\nLinuxSupport: checking: scanning loader cache (ldconfig -p)\r\nRunTimeSETUP: ldconfig -p \r\nLinuxSupport: checking: found OpenCV libs: \r\n\r\n\r\nLinuxSupport: checking: found Tesseract iib: \r\n\r\nRunTimeSETUP: wmctrl -m\r\n```\r\n\r\nOn our system it turned out we were running as a non-root user that did not have ldconfig. I took a look at the LinuxSupport.java and found the following issue: \r\n\r\n```\r\n 51 private static String libOpenCVcore = \"\";\r\n 52 private static String libOpenCVimgproc = \"\";\r\n 53 private static String libOpenCVhighgui = \"\";\r\n 54 private static String libTesseract = \"\";\r\n```\r\nFor starters each of the values is initialized to a blank string and not null. \r\n\r\n```\r\n136 cmdRet = runTime.runcmd(\"ldconfig -p\");\r\n137 if (cmdRet.contains(runTime.runCmdError)) {\r\n```\r\nNext it attempts to run the ldconfig to get all of the libs on the path. Since I'm not seeing the error on line 138: \r\n`138 log(-1, \"checking: ldconfig returns error:\\ns\", cmdRet);`\r\n\r\nIt appears the remaining lines of code are being executed: \r\n```\r\n140    } else {\r\n141     String[] libs = cmdRet.split(\"\\n\");\r\n142     for (String libx : libs) {\r\n143       libx = libx.trim();\r\n144        if (!libx.startsWith(\"lib\")) {\r\n145         continue;\r\n146       }\r\n147        if (libx.startsWith(\"libopencv_core.so.\")) {\r\n148          libOpenCVcore = libx.split(\"=>\")[1].trim();\r\n149       } else if (libx.startsWith(\"libopencv_highgui.so.\")) {\r\n150          libOpenCVhighgui = libx.split(\"=>\")[1].trim();\r\n151        } else if (libx.startsWith(\"libopencv_imgproc.so.\")) {\r\n152         libOpenCVimgproc = libx.split(\"=>\")[1].trim();\r\n153        } else if (libx.startsWith(\"libtesseract.so.\")) {\r\n154         libTesseract = libx.split(\"=>\")[1].trim();\r\n155        }\r\n156     }\r\n157     if (libOpenCVcore == null || libOpenCVhighgui == null || libOpenCVimgproc == null) {\r\n158        log(-1, \"checking: OpenCV not in loader cache (see doc-note on OpenCV)\");\r\n159       opencvAvail = checkSuccess = false;\r\n160     } else {\r\n161       log(lvl, \"checking: found OpenCV libs:\\n%s\\n%s\\n%s\",\r\n162                libOpenCVcore, libOpenCVhighgui, libOpenCVimgproc);\r\n163     }\r\n```\r\n\r\nAs a result the libOpenCVcore, libOpenCVhighgui and the libOpenCVImgproc never get updated and remain with their initial value of. \r\n\r\nAs a result, I get the output \r\n\r\n```\r\n\"checking:found OpenCV libs\r\n\r\n\r\n\"\r\n```\r\n\r\nFor our issue, we're working with out admin to get opencv added to the ldcache. Is there anyway to link the opencv libs without it being the ldcache? "}}