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

Buildsys: python issue with unit tests build #77

Closed
RomainNaour opened this issue Dec 4, 2016 · 8 comments
Closed

Buildsys: python issue with unit tests build #77

RomainNaour opened this issue Dec 4, 2016 · 8 comments

Comments

@RomainNaour
Copy link

Hi,

I added Aubio to Buildroot but I had to remove the unit tests due to a python issue, see [1]
Usually we don't want to build the unit tests when compiling for a target device, what do you think about an --enable/disable-unit-test option as suggested [2].

Best regards,
Romain

[1] https://git.buildroot.net/buildroot/commit/?id=280bb6807619e2e858836435f44aad0cccd27a40
[2] http://lists.busybox.net/pipermail/buildroot/2016-December/178961.html

@piem
Copy link
Member

piem commented Dec 4, 2016

Hi @RomainNaour

Great to see aubio in buildroot. Did you try the --notests option? Also, can you reproduce the error when using ./waf -j1?

Looking at this patch, you could do something similar for all external libraries. All of them are useful, but none are strictly required to build and run aubio. And you don't really need libsndfile/libsamplerate when using libav.

Looking at the current Config.in, pthread is required in aubio when using libfftw3 for now. Making fftw3 optional, you should be able to build aubio on a toolchain that does not have threads or dynamic libraries.

Otherwise, I just added the sha256 hash for 0.4.3, which it should match the one you have in aubio.hash. There is also a GPG signature for it.

Let me know how it goes!

cheers, piem

@RomainNaour
Copy link
Author

Hi @piem

Thanks for your feedback.

Ok, I see the problem.
Buildroot call waf 3 times, one for building, one for installing to staging directory and another one for installing to the target directory. For each call I need to add --notests to avoid runing unit tests on the build machine. With that the build time is a bit longer since unit tests programs are build but I can remove my patch.

Thanks for the --notests suggestion 👍

Regarding the external libraries dependencies, each of them are optional.
It's up to the user to select each external libraries one by one. So for example, if the user has selected the libsndfile package, aubio support will be enabled otherwise it will be disabled.

I will look at the pthread dependency latter, I added it when I saw pthread.h in src/spectral/fft.c.

For the static only build, the src/wscript_build bundled with 0.4.3 release doesn't handle the --static option in LDFLAGS (missing patch "src/wscript_build: honor --includedir").

Thanks for adding a secure hash and GPG signature !
I'll add the link to the hash in aubio.hash.

Best regards,
Romain

buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Dec 4, 2016
Paul Brossier, the aubio maintainer, added a sha256 hash for the
Buildroot package. Thanks !

aubio/aubio#77

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
@RomainNaour
Copy link
Author

Hi,

It seems waf doesn't store the --notests option at configuration time, that's why I have to pass it to each build step. See [1]
I can work around this issue but it would be great if waf can store this option in cache.

Thanks!
Romain

[1] http://lists.busybox.net/pipermail/buildroot/2016-December/179015.html

@piem
Copy link
Member

piem commented Dec 4, 2016

Oh, I see what you mean: waf forgets the option --notests, and unlike other options, you also need to pass --notests in the build and install steps.

In practice, you can simply pass the same string of options to each waf step:

WAFOPTS="--destdir=/tmp/destdir --notests --disable-docs"
./waf distclean $WAFOPTS
./waf configure $WAFOPTS
./waf build $WAFOPTS
./waf install $WAFOPTS

@RomainNaour
Copy link
Author

@RomainNaour
Copy link
Author

Hi @piem

I'm closing the issue since the 3 previous patches has been merged in Buildroot.
Thanks for the help!

Best regards,
Romain

@piem
Copy link
Member

piem commented Dec 16, 2016

Hi @RomainNaour,

great, thank you! I added a note in the documentation, just in case.

cheers, piem

@RomainNaour
Copy link
Author

Hi @piem,

You're welcome, thanks for aubio in a first place :)

Best regards,
Romain

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