Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImfDwaCompressorSimd.h:404:34: error: 'vld1q_f32_x2' was not declared in this scope #1362

Closed
dlemstra opened this issue Mar 17, 2023 · 4 comments

Comments

@dlemstra
Copy link
Contributor

dlemstra commented Mar 17, 2023

When building this library with aarch64-linux-gnu-gcc 7.5.0 I am getting the following build error:

In file included from /openexr/src/lib/OpenEXR/ImfDwaCompressor.cpp:102:0:
/openexr/src/lib/OpenEXR/ImfDwaCompressorSimd.h: In function 'void Imf_3_2::{anonymous}::convertFloatToHalf64_neon(short unsigned int*, float*)':
/openexr/src/lib/OpenEXR/ImfDwaCompressorSimd.h:404:34: error: 'vld1q_f32_x2' was not declared in this scope
         float32x4x2_t vec_fp32 = vld1q_f32_x2 (src + i);
                                  ^~~~~~~~~~~~
/openexr/src/lib/OpenEXR/ImfDwaCompressorSimd.h:404:34: note: suggested alternative: 'vld1q_f32'
         float32x4x2_t vec_fp32 = vld1q_f32_x2 (src + i);
                                  ^~~~~~~~~~~~
                                  vld1q_f32
make[2]: *** [src/lib/OpenEXR/CMakeFiles/OpenEXR.dir/ImfDwaCompressor.cpp.o] Error 1
src/lib/OpenEXR/CMakeFiles/OpenEXR.dir/build.make:425: recipe for target 'src/lib/OpenEXR/CMakeFiles/OpenEXR.dir/ImfDwaCompressor.cpp.o' failed
make[1]: *** [src/lib/OpenEXR/CMakeFiles/OpenEXR.dir/all] Error 2
CMakeFiles/Makefile2:1509: recipe for target 'src/lib/OpenEXR/CMakeFiles/OpenEXR.dir/all' failed

This issue can be reproduced with the following Dockerfile:

FROM ubuntu:18.04

RUN apt-get update -y && \
    apt-get install -y autoconf clang-format git python3-pip \
      binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

RUN pip3 install --upgrade pip && \
    pip3 install cmake==3.24.1.1

ENV CC=aarch64-linux-gnu-gcc
ENV CXX=aarch64-linux-gnu-g++

RUN git clone https://github.com/AcademySoftwareFoundation/openexr.git && \
    cd openexr && \
    cmake -DBUILD_SHARED_LIBS=off . && \
    make

I am not sure how you want to fix this issue but using the method from the PR pytorch/pytorch#44198 resolves the issue. It might also be a good idea to add an arm64 build to the ci_workflow.yaml file?

@cary-ilm
Copy link
Member

This is similar to #1358, sounds like it calls for a similar solution.

@dlemstra
Copy link
Contributor Author

Sorry for not checking the pull requests. It looks like that PR will solve this issue.

@dlemstra
Copy link
Contributor Author

dlemstra commented Apr 8, 2023

That PR did not fix the build. With the Dockerfile from this issue I can still reproduce the build failure.

@dlemstra
Copy link
Contributor Author

dlemstra commented Apr 8, 2023

Turns out I need to specify that I was cross compiling with the following cmake option: `-DCMAKE_TOOLCHAIN_FILE=file" where file has the following:

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_CROSSCOMPILING TRUE)

@dlemstra dlemstra closed this as completed Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants