Closed thekingisback-code closed 4 years ago
It says make: find: Command not found
, so you may need to install find
in your system. Or add it to the Dockerfile.
It also says invalid origin for memory
. Have a look at this issue, which probably fixes that.
Also, make sure you follow the "Compiling" instructions in the documentation. That means: make docker
and make libopencm3
before make
. If you still get errors, report them back here. :blush:
Hey there @Peque, I apologize but I'm new at this and its kind of hard debugging when I'm not really sure what I'm doing (and trust me, I'm googling everything I do).
It says make: find: Command not found, so you may need to install find in your system. Or add it to the Dockerfile.
Find is already installed, I don't really know how to check for the version, but when I type find --version
it returns
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]
and while it doesn't output the version (wrong syntax I believe) which kind of means it's correctly installed.
Then I check where it is with which find
and it outputs '/usr/bin/find'
With echo $PATH
I verify the directory is inside.
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/opt/X11/bin
I tried adding it to the Dockerfile just like find \
(in the appropriate line, of course) and after running make docker
this was the output
Complete!
Last metadata expiration check: 0:02:41 ago on Sun Sep 15 19:25:19 2019.
Package curl-7.65.3-3.fc30.x86_64 is already installed.
No match for argument: find
Error: Unable to find a match: find
The command '/bin/sh -c dnf update -y && dnf install -y arm-none-eabi-gcc arm-none-eabi-newlib curl git make openocd python wget which find && dnf clean all' returned a non-zero code: 1
make: *** [docker] Error 1
Still, I proceeded to compile libopencm3 using make lipopencm3
and mid-compilation it outputted Makefile:66: Your toolchain doesn't support -mcpu=cortex-m7. Please use gcc-arm-embedded 4.8 2014q3 or newer. Skipping this sub-library.
which I suspected was because it was using the standard gcc on my system, which is 4.2.1. I added an Alias in the Dockerfile as follows RUN alias gcc='g++-9'
which seemed logic at the moment, but it did not fix the problem.
Now I'm truly lost.
It also says invalid origin for memory. Have a look at this issue, which probably fixes that.
I modified `src/stm32f103x8.ld` as the issue suggested and while it improved, now it outputs
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: main.elf section `.text' will not fit in region `rom'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: region `rom' overflowed by 5280 bytes
collect2: error: ld returned 1 exit status
make: *** [opencm3/libopencm3.rules.mk:204: main.elf] Error 1
make: *** [src/main.elf] Error 2
which to be honest, it could be carrying the errors from not completely compiling libopencm3, but I don't truly know. Should I upload the files or something in specific?
Once again, I truly appreciate you taking the time to answer back.
Does make docker
output any errors? That is the first command that should succeed. I mean, once the image is correctly generated, everything else should work just fine.
Make sure to git checkout -- Dockerfile
first, just to make sure you have a clean Dockerfile before starting. In fact, discard any changes you have locally to see if we can make at least the image generation work. :blush:
Docker doesn't output any errors whatsoever.
sudo docker build -t bulebule .
Password:
Sending build context to Docker daemon 20.17MB
Step 1/6 : FROM fedora:30
---> e9ed59d2baf7
Step 2/6 : ENV LANG C.UTF-8
---> Using cache
---> c5fac37231e5
Step 3/6 : RUN dnf update -y && dnf install -y arm-none-eabi-gcc arm-none-eabi-newlib curl git make openocd python wget which && dnf clean all
---> Using cache
---> 7d562e0ad410
Step 4/6 : RUN alias python='python3'
---> Using cache
---> ec5ee188740c
Step 5/6 : VOLUME /bulebule
---> Using cache
---> 6f7250d9319e
Step 6/6 : WORKDIR /bulebule
---> Using cache
---> 20a47562eac9
Successfully built 20a47562eac9
Successfully tagged bulebule:latest
That's without running git checkout -- Dockerfile
So as far as I know, the image generation works @Peque
Let us concentrate on the make libopencm3
error then. Until that is fixed you should not try to compile the project.
Please, do execute git checkout -- Dockerfile
to regenerate the clean/unmodified image from the Dockerfile included in Bulebule's repository.
Can you share the full output of the make libopencm3
command once you regenerate the (clean/unmodified) image? Share it through Gist, please.
Heres the complete session of my terminal, @Peque .
https://gist.github.com/thekingisback-code/fcce31e9c81b97d7f57998b1e1ec2b22
Ok, it does not look too bad! ^^
I do not understand why you get that error when compiling for the F7 family (I do not, and theoretically, using the Docker image, we should be compiling libopencm3
with the same toolchain). :confused:
Anyway the F7 family is not required to build the project so:
make
docker --version
Ok, it does not look too bad! ^^
There's hope! lol
Anyway, here's the new output, @Peque (Should I keep on tagging you?, btw) https://gist.github.com/thekingisback-code/f56e97c9d96af12dd3e9771b85c37e23
Okay, I do not know much about Docker, but I find it weird that you get different outputs than me. I, for instance, can compile for the F7 family and I do not get the "find: Command not found" error... :confused:
You now need to apply the fix in https://github.com/Bulebots/bulebule/issues/416. That is for sure.
Try replacing the arm-none-eabi-gcc
with arm-none-eabi-gcc-cs-7.4.0
in the Dockerfile and see if that helps (share the new output).
You can also try adding findutils
to the list of packages installed in Dockerfile and try again? (share the output again).
No need to tag me now. Once I start posting in an issue, I get automatically subscribed. :wink:
In lines 875-876
it now outputs the error after applying the fix in #416 and in line 869
a new error is introduced, which to be honest looks promising, sounds easier to fix.
But who am I to say, at this point, I don't really understand that much.
My full terminal session is here and the new Dockerfile is here
Yeah, that line looks like maybe you need to clean the (pre)compiled libopencm3 files. Maybe you should try to reset the project (i.e.: create the directory, clone, make libopencm3 and make again). Not very efficient, but maybe the safest way to ensure we are on the right track. :joy:
Somehow I closed it (whatever it means), but... nope.
I can now reproduce the error, which is good news! :blush:
I think I was using my (old) cached Docker image, which probably had different packages installed.
This means we may be able to fix this by setting the version of other package(s) in the Dockerfile. I would say the package we need to set to an older version is probably arm-none-eabi-newlib
. But not sure which version it should be. :sweat_smile:
Anything I can do to help on my end? Seriously dude, I owe you a coffee/beer.
Yeah, mostly because I am about to disconnect, and I do not think I will be able to spend much time with this until, probably, next Sunday. :innocent:
Have a look at the newlib Koji packages. Look for the .fc30
packages (Fedora 30).
I would first try with the 3.0.0 version. Install it with:
dnf install arm-none-eabi-newlib-3.0.0-5.fc30.noarch.rpm
You will need to edit the Dockerfile again to include this package installation in your image. I would add a new RUN
line before the RUN alias
, so you do not need to regenerate the image from zero.
Worry not, I'll try to do it all by myself and I'll update the issue as necessary mid-week.
You will need to edit the Dockerfile again to include this package installation in your image. I would add a new RUN line before the RUN alias, so you do not need to regenerate the image from zero.
This doesn't sound that hard, so I'll try!
Thanks!
Actually, it seems that may not be necessary. Simply replace arm-none-eabi-newlib
with arm-none-eabi-newlib-3.1.0-2
in the Dockerfile and try. :blush:
I meant arm-none-eabi-newlib-3.1.0-2.fc30
. Otherwise dnf
will not find the package.
@thekingisback-code Please, try these changes and tell me if that works fine: https://github.com/Bulebots/bulebule/pull/420
When compiling the code (make) the following error is generated
but make is correctly set up. More info
Tested on MacOS 10.15 Beta (19A566d)