Closed gabiSRC closed 5 years ago
Hi @gabiSRC, what is the machine you are building on? ARM or x86_64?
Hi @cskiraly, I run the docker-compose build command from my Mac which is intel based so I would tell x86_64. My target Agile GW is a raspi 3
ARM build on x86_64 fails when compiling Java. Emulation is still not perfect, unfortunately.
If you build it for your PC, set up the stack to build for x86_64 (AGILE_ARCH=x86_64). If you build for the Pi, build directly on the Pi, either by using agile-dev on it, or by setting up DOCKER_HOST on your PC to point to it, or by using resinOS.
I build it to have something like a pipeline between my dev environnement on my PC and the raspi which is my integration and test plateform for the protocols I implement.
In my .env file, I already have AGILE_HOST=resin.local DOCKER_HOST=tcp://resin.local:2375 AGILE_ARCH=x86_64
When I try with armv71, I get another error but with agile-devicefactory
ERROR: Service 'agile-devicefactory' failed to build: The command '/bin/sh -c apt-get update && apt-get install --no-install-recommends -y build-essential git ca-certificates apt software-properties-common unzip cpp binutils maven gettext libc6-dev make cmake cmake-data pkg-config clang gcc-4.9 g++-4.9 qdbus && apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1
Maybe I got something wrong with how things are related which each other, if so, I would really appreciate if you could clear things out for me ;)
The combination you need is AGILE_HOST=resin.local DOCKER_HOST=tcp://resin.local:2375 AGILE_ARCH=armv7l
If this is not working, there is some other build issue to debug. That apt line might have some problems due to some new versions released to the repositories. It is unfortunately a possibility. Can you check more in detail? Thanks
Ok, it fix the original issue but I had to do cp agile-stack/docker-compose.override.yml.buildall agile-stack/docker-compose.override.yml
in order to reset the docker-compose file correctly.
Now the error is with the BLE protocol, see below, but it's OK, I'll comment this on the docker-compose file, I'll let the dummy protocol in place to ensure that when I'll try with my protocol (based on dummy and BLE), it'll work fine
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. ERROR: Service 'agile-ble' failed to build: The command '/bin/sh -c echo "deb http://deb.debian.org/debian unstable main" >>/etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends -y bluez/unstable && apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
Thank you for the help
The original issue was resolved by setting build parameters correctly.
Hello, I am using Agile-Dev and when the docker of the agile-recommender is built I have the following error:
standard_init_linux.go:187: exec user process caused "exec format error"
ERROR: Service 'agile-recommender' failed to build: The command '/bin/sh -c ln -sf /usr/lib/jvm/ezdk*/bin/* /usr/bin/' returned a non-zero code: 1
I do not really know how this happened or how to fix this so could anyone help me on this?Here the full "stack" of the docker build:
Building agile-recommender
Step 1/15 : ARG BASEIMAGE_BUILD=agileiot/raspberry-pi3-zulujdk:8-jdk-maven
--->
Step 2/15 : ARG BASEIMAGE_DEPLOY=agileiot/raspberry-pi3-zulujdk:8-jre
--->
Step 3/15 : FROM $BASEIMAGE_BUILD
---> 12ef4aed7af1
Step 4/15 : COPY RecommenderAndConfigurator /usr/src/app
---> Using cache
---> 9c2b060efc7f
Step 5/15 : WORKDIR /usr/src/app
---> Using cache
---> 0c11f1d4b58e
Step 6/15 : RUN ln -sf /usr/lib/jvm/ezdk*/bin/* /usr/bin/
---> Running in 0d8b96e48c54
standard_init_linux.go:187: exec user process caused "exec format error"
ERROR: Service 'agile-recommender' failed to build: The command '/bin/sh -c ln -sf /usr/lib/jvm/ezdk*/bin/* /usr/bin/' returned a non-zero code: 1
Thank you :)