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

make: Use unique module name for cpu_common periph #4797

Merged

Conversation

jnohlgard
Copy link
Member

Hopefully fixes the random Travis failures we have seen since #4762 was merged.

For the nrf51, there are files in both nrf5x_common/periph and nrf51/periph which are both built and put in periph.a before linking. My theory is that the random Travis failures we have been experiencing have been caused by a race between builds of these two directories, possibly overwriting each others' output file (static library).

@jnohlgard jnohlgard added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 11, 2016
@jnohlgard jnohlgard force-pushed the pr/nrf51-fix-random-travis-failures branch from ea16f9b to 7783414 Compare February 12, 2016 06:26
@jnohlgard
Copy link
Member Author

whoops, I was a bit too tired, amended to fix new Travis failures.

@jnohlgard jnohlgard force-pushed the pr/nrf51-fix-random-travis-failures branch from 7783414 to 95ef11b Compare February 12, 2016 07:46
@basilfx
Copy link
Member

basilfx commented Feb 12, 2016

Out of curiosity, are the Travis errors 'malformed archive' errors in/after the linking step? If so, I experience similar errors when using make -j8 on my local machine (quad core with SSD), even before #4762. Cleaning and rebuilding using make -jN fixes it for N = 1, and lowers the probability on error for N << 8.

@jnohlgard
Copy link
Member Author

The Travis errors are missing symbols. The Makefile dependency graph should ensure that the archives have finished generating before starting the linking recipe.. I think your errors are unrelated to this, unless there are more cases of the same module name in multiple directories. Is it the same archive(s) every time or is it completely random which one fails? I usually use make -j4 on my machine (quad core) and I have never seen the "malformed archive" error when building RIOT (so far).

Could you open a separate issue with your problems and add any relevant information (what system, compiler versions, etc)?

https://travis-ci.org/RIOT-OS/RIOT/jobs/108546524:

sizeof_tcb:nrf6310:
Building application "sizeof_tcb" for "nrf6310" with MCU "nrf51".
/home/travis/build/RIOT-OS/RIOT/tests/sizeof_tcb/bin/nrf6310/uart_stdio.a(uart_stdio.o): In function `uart_stdio_init':
/home/travis/build/RIOT-OS/RIOT/sys/uart_stdio/uart_stdio.c:76: undefined reference to `uart_init'
/home/travis/build/RIOT-OS/RIOT/tests/sizeof_tcb/bin/nrf6310/uart_stdio.a(uart_stdio.o): In function `uart_stdio_write':
/home/travis/build/RIOT-OS/RIOT/sys/uart_stdio/uart_stdio.c:94: undefined reference to `uart_write'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1

The failing application is random, but the likelihood of it happening is large enough that it happens to 1 or 2 applications on every Travis build right now.

@haukepetersen
Copy link
Contributor

Nice catch, this would indeed explain why I was not able to re-produce the Travis failures locally (I always build with the -j1 default I guess).

I was hoping to use just the one periph module and fill it from different builds might work, too bad its not.

ACK.

@haukepetersen
Copy link
Contributor

and Travis already likes this -> go

haukepetersen added a commit that referenced this pull request Feb 12, 2016
make: Use unique module name for cpu_common periph
@haukepetersen haukepetersen merged commit 9fcb031 into RIOT-OS:master Feb 12, 2016
@jnohlgard jnohlgard deleted the pr/nrf51-fix-random-travis-failures branch February 12, 2016 13:11
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 CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants