{"action":"created","issue":{"url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1861","repository_url":"https://api.github.com/repos/xianyi/OpenBLAS","labels_url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1861/labels{/name}","comments_url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1861/comments","events_url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1861/events","html_url":"https://github.com/xianyi/OpenBLAS/issues/1861","id":378632382,"node_id":"MDU6SXNzdWUzNzg2MzIzODI=","number":1861,"title":"*GEMM_DEFAULT_UNROLL_* errors","user":{"login":"aytekinar","id":8845951,"node_id":"MDQ6VXNlcjg4NDU5NTE=","avatar_url":"https://avatars2.githubusercontent.com/u/8845951?v=4","gravatar_id":"","url":"https://api.github.com/users/aytekinar","html_url":"https://github.com/aytekinar","followers_url":"https://api.github.com/users/aytekinar/followers","following_url":"https://api.github.com/users/aytekinar/following{/other_user}","gists_url":"https://api.github.com/users/aytekinar/gists{/gist_id}","starred_url":"https://api.github.com/users/aytekinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aytekinar/subscriptions","organizations_url":"https://api.github.com/users/aytekinar/orgs","repos_url":"https://api.github.com/users/aytekinar/repos","events_url":"https://api.github.com/users/aytekinar/events{/privacy}","received_events_url":"https://api.github.com/users/aytekinar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-11-08T08:50:57Z","updated_at":"2018-11-08T19:34:34Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nFor my project, I am working on providing multi-architecture Docker images that are shipped with either [reference LAPACK](https://github.com/reference-lapack/lapack-release) or OpenBLAS. The former seems to be working smoothly for `amd64`, `arm32v6` and `arm64v8` architectures. However, I have problems building the Docker image (with OpenBLAS) for the ARM architectures.\r\n\r\nBelow is the excerpt from my `Dockerfile` (see [attached](https://github.com/xianyi/OpenBLAS/files/2560947/Dockerfile.txt) for the full version) that builds and installs OpenBLAS:\r\n\r\n```dockerfile\r\n# Build and install reference LAPACK from source\r\nRUN git clone https://github.com/xianyi/OpenBLAS /tmp/openblas\r\nWORKDIR /tmp/openblas\r\nRUN git checkout v0.3.3\r\nRUN mkdir build\r\nWORKDIR /tmp/openblas/build\r\nRUN cmake -D CMAKE_INSTALL_PREFIX=/usr/local  \\\r\n          -D CMAKE_BUILD_TYPE=Release         \\\r\n          -D BUILD_SHARED_LIBS=ON             \\\r\n          -D BUILD_WITHOUT_LAPACK=OFF         \\\r\n          -D BUILD_WITHOUT_CBLAS=ON           \\\r\n          -D DYNAMIC_ARCH=ON                  \\\r\n          ../\r\nRUN cmake --build .\r\nRUN cmake --build . --target install\r\n```\r\n\r\nI am using an `amd64` host with `qemu-user-static` handles registered via the Docker image. Basically, I am building the Docker images in an emulator, using `alpine` as the base image. When I run\r\n\r\n```bash\r\ndocker run --rm --privileged multiarch/qemu-user-static:register --reset\r\ndocker build --tag my-image:openblas-arm32v6 .\r\n```\r\n\r\nI get the long list of error messages:\r\n\r\n```\r\nCMake Error at cmake/prebuild.cmake:229 (MESSAGE):\r\n  Compiling getarch_2nd failed Change Dir:\r\n  /tmp/openblas/build/getarch2_build/CMakeFiles/CMakeTmp\r\n\r\n  \r\n\r\n  Run Build Command:\"/usr/bin/make\" \"cmTC_10582/fast\"\r\n\r\n  /usr/bin/make -f CMakeFiles/cmTC_10582.dir/build.make\r\n  CMakeFiles/cmTC_10582.dir/build\r\n\r\n  make[1]: Entering directory\r\n  '/tmp/openblas/build/getarch2_build/CMakeFiles/CMakeTmp'\r\n\r\n  Building C object CMakeFiles/cmTC_10582.dir/getarch_2nd.c.o\r\n\r\n  /usr/bin/cc -DGEMM_MULTITHREAD_THRESHOLD=4 -DNO_PARALLEL_MAKE=0\r\n  -I/tmp/openblas/build/getarch2_build -I\"/tmp/openblas\"\r\n  -I\"/tmp/openblas/build\" -o CMakeFiles/cmTC_10582.dir/getarch_2nd.c.o -c\r\n  /tmp/openblas/getarch_2nd.c\r\n\r\n  /tmp/openblas/getarch_2nd.c: In function 'main':\r\n\r\n  /tmp/openblas/getarch_2nd.c:12:35: error: 'SGEMM_DEFAULT_UNROLL_M'\r\n  undeclared (first use in this function)\r\n\r\n       printf(\"SGEMM_UNROLL_M=%d\\n\", SGEMM_DEFAULT_UNROLL_M);\r\n                                     ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  /tmp/openblas/getarch_2nd.c:12:35: note: each undeclared identifier is\r\n  reported only once for each function it appears in\r\n\r\n  /tmp/openblas/getarch_2nd.c:13:35: error: 'SGEMM_DEFAULT_UNROLL_N'\r\n  undeclared (first use in this function)\r\n\r\n       printf(\"SGEMM_UNROLL_N=%d\\n\", SGEMM_DEFAULT_UNROLL_N);\r\n                                     ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  /tmp/openblas/getarch_2nd.c:14:35: error: 'DGEMM_DEFAULT_UNROLL_M'\r\n  undeclared (first use in this function)\r\n\r\n       printf(\"DGEMM_UNROLL_M=%d\\n\", DGEMM_DEFAULT_UNROLL_M);\r\n                                     ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  /tmp/openblas/getarch_2nd.c:15:35: error: 'DGEMM_DEFAULT_UNROLL_N'\r\n  undeclared (first use in this function)\r\n\r\n       printf(\"DGEMM_UNROLL_N=%d\\n\", DGEMM_DEFAULT_UNROLL_N);\r\n                                     ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  /tmp/openblas/getarch_2nd.c:19:35: error: 'CGEMM_DEFAULT_UNROLL_M'\r\n  undeclared (first use in this function)\r\n\r\n       printf(\"CGEMM_UNROLL_M=%d\\n\", CGEMM_DEFAULT_UNROLL_M);\r\n                                     ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  /tmp/openblas/getarch_2nd.c:20:35: error: 'CGEMM_DEFAULT_UNROLL_N'\r\n  undeclared (first use in this function)\r\n\r\n       printf(\"CGEMM_UNROLL_N=%d\\n\", CGEMM_DEFAULT_UNROLL_N);\r\n                                     ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  /tmp/openblas/getarch_2nd.c:21:35: error: 'ZGEMM_DEFAULT_UNROLL_M'\r\n  undeclared (first use in this function)\r\n\r\n       printf(\"ZGEMM_UNROLL_M=%d\\n\", ZGEMM_DEFAULT_UNROLL_M);\r\n                                     ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  /tmp/openblas/getarch_2nd.c:22:35: error: 'ZGEMM_DEFAULT_UNROLL_N'\r\n  undeclared (first use in this function)\r\n\r\n       printf(\"ZGEMM_UNROLL_N=%d\\n\", ZGEMM_DEFAULT_UNROLL_N);\r\n                                     ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  make[1]: *** [CMakeFiles/cmTC_10582.dir/build.make:66:\r\n  CMakeFiles/cmTC_10582.dir/getarch_2nd.c.o] Error 1\r\n\r\n  make[1]: Leaving directory\r\n  '/tmp/openblas/build/getarch2_build/CMakeFiles/CMakeTmp'\r\n\r\n  make: *** [Makefile:126: cmTC_10582/fast] Error 2\r\n\r\nCall Stack (most recent call first):\r\n  cmake/system.cmake:122 (include)\r\n  CMakeLists.txt:44 (include)\r\n```\r\n\r\nIs there an easy fix for this problem? Should I switch to using `make`-based installations? Is it possible to stay with `cmake` at all?"},"comment":{"url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/comments/437127594","html_url":"https://github.com/xianyi/OpenBLAS/issues/1861#issuecomment-437127594","issue_url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1861","id":437127594,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzEyNzU5NA==","user":{"login":"brada4","id":16061801,"node_id":"MDQ6VXNlcjE2MDYxODAx","avatar_url":"https://avatars3.githubusercontent.com/u/16061801?v=4","gravatar_id":"","url":"https://api.github.com/users/brada4","html_url":"https://github.com/brada4","followers_url":"https://api.github.com/users/brada4/followers","following_url":"https://api.github.com/users/brada4/following{/other_user}","gists_url":"https://api.github.com/users/brada4/gists{/gist_id}","starred_url":"https://api.github.com/users/brada4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brada4/subscriptions","organizations_url":"https://api.github.com/users/brada4/orgs","repos_url":"https://api.github.com/users/brada4/repos","events_url":"https://api.github.com/users/brada4/events{/privacy}","received_events_url":"https://api.github.com/users/brada4/received_events","type":"User","site_admin":false},"created_at":"2018-11-08T19:34:34Z","updated_at":"2018-11-08T19:34:34Z","author_association":"CONTRIBUTOR","body":"@aytekinar by chance do you know how to launch arm32/arm64 alpine on ubuntu14 provided by travis CI ? "}}
{"actor":{"display_login":"brada4"}}