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

Update Dockerfile base image #695

Merged
merged 7 commits into from
Jan 12, 2024
Merged

Update Dockerfile base image #695

merged 7 commits into from
Jan 12, 2024

Conversation

ekilmer
Copy link
Contributor

@ekilmer ekilmer commented Jan 8, 2024

DO NOT MERGE until cxx-common docker image PR (lifting-bits/cxx-common#1045) is merged.

We now build the docker base image for ARM64.

Supersedes the Dockerfile changes in #692

@yomaytk
Copy link
Contributor

yomaytk commented Jan 9, 2024

@ekilmer
Thank you for this PR!
I tried building a container image on the branch ekilmer/update-docker on the aarch64, and the new deps stage looks good.
However, I couldn't build an image because the test failed.
The error message is as follows (I omitted a large part of it because it is a little long).

0.410 0% tests passed, 3 tests failed out of 3
0.410 
0.410 Total Test time (real) =   0.05 sec
0.410 Errors while running CTest
0.410 
0.410 The following tests FAILED:
0.410 	  1 - small_diff_test (Failed)
0.410 	  2 - thumb-tests (Not Run)
0.410 	  3 - ppc-tests (Not Run)
0.413 gmake: *** [Makefile:74: test] Error 8
0.414 
------
Dockerfile:44
--------------------
  43 |     
  44 | >>> RUN cd remill-build && \
  45 | >>>     cmake --build . --target test_dependencies -- -j $(nproc) && \
  46 | >>>     CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --verbose --target test -- -j $(nproc) && \
  47 | >>>     cmake --build . --target install
  48 |     
--------------------

Does this test pass on your environments? Incidentally, I executed the command following.

docker build . -t remill -f Dockerfile \
--build-arg UBUNTU_VERSION=22.04 \
--build-arg ARCH=aarch64 \
--build-arg LLVM_VERSION=16

@yomaytk
Copy link
Contributor

yomaytk commented Jan 9, 2024

Also in LLVM 17 (with argument --build-arg LLVM_VERSION=17), small_diff_test failed but the failure points are different. Furthermore, thumb-tests and ppc-tests passed.

0.347     Start 1: small_diff_test
1.177 1/3 Test #1: small_diff_test ..................***Failed    0.83 sec
...
1.177 Ran 530 with 530 failing. Success rate of: 0.0
1.177 
1.177     Start 2: thumb-tests
8.056 2/3 Test #2: thumb-tests ......................   Passed    6.88 sec
8.056     Start 3: ppc-tests
17.88 3/3 Test #3: ppc-tests ........................   Passed    9.82 sec
17.88 
17.88 67% tests passed, 1 tests failed out of 3
17.88 
17.88 Total Test time (real) =  17.53 sec
17.88 
17.88 The following tests FAILED:
17.88 Errors while running CTest
17.88 	  1 - small_diff_test (Failed)
17.88 gmake: *** [Makefile:74: test] Error 8
17.88 
------
Dockerfile:44
--------------------
  43 |     
  44 | >>> RUN cd remill-build && \
  45 | >>>     cmake --build . --target test_dependencies -- -j $(nproc) && \
  46 | >>>     CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --verbose --target test -- -j $(nproc) && \
  47 | >>>     cmake --build . --target install
  48 |     
--------------------

* The Docker image name for the builder has changed again for testing
  purposes.

* Ignore test results when building Docker image on non-x86_64
  architectures
@ekilmer
Copy link
Contributor Author

ekilmer commented Jan 9, 2024

Hi @yomaytk, I'm happy you are able to use the new Docker image(s)!

I couldn't build an image because the test failed

I have changed the Docker image to ignore the test results on non-x86_64 architectures. This will allow the image to be built; however this probably isn't the fix you are expecting or want. Unfortunately, I'm unable to help with fixing the tests on aarch64. If you open an issue with more details about the failing tests, someone else should be able to help.

Does this test pass on your environments?

Unfortunately, we only officially support what is tested in CI, which is x86_64 using LLVM 17. LLVM 16 and aarch64 aren't tested in CI, so this combination sometimes fails. If you open a new issue with details about the errors you see, someone else should be able to help.


We generally try to keep documentation updated, but sometimes we forget. We happily review and accept PRs that improve the user experience and workflow. Thank you for your patience and understanding.

@ekilmer ekilmer marked this pull request as ready for review January 12, 2024 14:25
@Ninja3047 Ninja3047 requested review from Ninja3047 and removed request for pgoodman January 12, 2024 14:46
Copy link
Collaborator

@Ninja3047 Ninja3047 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dockerfile changes look fine to me
i believe we still need to update the ci.yml
not sure if we want to only build amd64 or also update it to do a cross platform build

@ekilmer
Copy link
Contributor Author

ekilmer commented Jan 12, 2024

i believe we still need to update the ci.yml
not sure if we want to only build amd64 or also update it to do a cross platform build

Ideally, yes, but I don't think we have the time (to wait for emulation) or resources (to run natively) to support ARM64 builds in CI.

I can update the README to indicate that "ARM64 builds are supported, but they are not tested in CI and could break. If they do, please open an issue, and we will investigate."

We don't publish these images, but:

- Remove architecture indicator
- Remove ARCH build arg
@ekilmer ekilmer merged commit cd7fc68 into master Jan 12, 2024
6 checks passed
@ekilmer ekilmer deleted the ekilmer/update-docker branch January 12, 2024 15:57
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

Successfully merging this pull request may close these issues.

3 participants