{"action":"created","issue":{"url":"https://api.github.com/repos/warmcat/libwebsockets/issues/136","labels_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/136/comments","events_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/136/events","html_url":"https://github.com/warmcat/libwebsockets/issues/136","id":36809048,"number":136,"title":"Error Cross Compile ARM9 (ARMv5)","user":{"login":"beyonlo","id":630637,"avatar_url":"https://avatars.githubusercontent.com/u/630637?v=3","gravatar_id":"","url":"https://api.github.com/users/beyonlo","html_url":"https://github.com/beyonlo","followers_url":"https://api.github.com/users/beyonlo/followers","following_url":"https://api.github.com/users/beyonlo/following{/other_user}","gists_url":"https://api.github.com/users/beyonlo/gists{/gist_id}","starred_url":"https://api.github.com/users/beyonlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beyonlo/subscriptions","organizations_url":"https://api.github.com/users/beyonlo/orgs","repos_url":"https://api.github.com/users/beyonlo/repos","events_url":"https://api.github.com/users/beyonlo/events{/privacy}","received_events_url":"https://api.github.com/users/beyonlo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-06-30T15:37:22Z","updated_at":"2015-02-27T15:19:04Z","closed_at":null,"body":"Hello, I trying to compile the libwebsockets com arm9 (ARMv5).\r\nAre there errors finding in6addr.h, vfork.h and zlib.h.\r\nHow I disable to don't get that erros?\r\nI tryed \"cmake -LH ..\" but nothing!\r\n\r\nbuild$ cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_TOOLCHAIN_FILE=../cross-arm-linux-gnueabihf.cmake -DWITHOUT_EXTENSIONS=0 -DWITH_SSL=0\r\n-- The C compiler identification is GNU 4.4.5\r\n-- The CXX compiler identification is GNU 4.4.5\r\n-- Check for working C compiler: /opt/arm-davinci-linux-uclibcgnueabi/bin/arm-davinci-linux-uclibcgnueabi-gcc\r\n-- Check for working C compiler: /opt/arm-davinci-linux-uclibcgnueabi/bin/arm-davinci-linux-uclibcgnueabi-gcc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Check for working CXX compiler: /opt/arm-davinci-linux-uclibcgnueabi/bin/arm-davinci-linux-uclibcgnueabi-g++\r\n-- Check for working CXX compiler: /opt/arm-davinci-linux-uclibcgnueabi/bin/arm-davinci-linux-uclibcgnueabi-g++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- CMAKE_TOOLCHAIN_FILE='/home/pi/tmp/websocket/libwebsockets/cross-arm-linux-gnueabihf.cmake'\r\n-- Found Git: /usr/bin/git  \r\nGit commit hash: dfca3ab\r\n-- Performing Test HAVE_inline\r\n-- Performing Test HAVE_inline - Success\r\n-- Performing Test HAVE___inline__\r\n-- Performing Test HAVE___inline__ - Success\r\n-- Performing Test HAVE___inline\r\n-- Performing Test HAVE___inline - Success\r\n-- Looking for bzero\r\n-- Looking for bzero - found\r\n-- Looking for fork\r\n-- Looking for fork - found\r\n-- Looking for getenv\r\n-- Looking for getenv - found\r\n-- Looking for malloc\r\n-- Looking for malloc - found\r\n-- Looking for memset\r\n-- Looking for memset - found\r\n-- Looking for realloc\r\n-- Looking for realloc - found\r\n-- Looking for socket\r\n-- Looking for socket - found\r\n-- Looking for strerror\r\n-- Looking for strerror - found\r\n-- Looking for vfork\r\n-- Looking for vfork - found\r\n-- Looking for getifaddrs\r\n-- Looking for getifaddrs - found\r\n-- Looking for dlfcn.h\r\n-- Looking for dlfcn.h - found\r\n-- Looking for fcntl.h\r\n-- Looking for fcntl.h - found\r\n-- Looking for in6addr.h\r\n-- Looking for in6addr.h - not found\r\n-- Looking for inttypes.h\r\n-- Looking for inttypes.h - found\r\n-- Looking for memory.h\r\n-- Looking for memory.h - found\r\n-- Looking for netinet/in.h\r\n-- Looking for netinet/in.h - found\r\n-- Looking for stdint.h\r\n-- Looking for stdint.h - found\r\n-- Looking for stdlib.h\r\n-- Looking for stdlib.h - found\r\n-- Looking for strings.h\r\n-- Looking for strings.h - found\r\n-- Looking for string.h\r\n-- Looking for string.h - found\r\n-- Looking for sys/prctl.h\r\n-- Looking for sys/prctl.h - found\r\n-- Looking for sys/socket.h\r\n-- Looking for sys/socket.h - found\r\n-- Looking for sys/stat.h\r\n-- Looking for sys/stat.h - found\r\n-- Looking for sys/types.h\r\n-- Looking for sys/types.h - found\r\n-- Looking for unistd.h\r\n-- Looking for unistd.h - found\r\n-- Looking for vfork.h\r\n-- Looking for vfork.h - not found\r\n-- Looking for zlib.h\r\n-- Looking for zlib.h - not found\r\n-- Looking for 4 include files stdlib.h, ..., float.h\r\n-- Looking for 4 include files stdlib.h, ..., float.h - found\r\n-- Looking for stddef.h\r\n-- Looking for stddef.h - found\r\n-- Check size of pid_t\r\n-- Check size of pid_t - done\r\n-- Check size of size_t\r\n-- Check size of size_t - done\r\nCMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):\r\n  Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)\r\nCall Stack (most recent call first):\r\n  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)\r\n  /usr/share/cmake-2.8/Modules/FindZLIB.cmake:85 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)\r\n  CMakeLists.txt:459 (find_package)\r\n\r\n\r\n-- Configuring incomplete, errors occurred!\r\n\r\n------------------\r\n\r\nHere is my cross-arm-linux-gnueabihf.cmake:\r\n\r\n$ cat ../cross-arm-linux-gnueabihf.cmake \r\n#\r\n# CMake Toolchain file for crosscompiling on ARM.\r\n#\r\n# This can be used when running cmake in the following way:\r\n#  cd build/\r\n#  cmake .. -DCMAKE_TOOLCHAIN_FILE=../cross-arm-linux-gnueabihf.cmake\r\n#\r\n\r\nset(CROSS_PATH /opt/arm-davinci-linux-uclibcgnueabi)\r\n\r\n# Target operating system name.\r\nset(CMAKE_SYSTEM_NAME Linux)\r\n\r\n# Name of C compiler.\r\nset(CMAKE_C_COMPILER \"${CROSS_PATH}/bin/arm-davinci-linux-uclibcgnueabi-gcc\")\r\nset(CMAKE_CXX_COMPILER \"${CROSS_PATH}/bin/arm-davinci-linux-uclibcgnueabi-g++\")\r\n\r\n# Where to look for the target environment. (More paths can be added here)\r\nset(CMAKE_FIND_ROOT_PATH \"${CROSS_PATH}\")\r\n\r\n# Adjust the default behavior of the FIND_XXX() commands:\r\n# search programs in the host environment only.\r\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\r\n\r\n# Search headers and libraries in the target environment only.\r\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\r\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\r\n\r\n-------------------\r\n\r\nThank you."},"comment":{"url":"https://api.github.com/repos/warmcat/libwebsockets/issues/comments/76410296","html_url":"https://github.com/warmcat/libwebsockets/issues/136#issuecomment-76410296","issue_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/136","id":76410296,"user":{"login":"warmcat","id":1497695,"avatar_url":"https://avatars.githubusercontent.com/u/1497695?v=3","gravatar_id":"","url":"https://api.github.com/users/warmcat","html_url":"https://github.com/warmcat","followers_url":"https://api.github.com/users/warmcat/followers","following_url":"https://api.github.com/users/warmcat/following{/other_user}","gists_url":"https://api.github.com/users/warmcat/gists{/gist_id}","starred_url":"https://api.github.com/users/warmcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warmcat/subscriptions","organizations_url":"https://api.github.com/users/warmcat/orgs","repos_url":"https://api.github.com/users/warmcat/repos","events_url":"https://api.github.com/users/warmcat/events{/privacy}","received_events_url":"https://api.github.com/users/warmcat/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T15:19:04Z","updated_at":"2015-02-27T15:19:04Z","body":"These are just basic cross-build questions... you need to import native libs + includes to your build system to build against them with the cross compiler.\r\n\r\nIt's MUCH simpler to build the library native on the Arm board using native Arm gcc on there.\r\n\r\nYou can remove the dependency on libz by disabling extensions at cmake and in6addr.h by disabling IPV6 at cmake."}}