{"action":"closed","issue":{"url":"https://api.github.com/repos/davisking/dlib/issues/154","repository_url":"https://api.github.com/repos/davisking/dlib","labels_url":"https://api.github.com/repos/davisking/dlib/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/davisking/dlib/issues/154/comments","events_url":"https://api.github.com/repos/davisking/dlib/issues/154/events","html_url":"https://github.com/davisking/dlib/issues/154","id":164704090,"number":154,"title":"ImportError undefined symbol cblas_ddot","user":{"login":"mljli","id":7010007,"avatar_url":"https://avatars.githubusercontent.com/u/7010007?v=3","gravatar_id":"","url":"https://api.github.com/users/mljli","html_url":"https://github.com/mljli","followers_url":"https://api.github.com/users/mljli/followers","following_url":"https://api.github.com/users/mljli/following{/other_user}","gists_url":"https://api.github.com/users/mljli/gists{/gist_id}","starred_url":"https://api.github.com/users/mljli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mljli/subscriptions","organizations_url":"https://api.github.com/users/mljli/orgs","repos_url":"https://api.github.com/users/mljli/repos","events_url":"https://api.github.com/users/mljli/events{/privacy}","received_events_url":"https://api.github.com/users/mljli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-10T07:36:22Z","updated_at":"2016-07-10T13:35:11Z","closed_at":"2016-07-10T13:35:10Z","body":"OS: Arch Linux 64bit\r\n\r\n```\r\n$ pkg-config --libs cblas\r\n-L -lcblas -lblas\r\n$ file /lib/libcblas.so\r\n/lib/libcblas.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=016679535567a6065cc9f5d0cdcbeb3f5830aa93, stripped\r\n$ nm -D /lib/libcblas.so | grep ddot\r\n0000000000008a60 T cblas_ddot\r\n```\r\n\r\nCMake's output:\r\n```\r\n-- Found PkgConfig: /usr/bin/pkg-config (found version 0.29.1) \r\n-- Checking for module 'cblas'\r\n--   Found cblas, version 3.6.1\r\n-- Checking for module 'lapack'\r\n--   Found lapack, version 3.6.1\r\n-- Found BLAS and LAPACK via pkg-config\r\n```\r\n\r\nI see Dlib doesn't check for `cblas_ddot` if it finds BLAS using pkg-config https://github.com/davisking/dlib/blob/master/dlib/cmake_utils/cmake_find_blas.txt#L54. I added the lines checking for `cblas_ddot` before the return statement and CMake said it can't find `cblas_ddot`. According to this [thread](http://stackoverflow.com/questions/13747505/why-doesnt-check-function-exists-find-clock-gettime-in-cmake), I replaced `CHECK_FUNCTION_EXISTS` with `CHECK_LIBRARY_EXISTS` and CMake finally found `cblas_ddot`.\r\n\r\nBut I also wrote a simple C program to test `cblas_ddot` and it works fine. Which means even though Dlib does not check for `cblas_dot`, it should be able to find it at runtime. Right? I've checked *link.txt* and whether `cblas_ddot` is found or not, cblas and lapack are linked. So there probably is a problem when packing Dlib into a shared library."}}
{"actor":{"display_login":"davisking"}}