{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/tools/issues/50","repository_url":"https://api.github.com/repos/raspberrypi/tools","labels_url":"https://api.github.com/repos/raspberrypi/tools/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/tools/issues/50/comments","events_url":"https://api.github.com/repos/raspberrypi/tools/issues/50/events","html_url":"https://github.com/raspberrypi/tools/issues/50","id":134920553,"number":50,"title":"4.9 toolchain issue","user":{"login":"solderspot","id":6226321,"avatar_url":"https://avatars.githubusercontent.com/u/6226321?v=3","gravatar_id":"","url":"https://api.github.com/users/solderspot","html_url":"https://github.com/solderspot","followers_url":"https://api.github.com/users/solderspot/followers","following_url":"https://api.github.com/users/solderspot/following{/other_user}","gists_url":"https://api.github.com/users/solderspot/gists{/gist_id}","starred_url":"https://api.github.com/users/solderspot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solderspot/subscriptions","organizations_url":"https://api.github.com/users/solderspot/orgs","repos_url":"https://api.github.com/users/solderspot/repos","events_url":"https://api.github.com/users/solderspot/events{/privacy}","received_events_url":"https://api.github.com/users/solderspot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2016-02-19T17:16:10Z","updated_at":"2016-10-02T14:25:06Z","closed_at":null,"body":"I was able to cross compile my project successfully for Jessie using the previous **gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf** toolchain that was added briefly a few days ago. However, with the new replacement 4.9 toolchain **arm-rpi-4.9.3-linux-gnueabihf** I get this error when calling **cmake**:\r\n\r\n```\r\n/home/solderspot/pidev/pitools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld:\r\n  cannot find crt1.o: No such file or directory\r\n```\r\n\r\nAny suggestions as to what the problem is?\r\n\r\nHere is the **CMAKE_TOOLCHAIN_FILE** that works fine for the previous**gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf** toolchain, as well as **gcc-linaro-arm-linux-gnueabihf-raspbian-x64**:\r\n\r\n```\r\nSET(CMAKE_SYSTEM_NAME Linux)\r\nSET(CMAKE_SYSTEM_VERSION 1)\r\n\r\nSET(DEVROOT $ENV{HOME}/pidev)\r\nSET(PIROOT ${DEVROOT}/piroot)\r\nSET(PITOOLS ${DEVROOT}/pitools)\r\n\r\n#SET(TOOLROOT ${PITOOLS}/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64)\r\nSET(TOOLROOT ${PITOOLS}/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf)\r\n\r\n# specify the cross compiler\r\nSET(CMAKE_C_COMPILER   ${TOOLROOT}/bin/arm-linux-gnueabihf-gcc)\r\nSET(CMAKE_CXX_COMPILER ${TOOLROOT}/bin/arm-linux-gnueabihf-g++)\r\n\r\nSET(FLAGS \"-Wl,-rpath-link,${PIROOT}/opt/vc/lib -Wl,-rpath-link,${PIROOT}/lib/arm-linux-gnueabihf -Wl,-rpath-link,${PIROOT}/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,${PIROOT}/usr/local/lib\")\r\n\r\nUNSET(CMAKE_C_FLAGS CACHE)\r\nUNSET(CMAKE_CXX_FLAGS CACHE)\r\n\r\nSET(CMAKE_CXX_FLAGS ${FLAGS} CACHE STRING \"\" FORCE)\r\nSET(CMAKE_C_FLAGS ${FLAGS} CACHE STRING \"\" FORCE)\r\n\r\nSET(CMAKE_SYSROOT ${PIROOT})\r\nSET(CMAKE_FIND_ROOT_PATH ${PIROOT})\r\n\r\n\r\n# search for programs in the build host directories\r\nSET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\r\n# for libraries and headers in the target directories\r\nSET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\r\nSET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\r\n```\r\n\r\n[More details about the project can be found here: https://solderspot.wordpress.com/2016/02/04/cross-compiling-for-raspberry-pi-part-ii/]"},"comment":{"url":"https://api.github.com/repos/raspberrypi/tools/issues/comments/250973819","html_url":"https://github.com/raspberrypi/tools/issues/50#issuecomment-250973819","issue_url":"https://api.github.com/repos/raspberrypi/tools/issues/50","id":250973819,"user":{"login":"grheard","id":11306237,"avatar_url":"https://avatars.githubusercontent.com/u/11306237?v=3","gravatar_id":"","url":"https://api.github.com/users/grheard","html_url":"https://github.com/grheard","followers_url":"https://api.github.com/users/grheard/followers","following_url":"https://api.github.com/users/grheard/following{/other_user}","gists_url":"https://api.github.com/users/grheard/gists{/gist_id}","starred_url":"https://api.github.com/users/grheard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grheard/subscriptions","organizations_url":"https://api.github.com/users/grheard/orgs","repos_url":"https://api.github.com/users/grheard/repos","events_url":"https://api.github.com/users/grheard/events{/privacy}","received_events_url":"https://api.github.com/users/grheard/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T14:25:06Z","updated_at":"2016-10-02T14:25:06Z","body":"@thijstriemstra, doesn't work too well with jessie as the sysroot:\r\n\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libEGL.so: undefined reference to `pthread_setspecific@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `pthread_attr_setstacksize@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `dlerror@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libEGL.so: undefined reference to `pthread_key_create@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `pthread_join@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libEGL.so: undefined reference to `sem_post@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `sem_trywait@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `dlclose@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libEGL.so: undefined reference to `pthread_getspecific@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libEGL.so: undefined reference to `sem_init@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libEGL.so: undefined reference to `sem_wait@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `pthread_mutexattr_init@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libEGL.so: undefined reference to `sem_getvalue@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libEGL.so: undefined reference to `sem_destroy@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `dlopen@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `pthread_mutexattr_settype@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `pthread_once@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `pthread_mutexattr_destroy@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `dlsym@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `pthread_create@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libEGL.so: undefined reference to `pthread_key_delete@GLIBC_2.4'\r\n/home/heardg/pi/system/devroot/opt/vc/lib/libvcos.so: undefined reference to `clock_gettime@GLIBC_2.4'\r\n"}}
{"actor":{"display_login":"grheard"}}