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: buildtest target always generates some native artifacts #3280

Closed
phiros opened this issue Jun 30, 2015 · 2 comments
Closed

make: buildtest target always generates some native artifacts #3280

phiros opened this issue Jun 30, 2015 · 2 comments
Assignees
Labels
Area: build system Area: Build system Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@phiros
Copy link
Member

phiros commented Jun 30, 2015

When you execute a buildtest for a MCU group which is not qemu-i386 a directory native
gets created in the bin folder with an empty archive file in it. I am not really sure if you can call this a bug but I find it odd (as a user I would call this unexpected behavior).
I only found out about this because the bin/native directory doesn't seem to be created as part of the buildtest for loop. Therefore, #3268 does not get rid of this directory after the buildtest is done.

BTW: I wasn't sure what label to pick. I think it might be useful to create something like an low-priority-issue or even a label called unexpected behavior for such problems.

Example:

/home/.../examples/hello-world$ ls
Makefile  README.md  main.c
/home/.../examples/hello-world$ BUILDTEST_MCU_GROUP=msp430 make buildtest
Building for chronos .. success
Building for msb-430 .. success
Building for msb-430h .. success
Building for telosb .. success
Building for wsn430-v1_3b .. success
Building for wsn430-v1_4 .. success
Building for z1 .. success
/home/.../examples/hello-world$ ls -l bin/
total 32
drwxrwxr-x 12 philipp philipp 4096 Jun 30 20:44 chronos
drwxrwxr-x 11 philipp philipp 4096 Jun 30 20:44 msb-430
drwxrwxr-x 11 philipp philipp 4096 Jun 30 20:44 msb-430h
drwxrwxr-x  2 philipp philipp 4096 Jun 30 20:44 native
drwxrwxr-x 11 philipp philipp 4096 Jun 30 20:44 telosb
drwxrwxr-x 11 philipp philipp 4096 Jun 30 20:44 wsn430-v1_3b
drwxrwxr-x 11 philipp philipp 4096 Jun 30 20:44 wsn430-v1_4
drwxrwxr-x 11 philipp philipp 4096 Jun 30 20:44 z1
/home/.../examples/hello-world$ ls -l bin/native/
total 4
-rw-rw-r-- 1 philipp philipp 8 Jun 30 20:44 empty-archive.a

@phiros phiros added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: build system Area: Build system Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer labels Jun 30, 2015
@jnohlgard
Copy link
Member

It comes from the ar-wrapper test on this line:
https://github.com/RIOT-OS/RIOT/blob/master/Makefile.include#L134

It creates the empty archive in native if that is your default target, if you export BOARD=somethingelse it will be placed there instead.

An rm at the end of the shell command line should be sufficient:

-ifneq (0, $(shell mkdir -p $(BINDIR); $(AR) rc $(BINDIR)empty-archive.a 2> /dev/null; echo $$?))
+ifneq (0, $(shell mkdir -p $(BINDIR); $(AR) rc $(BINDIR)empty-archive.a 2> /dev/null; echo $$?; rm -f $(BINDIR)empty-archive.a))

@phiros
Copy link
Member Author

phiros commented Jul 2, 2015

fixed by #3302

@phiros phiros closed this as completed Jul 2, 2015
@OlegHahm OlegHahm modified the milestone: Release 2015.09 Sep 2, 2015
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 Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

4 participants