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

Different build behavior between murdock and riot/riotbuild:latest image #9645

Closed
6 tasks done
cladmi opened this issue Jul 27, 2018 · 11 comments
Closed
6 tasks done
Assignees
Labels
Area: build system Area: Build system Area: CI Area: Continuous Integration of RIOT components Area: toolchain Area: toolchains; everything related to compilation, libc, linking, … Area: tools Area: Supplementary tools Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: tracking The issue tracks and organizes the sub-tasks of a larger effort

Comments

@cladmi
Copy link
Contributor

cladmi commented Jul 27, 2018

Description

Compilation behavior is different between murdock the docker image with BUILD_IN_DOCKER=1 even with RIOT_CI_BUILD=1.

It makes things hard to debug and understand the root cause of problems.

Like for the following PRs:

#9362 Warnings only on murdock
#9605 Warnings only on murdock with llvm
#9507 Enough memory on murdock but not in the container

Sub pull requests

Steps to reproduce the issue

To take one as an example:

Building tests/pkg_fatfs_vfs for BOARD=wsn430-v1_4 works in murdock as it is not complaining but this does not

make -C tests/pkg_fatfs_vfs/  BOARD=wsn430-v1_4 clean all RIOT_CI_BUILD=1 BUILD_IN_DOCKER=1 DOCKER="sudo docker"

Expected results

It has the same behavior in docker as in murdock, so either both fail or both succeed.

Actual results

Murdock is ok, but in docker it fails with:

/data/riotbuild/riotproject/tests/pkg_fatfs_vfs/bin/wsn430-v1_4/fatfs.a(ff.o):(.debug_loc+0x1656): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'
collect2: ld returned 1 exit status
/data/riotbuild/riotbase/Makefile.include:411: recipe for target '/data/riotbuild/riotproject/tests/pkg_fatfs_vfs/bin/wsn430-v1_4/pkg_fatfs_vfs.elf' failed
make: *** [/data/riotbuild/riotproject/tests/pkg_fatfs_vfs/bin/wsn430-v1_4/pkg_fatfs_vfs.elf] Error 1

Versions

Building with docker in master.

@cladmi cladmi added Area: build system Area: Build system Area: CI Area: Continuous Integration of RIOT components Area: tools Area: Supplementary tools quality defect Area: toolchain Area: toolchains; everything related to compilation, libc, linking, … labels Jul 27, 2018
@cladmi
Copy link
Contributor Author

cladmi commented Jul 27, 2018

@kaspar030 @smlng I think you are the persons who would know the most about it

@cladmi
Copy link
Contributor Author

cladmi commented Jul 27, 2018

First thing I found, is that RIOT_CI_BUILD is not given to docker:

Without docker: -DRIOT_VERSION=\"buildtest\"
With Docker: -DRIOT_VERSION=\"2018.10-devel-104-g8832-9f7d272ad793\"

When building from a worktree, as the .git is not the real directory I even get:

With Docker: -DRIOT_VERSION=\"'UNKNOWN (builddir: /data/riotbuild/riotbase)'\"

So maybe the RIOT_VERSION should be parsed by the main repo and passed to docker.

@cladmi
Copy link
Contributor Author

cladmi commented Jul 27, 2018

Other issue, RIOT_FILE_RELATIVE is not really relative in docker:

-DRIOT_FILE_RELATIVE=\"/data/riotbuild/riotproject/tests/libfixmath_unittests/bin/pkg/stm32f0discovery/libfixmath/libfixmath/fix16_str.c\"

Outside I get:

-DRIOT_FILE_RELATIVE=\"tests/libfixmath_unittests/bin/pkg/stm32f0discovery/libfixmath/libfixmath/fix16_str.c\"

Which can easily explain build size difference when RIOT_FILE_RELATIVE is used.

@cladmi
Copy link
Contributor Author

cladmi commented Aug 1, 2018

Also if it's possible to have an archive of the currently used image. I could diff with my local docker image and try to find the reason.

@miri64
Copy link
Member

miri64 commented Aug 3, 2018

At least for the LLVM thing @kaspar030 found a reason: #9398 (comment)

@ZetaR60
Copy link
Contributor

ZetaR60 commented Sep 2, 2018

Any updates on this? The new Docker image in RIOT-OS/riotdocker#42 is waiting on this to be resolved.

@miri64
Copy link
Member

miri64 commented Sep 3, 2018

It appears ccache was also the reason for the erroneous behavior in #9362. Can't say anything specific about RIOT-OS/riotdocker#42 though.

@cladmi
Copy link
Contributor Author

cladmi commented Sep 3, 2018

@ZetaR60 yes we can remove the blocking dependency.

There I have this PR here that handles some of the case for relative directories but it is also currently breaking working things: #9646 I will try to find time to address them this week.

@cladmi
Copy link
Contributor Author

cladmi commented Sep 6, 2018

RIOT_CI_BUILD was not exported to docker which looks like the real reason for wsn430 not building some examples in docker.

@cladmi cladmi added the Type: tracking The issue tracks and organizes the sub-tasks of a larger effort label Sep 28, 2018
@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) and removed quality defect labels Oct 1, 2018
@cladmi cladmi added this to the Release 2019.04 milestone Feb 28, 2019
@MrKevinWeiss MrKevinWeiss modified the milestone: Release 2019.07 Jul 25, 2019
@miri64
Copy link
Member

miri64 commented Nov 2, 2021

The difference between the riot/riotbuild:latest and murdock worker image is now documented in https://github.com/RIOT-OS/riotdocker/tree/master/murdock-worker. Is this sufficient to close this issue?

@kaspar030
Copy link
Contributor

The board doesn't exist anymore, "RIOT_CI_BUILD was not exported to docker which looks like the real reason for wsn430 not building some examples in docker.", all tasks marked done.

Also, the murdock-worker container was always based on riotdocker. If there are differences how murdock builds wrt a local build, that should be independent of Docker. If Docker builds differently than a local build, that should be independent of Murdock.

So let's close this, feel free to re-open if an issue with Murdock vs. Docker remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: CI Area: Continuous Integration of RIOT components Area: toolchain Area: toolchains; everything related to compilation, libc, linking, … Area: tools Area: Supplementary tools Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: tracking The issue tracks and organizes the sub-tasks of a larger effort
Projects
None yet
Development

No branches or pull requests

7 participants