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

Dockcross for armv6 slow #1914

Closed
Katawann opened this issue Oct 11, 2022 · 6 comments
Closed

Dockcross for armv6 slow #1914

Katawann opened this issue Oct 11, 2022 · 6 comments

Comments

@Katawann
Copy link
Contributor

Hello,

I would like to build a debian package for Raspberry Pi (armv6). It works fine with v1.4.3 but in main it takes ages to install OpenSSL after downloading it:

[ 62%] Performing configure step for 'openssl'
Configuring OpenSSL version 1.1.1o (0x101010ffL) for linux-armv4
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
[ 75%] Performing build step for 'openssl'
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
/usr/xcc/armv6-unknown-linux-gnueabihf/bin/armv6-unknown-linux-gnueabihf-ar: creating apps/libapps.a
/usr/xcc/armv6-unknown-linux-gnueabihf/bin/armv6-unknown-linux-gnueabihf-ar: creating libcrypto.a
/usr/xcc/armv6-unknown-linux-gnueabihf/bin/armv6-unknown-linux-gnueabihf-ar: creating libssl.a
/usr/xcc/armv6-unknown-linux-gnueabihf/bin/armv6-unknown-linux-gnueabihf-ar: creating test/libtestutil.a

And then it takes also a lot of time to do all the install part. Found that it starts from the merge #1784. Not sure if it is relevant to highlight this point but as I was testing this part...

The script I use to test it taken from the CI:

git submodule update --init --recursive
sudo apt-get update && sudo apt-get install -y python3 python3-future
tools/generate_mavlink_headers.sh
docker run --rm mavsdk/mavsdk-dockcross-linux-armv6-custom > ./dockcross-linux-armv6-custom
chmod +x ./dockcross-linux-armv6-custom
./dockcross-linux-armv6-custom /bin/bash -c "cmake $superbuild $cmake_prefix_path -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/linux-armv6/install -DBUILD_MAVSDK_SERVER=OFF -DBUILD_SHARED_LIBS=ON -DWERROR=OFF -DMAVLINK_HEADERS=mavlink-headers/include -Bbuild/linux-armv6 -H."
./dockcross-linux-armv6-custom cmake --build build/linux-armv6 -j8 --target install
./dockcross-linux-armv6-custom tools/create_packages.sh ./build/linux-armv6/install . armv6 libmavsdk-dev
@JonasVautherin
Copy link
Collaborator

How long does that mean? We do that in the CI from time to time, I would not expect the whole build to take more than an hour. Also in the CI we cache the dependencies. You could do that: build them only once with dockcross, and then point to them. If you always rebuild everything that's not very practical 😇.

@Katawann
Copy link
Contributor Author

Katawann commented Oct 11, 2022

Before it was done in 5 minutes and now it takes 15 minutes to complete. I can live with that but I was just surprised it was taking so much more by adding a new library. Of course at the end of the day I will not rebuild from zero (or just use the one build for releases)

@JonasVautherin
Copy link
Collaborator

Yes, it's just that before that we were not building OpenSSL out of the mavsdk_server build. I thought we needed it for curl, but maybe we don't anymore, and we could move it back. Something to check.

@Katawann
Copy link
Contributor Author

Ok got it. Does it make sense to propose a modification for that to see if it pass all the CI tests ?

@JonasVautherin
Copy link
Collaborator

Yes, I'd say just move OpenSSL back to the MAVSDK_SERVER section in the third_party/CMakeLists.txt file 👍

@Katawann
Copy link
Contributor Author

Fixed in #1926

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