{"action":"created","issue":{"url":"https://api.github.com/repos/opencv/opencv/issues/11181","repository_url":"https://api.github.com/repos/opencv/opencv","labels_url":"https://api.github.com/repos/opencv/opencv/issues/11181/labels{/name}","comments_url":"https://api.github.com/repos/opencv/opencv/issues/11181/comments","events_url":"https://api.github.com/repos/opencv/opencv/issues/11181/events","html_url":"https://github.com/opencv/opencv/issues/11181","id":309319321,"number":11181,"title":"Can't disable neon","user":{"login":"Nadav-Eyesight","id":18419714,"avatar_url":"https://avatars3.githubusercontent.com/u/18419714?v=4","gravatar_id":"","url":"https://api.github.com/users/Nadav-Eyesight","html_url":"https://github.com/Nadav-Eyesight","followers_url":"https://api.github.com/users/Nadav-Eyesight/followers","following_url":"https://api.github.com/users/Nadav-Eyesight/following{/other_user}","gists_url":"https://api.github.com/users/Nadav-Eyesight/gists{/gist_id}","starred_url":"https://api.github.com/users/Nadav-Eyesight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nadav-Eyesight/subscriptions","organizations_url":"https://api.github.com/users/Nadav-Eyesight/orgs","repos_url":"https://api.github.com/users/Nadav-Eyesight/repos","events_url":"https://api.github.com/users/Nadav-Eyesight/events{/privacy}","received_events_url":"https://api.github.com/users/Nadav-Eyesight/received_events","type":"User","site_admin":false},"labels":[{"id":241025032,"url":"https://api.github.com/repos/opencv/opencv/labels/category:%20build/install","name":"category: build/install","color":"ededed","default":false},{"id":9731373,"url":"https://api.github.com/repos/opencv/opencv/labels/invalid","name":"invalid","color":"000000","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-28T11:01:50Z","updated_at":"2018-03-28T13:26:40Z","closed_at":null,"author_association":"NONE","body":"##### System information (version)\r\n\r\n- OpenCV => 3.4.0\r\n- Operating System / Platform => Debian Jessie\r\n- Compiler => aarch64-linux-gnu-g++ 4.9.2\r\n\r\n##### Detailed description\r\n\r\nCompiling with the following command results in opencv trying to use NEON despite me telling it not to:\r\n`cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DENABLE_VFPV3=OFF -DENABLE_NEON=OFF ..`\r\n\r\nWhich is a real problem because I'm using GCC 4.9.2, which doesn't have NEON support. So I end up getting errors like:\r\n```\r\nIn file included from /opencv/opencv-3.4.0/3rdparty/libwebp/src/dsp/neon.h:15:0,\r\n                 from /opencv/opencv-3.4.0/3rdparty/libwebp/src/dsp/alpha_processing_neon.c:18:\r\n/usr/lib/gcc/aarch64-linux-gnu/4.9/include/arm_neon.h: In function 'vqadd_u8':\r\n/usr/lib/gcc/aarch64-linux-gnu/4.9/include/arm_neon.h:2116:3: error: incompatible types when returning type 'int' but 'uint8x8_t' was expected\r\n   return __builtin_aarch64_uqaddv8qi_uuu (__a, __b);\r\n   ^\r\n```\r\n\r\n##### Steps to reproduce\r\nCross compile using an extended [dockcross](https://github.com/dockcross/dockcross) script. Let's call it `linux-arm64` and save it in a folder called `dockerfiles`\r\n```\r\nFROM dockcross/linux-arm64\r\n\r\nENV DEFAULT_DOCKCROSS_IMAGE linux-arm64\r\n\r\n# Set up CCache\r\nRUN apt-get -y install ccache\r\nENV CCACHE_DIR=/.ccache\r\nRUN mkdir /.ccache\r\nRUN chmod 777 /.ccache\r\n\r\n# Install required libraries\r\nRUN apt-get -y install libavcodec-dev:arm64 libavformat-dev:arm64 libswscale-dev:arm64 libjpeg-dev:arm64 libpng-dev:arm64 libtiff-dev:arm64 libdc1394-22:arm64 libdc1394-22-dev:arm64\r\nRUN apt-get -y install --no-install-recommends libgtk2.0-dev:arm64\r\n\r\n\r\n# cd to /opencv and download OpenCV source\r\nWORKDIR /opencv\r\nRUN wget https://github.com/opencv/opencv/archive/3.4.0.zip\r\nRUN apt-get install unzip\r\nRUN unzip 3.4.0.zip\r\nRUN ln -s /opencv/opencv-3.4.0 /opencv/opencv\r\n\r\n# Create build folder\r\nWORKDIR /opencv/opencv\r\nRUN mkdir /opencv/opencv/build\r\nWORKDIR /opencv/opencv/build\r\n\r\nENV PKG_CONFIG_PATH /usr/lib/aarch64-linux-gnu/pkgconfig/\r\n\r\n# Build OpenCV\r\n# ##### The command I really want to use, commented out in favor of a simplified example. RUN cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_MAKE_PROGRAM=make -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_QT=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_DOCS=OFF -DENABLE_NEON=OFF -DBUILD_opencv_cudabgsegm=OFF -DBUILD_opencv_superres=OFF -DBUILD_opencv_cudalegacy=OFF -DBUILD_opencv_cudafilters=OFF -DBUILD_opencv_cudastereo=OFF -DBUILD_opencv_cudafeatures2d=OFF -DBUILD_opencv_shape=OFF -DBUILD_opencv_ml=OFF -DBUILD_opencv_stitching=OFF -DBUILD_opencv_python_bindings_generator=OFF -DBUILD_opencv_photo=OFF -DBUILD_opencv_cudaoptflow=OFF -DBUILD_opencv_ts=OFF -DBUILD_opencv_calib3d=OFF -DBUILD_opencv_videostab=OFF -DBUILD_opencv_cudacodec=OFF -DBUILD_opencv_core=ON -DBUILD_opencv_cudaimgproc=OFF -DBUILD_opencv_dnn=OFF -DBUILD_opencv_objdetect=OFF -DBUILD_opencv_apps=OFF -DBUILD_opencv_cudev=OFF -DBUILD_opencv_video=OFF -DBUILD_opencv_cudawarping=OFF -DBUILD_opencv_cudaarithm=OFF -DBUILD_opencv_features2d=OFF -DBUILD_opencv_cudaobjdetect=OFF -DBUILD_opencv_flann=OFF -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE .. \r\nRUN cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DENABLE_VFPV3=OFF -DENABLE_NEON=OFF ..`\r\nRUN make -j7\r\nRUN make install\r\n\r\nWORKDIR /work\r\n```\r\nRun the following in terminal:\r\n`docker build -f dockerfiles/linux-arm64 -t linux-arm64 .`\r\n\r\nWatch it fail, because the stable GCC has no NEON support, and OpenCV doesn't care."},"comment":{"url":"https://api.github.com/repos/opencv/opencv/issues/comments/376885884","html_url":"https://github.com/opencv/opencv/issues/11181#issuecomment-376885884","issue_url":"https://api.github.com/repos/opencv/opencv/issues/11181","id":376885884,"user":{"login":"tomoaki0705","id":3737315,"avatar_url":"https://avatars3.githubusercontent.com/u/3737315?v=4","gravatar_id":"","url":"https://api.github.com/users/tomoaki0705","html_url":"https://github.com/tomoaki0705","followers_url":"https://api.github.com/users/tomoaki0705/followers","following_url":"https://api.github.com/users/tomoaki0705/following{/other_user}","gists_url":"https://api.github.com/users/tomoaki0705/gists{/gist_id}","starred_url":"https://api.github.com/users/tomoaki0705/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomoaki0705/subscriptions","organizations_url":"https://api.github.com/users/tomoaki0705/orgs","repos_url":"https://api.github.com/users/tomoaki0705/repos","events_url":"https://api.github.com/users/tomoaki0705/events{/privacy}","received_events_url":"https://api.github.com/users/tomoaki0705/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T13:26:40Z","updated_at":"2018-03-28T13:26:40Z","author_association":"CONTRIBUTOR","body":"Something is wrong in your configuration\r\nI daily build arm64 using GCC 4.9.2, but I face no problem.\r\nhttps://gist.github.com/tomoaki0705/5b19baa09a9882317c711145586deaa0\r\n\r\nThe message says that the error is coming from the header file.\r\nArn't you mixing wrong version of header and the compiler ?\r\n\r\nBTW, what's the output of cmake and ```g++ --version``` ?  Are you sure you're kicking the correct compiler ?"}}
{"actor":{"display_login":"tomoaki0705"}}