Closed robot-ranger closed 1 year ago
I resolved this and succesfully built by adding automake
to the apt-get install build-essential...rake
line. I dont know enough about build tools to fully understand why that solves it, so please enlighten me if you can.
was:
RUN apt-get clean \ && apt-get update \ && apt-get install -y \ build-essential python3.9 python3-pip git cmake make ruby rake \ && pip install conan -v "conan==1.59.0"
now:
RUN apt-get clean \ && apt-get update \ && apt-get install -y \ build-essential python3.9 python3-pip git cmake make ruby rake automake \ && pip install conan -v "conan==1.59.0"
Thought build-essential had automake. Can you careate a PR for this issue?
Thanks - W
my fork is modified ; do you want me to make a branch here?
Please create a branch and pull request.
On Mar 12, 2023, at 17:52, robot-ranger @.***> wrote:
my fork is modified ; do you want me to make a branch here?
— Reply to this email directly, view it on GitHub https://github.com/mtconnect/cppagent/issues/283#issuecomment-1465353176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6BCKZ4FCV77QJCC65O2LW3Z4UBANCNFSM6AAAAAAVYLMJHU. You are receiving this because you commented.
oh, wow. cool. I didnt realize i could fork a branch from mtconnect/cppagent:main back into my fork!
just submitted a PR. Ill let yall close this once you have had a chance to review the PR.
I added the proposed fix by @robot-ranger (following his pull request). However it did not solve the error. Docker build still fails.
#0 57.19 /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build/host/mrbgems/mruby-onig-regexp/onigmo-6.2.0/missing: line 81: aclocal-1.15: command not found
#0 57.19 WARNING: 'aclocal-1.15' is missing on your system.
#0 57.19 You should only need it if you modified 'acinclude.m4' or
#0 57.19 'configure.ac' or m4 files included by 'configure.ac'.
#0 57.19 The 'aclocal' program is part of the GNU Automake package:
#0 57.19 <http://www.gnu.org/software/automake>
#0 57.19 It also requires GNU Autoconf, GNU m4 and Perl in order to run:
#0 57.19 <http://www.gnu.org/software/autoconf>
#0 57.19 <http://www.gnu.org/software/m4/>
#0 57.19 <http://www.perl.org/>
#0 57.19 make: *** [Makefile:714: aclocal.m4] Error 127
#0 57.19 rake aborted!
#0 57.19 make -j1 failed
#0 57.19 /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build/repos/host/mruby-onig-regexp/mrbgem.rake:45:in `run_command'
#0 57.19 /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build/repos/host/mruby-onig-regexp/mrbgem.rake:68:in `block (2 levels) in bundle_onigmo'
#0 57.19 /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build/repos/host/mruby-onig-regexp/mrbgem.rake:54:in `chdir'
#0 57.19 /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build/repos/host/mruby-onig-regexp/mrbgem.rake:54:in `block in bundle_onigmo'
#0 57.19 /usr/share/rubygems-integration/all/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
#0 57.19 Tasks: TOP => default => all => gensym => /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build/host/presym => /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build/host/mrbgems/mruby-onig-regexp/src/mruby_onig_regexp.pi => /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build/repos/host/mruby-onig-regexp/src/mruby_onig_regexp.c => /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build/host/mrbgems/mruby-onig-regexp/onigmo-6.2.0/.libs/libonigmo.a
#0 57.19 (See full trace by running task with --trace)
#0 57.19 mruby/3.1.0:
#0 57.19 mruby/3.1.0: ERROR: Package '062863c92a5a0a247840166e9f84ebe8d10786b9' build failed
#0 57.19 mruby/3.1.0: WARN: Build folder /root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9
#0 57.19 ERROR: mruby/3.1.0: Error in build() method, line 128
#0 57.19 self.run("rake MRUBY_CONFIG=%s" % self.build_config,
#0 57.19 ConanException: Error 1 while executing rake MRUBY_CONFIG=/root/.conan/data/mruby/3.1.0/_/_/build/062863c92a5a0a247840166e9f84ebe8d10786b9/mruby_source/build_config/mtconnect.rb
------
Dockerfile:64
--------------------
63 | # make installer
64 | >>> RUN conan export conan/mqtt_cpp \
65 | >>> && conan export conan/mruby \
66 | >>> && conan install . -if build --build=missing \
67 | >>> -pr $CONAN_PROFILE \
68 | >>> -o build_tests=$WITH_TESTS \
69 | >>> -o run_tests=$WITH_TESTS \
70 | >>> -o with_ruby=$WITH_RUBY
71 |
--------------------
ERROR: failed to solve: process "/bin/sh -c conan export conan/mqtt_cpp && conan export conan/mruby && conan install . -if build --build=missing -pr $CONAN_PROFILE -o build_tests=$WITH_TESTS -o run_tests=$WITH_TESTS -o with_ruby=$WITH_RUBY" did not complete successfully: exit code: 1
hmmm... i THOUGHT that was the only change I made for this release, but I have a few other changes from previous releases.
notably, I have WITH_RUBY=False
im tempted to remove ruby from that dockerfile RUN, too, but I dont know enough about its use case for cppagent, so i left it there.
i think you can view my fork and see what else i changed, mostly just install locations and specifics about where we put agent.cfg, devices.xml, etc: https://github.com/mtconnect/cppagent/compare/master...robot-ranger:cppagent:master
I tried again.
Strangely, after a second docker build (without changing anything) it now worked (it isn't a problem of memory in my opinion. During the build I monitored memory and it never exceeded 6G usage where the machine to build the docker image has 32G).
Does not look right to me that one has to run several build attempts before it succeeds.
yes, it is very bittersweet when a failed build automagically works on the second try. that makes me question if my "fix" really fixed anything, or my build just succeeded on subsequent attempts like you. it definitely complains that aclocal is missing, and tells us that it is included in automake.
Issues that just resolve themselves after doing nothing are the worst, but im glad it built for you.
Ill be honest - i dont have deep knowledge of these build tools so im not equipped to dig in further
I confirmed that two builds attempts are needed like this:
1) build using the `--no-cache=true` option to force a rebuild: build fails
2) rebuild with same command, but without the `--no-cache=true` option: build succeeds
I’ll test this when I get done with my 2.2 tasks.
This issue is now fixed in development. I'll cherry-pick the change soon and merge to public.
Needed the following:
RUN apt-get clean \
&& apt-get update \
&& apt-get install -y \
build-essential python3.9 python3-pip git cmake make ruby rake autoconf automake \
&& pip install conan -v "conan==1.59.0"
And changed mruby oniguruma to first run aclocal and automake in the mrbgem.rake file to make sure configuration is up to date.
I believe this is resolved. I will close it if nobody objects.
May I know which version will be the first to include the fix? :pray:
I’ll check it out. I’m in the middle of fixing the build system for GitHub actions and I’m having a few issues with the GitHub instance. I’ll get to it soon. This was fixed in the cppagent_dev repo now archived and then replicated to the public repo. Both are public now. BestW(Sent from mobile)On Jul 21, 2023, at 04:22, Tukusej’s Sirs @.***> wrote: May I know which version will be the first to include the fix? 🙏
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
unfortunately, this error has re-occured for me with the new 2.2 release. Im trying to run it with a github action workflow, same error
I’ll take a look and see what’s going wrong(Sent from mobile)On Jul 26, 2023, at 13:33, robot-ranger @.***> wrote: unfortunately, this error has re-occured for me with the new 2.2 release. Im trying to run it with a github action workflow, same error
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
The fix is included in v2.2.0.3
, therefore IMHO this issue should be closed.
Docker issues have been addressed in version 2.2.0.5.
Docker build fails.