RREE / build-avr-ada-toolchain

Scripts for Building the AVR-Ada Toolchain
MIT License
7 stars 6 forks source link

Script update for Ubuntu 19.04 #1

Open ggmero67 opened 5 years ago

ggmero67 commented 5 years ago

Hello, Thank for your great work! I tried for some times now to make avr-ada work on Ubuntu 19.04 and I get some "technical" issues that I managed to resolve step by step:

I believe some update in the build script and/or the readme could help others... Is the project still open to modifications?

Knaldgas commented 5 years ago

Hi ggmero67

I'm trying to compile one myself, and has got part way. Hopefully you can help me complete this task!? The script bumps out compiling GCC/GNAT with:

checking for suffix of object files... configure: error: in `.../build/gcc-obj/avr/avrtiny/libgcc':
configure: error: cannot compute suffix of object files: cannot compile

build/gcc-obj/avr/avrtiny/libgcc/config.log:

Fatal error: unknown MCU: avrtiny
...
configure:3701: error: in `/home/pdj/Projects/build-avr-ada-toolchain/build/gcc-obj/avr/avrtiny/libgcc':
configure:3704: error: cannot compute suffix of object files: cannot compile

I hope you can help me I can make a fork and pull-request for this project, so others can benefit from it.

I've replaced the path:

-AVRADA_PATCHES=/home/re/Devel/AVR-Ada.git/avr-ada/patches
+AVRADA_PATCHES=$BASE_DIR/patches

I also added: ./bootstrap just before configure AVR-LIBC

Using Debian testing/Bullseye

gnat 8.3.0
gcc (Debian 8.3.0-6) 8.3.0
libmpfr-dev 4.0.2-1
libmpc-dev 1.1.0-1
libgmp-dev 2:6.1.2+dfsg-4

~Per

Knaldgas commented 5 years ago

@ggmero67, I've forked the project at https://github.com/Knaldgas/build-avr-ada-toolchain and invited you as collaborator (so you can push updates yourself). I've created a branch for the work "Fix-build-script-for-gcc/gnat-8.3-on-Debian-testing/bullseye" - Please use that if you are pushing changes :-) When it works I will create a pull-request for Rolf.

Knaldgas commented 5 years ago

Found that calling the make installs will work if prepended with sudo --preserve-env=PATH

arcadien commented 4 years ago

Hi there, i'm also trying to build the compiler on Mint 19.3 (based on Ubuntu 18.04) and have the same problems. @Knaldgas I can't see you dev branch. Is there some update about this bug?

Knaldgas commented 4 years ago

On 17-02-2020 10:39, Aurélien Labrosse wrote:

Hi there, i'm also trying to build the compiler on Mint 19.3 (based on Ubuntu 18.04) and have the same problems. @Knaldgas https://github.com/Knaldgas I can't see you dev branch. Is there some update about this bug?

I think you should fetch from https://github.com/RREE/build-avr-ada-toolchain

It's some time ago since I last compiled, but I am going to resume work on AVR's within the next few weeks, so I'm going to retry the script soon. Which problem do you have?

~Per

arcadien commented 4 years ago

Here are my steps:

Build fails when building GNAT:

fmap.adb:304:18: "Null_FD" is undefined
gnatmake: "/home/aurelien/avr_ada/build-avr-ada-toolchain/build/gcc-9.2.0/gcc/ada/fmap.adb" compilation error
 ../gcc-interface/Makefile:468: recipe for target 'gnatmake-re' failed

Could it be a consequence of too old host gcc (7.4) ?

arcadien commented 4 years ago

If i downgrade target GCC from 9.2 to 7.4 to cope with my host version, it builds. The compilation fails on AVR-Ada RTS, but no support is provided for GCC 7.4 so that sounds normal.

arcadien commented 4 years ago

btw *.ads files from GCC are not copied in /opt, hence avr-gnatmake cannot produce executables

arcadien commented 4 years ago

Finally,I installed gcc-8, exported it as default compiler using export CC: everything went fine

Knaldgas commented 4 years ago

On 2/17/20 1:25 PM, Aurélien Labrosse wrote:

Finally,I installed gcc-8, exported it as default compiler using |export CC|: everything went fine

gcc-9 did not work?

arcadien commented 4 years ago

It was not clear for me that host compiler must match the one builded by the script. Anyway, it is out of the scope of this issue. I will post in a new one of needed. Thanks for your support