{"action":"created","issue":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/9310","repository_url":"https://api.github.com/repos/pytorch/pytorch","labels_url":"https://api.github.com/repos/pytorch/pytorch/issues/9310/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/9310/comments","events_url":"https://api.github.com/repos/pytorch/pytorch/issues/9310/events","html_url":"https://github.com/pytorch/pytorch/issues/9310","id":339936686,"node_id":"MDU6SXNzdWUzMzk5MzY2ODY=","number":9310,"title":"/usr/bin/ld: cannot find -lpthreads","user":{"login":"xypron","id":2747104,"node_id":"MDQ6VXNlcjI3NDcxMDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2747104?v=4","gravatar_id":"","url":"https://api.github.com/users/xypron","html_url":"https://github.com/xypron","followers_url":"https://api.github.com/users/xypron/followers","following_url":"https://api.github.com/users/xypron/following{/other_user}","gists_url":"https://api.github.com/users/xypron/gists{/gist_id}","starred_url":"https://api.github.com/users/xypron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xypron/subscriptions","organizations_url":"https://api.github.com/users/xypron/orgs","repos_url":"https://api.github.com/users/xypron/repos","events_url":"https://api.github.com/users/xypron/events{/privacy}","received_events_url":"https://api.github.com/users/xypron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-10T17:23:58Z","updated_at":"2018-07-11T21:59:10Z","closed_at":null,"author_association":"NONE","body":"On Debian Buster\r\n\r\n    cmake .\r\n\r\nleads to an error\r\n\r\n```\r\nDetermining if the function pthread_create exists in the pthreads failed with the following output:\r\nChange Dir: /home/zfsdt/temp/pytorch/CMakeFiles/CMakeTmp\r\n\r\nRun Build Command:\"/usr/bin/make\" \"cmTC_d9266/fast\"\r\n/usr/bin/make -f CMakeFiles/cmTC_d9266.dir/build.make CMakeFiles/cmTC_d9266.dir/build\r\nmake[1]: Entering directory '/home/zfsdt/temp/pytorch/CMakeFiles/CMakeTmp'\r\nBuilding C object CMakeFiles/cmTC_d9266.dir/CheckFunctionExists.c.o\r\n/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create -fPIE   -o CMakeFiles/cmTC_d9266.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.11/Modules/CheckFunctionExists.c\r\nLinking C executable cmTC_d9266\r\n/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d9266.dir/link.txt --verbose=1\r\n/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_d9266.dir/CheckFunctionExists.c.o  -o cmTC_d9266 -lpthreads \r\n/usr/bin/ld: cannot find -lpthreads\r\ncollect2: error: ld returned 1 exit status\r\nCMakeFiles/cmTC_d9266.dir/build.make:86: recipe for target 'cmTC_d9266' failed\r\nmake[1]: *** [cmTC_d9266] Error 1\r\nmake[1]: Leaving directory '/home/zfsdt/temp/pytorch/CMakeFiles/CMakeTmp'\r\nMakefile:126: recipe for target 'cmTC_d9266/fast' failed\r\nmake: *** [cmTC_d9266/fast] Error 2\r\n```\r\n\r\nFor compilation with pthreads  -pthread should be used not -lpthreads"},"comment":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/comments/404324034","html_url":"https://github.com/pytorch/pytorch/issues/9310#issuecomment-404324034","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/9310","id":404324034,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDMyNDAzNA==","user":{"login":"zou3519","id":5652049,"node_id":"MDQ6VXNlcjU2NTIwNDk=","avatar_url":"https://avatars3.githubusercontent.com/u/5652049?v=4","gravatar_id":"","url":"https://api.github.com/users/zou3519","html_url":"https://github.com/zou3519","followers_url":"https://api.github.com/users/zou3519/followers","following_url":"https://api.github.com/users/zou3519/following{/other_user}","gists_url":"https://api.github.com/users/zou3519/gists{/gist_id}","starred_url":"https://api.github.com/users/zou3519/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zou3519/subscriptions","organizations_url":"https://api.github.com/users/zou3519/orgs","repos_url":"https://api.github.com/users/zou3519/repos","events_url":"https://api.github.com/users/zou3519/events{/privacy}","received_events_url":"https://api.github.com/users/zou3519/received_events","type":"User","site_admin":false},"created_at":"2018-07-11T21:59:10Z","updated_at":"2018-07-11T21:59:10Z","author_association":"CONTRIBUTOR","body":"https://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling\r\n\r\n`-lpthread` and `-pthread` seem to both be valid, with some stackoverflow sources saying that `-pthread` is more portable.\r\n\r\nI'm not sure if `-lpthreads` (with the s) is a thing though; that might be the problem with this error"}}
{"actor":{"display_login":"zou3519"}}