Solved Trying to build latest arm-none-eabi-gcc

Trying to build the latest 10.2 version of arm compiler for ARM processors.
I went to the ports under /devel, I then changed the version to 10.2, ran "make makesum"
then started the "make install" (the make install-missing-packages didn't do anything, I assume nothing was missing).

The long process was going on and at the end I got this:
Code:
===>  Installing for arm-none-eabi-gcc-10.2.0_3
===>  Checking if arm-none-eabi-gcc is already installed
===>   Registering installation for arm-none-eabi-gcc-10.2.0_3
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/chkp-builtins.def:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/ipa-chkp.h:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/params-enum.h:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/params-list.h:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/params-options.h:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/params.def:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/params.h:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/params.list:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/rtl-chkp.h:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/10.2.0/plugin/include/tree-chkp.h:No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/arm-none-eabi-gcc

that happened it seems closer to the end of the process, I checked those files they indeed were not in those locations. So, does anyone here tried installing latest arm-none-eabi-?
 
After generating a pkg-plist make sure to delete /you/have/to/check/what/makeplist/gives/you from the first line.

Trying to build the latest 10.2 version of arm compiler for ARM processors.

Latest GCC version is 11.1.0. devel/arm-none-eabi-gcc can build and install that version.

Steps:

- Modify Makefile PORTVERSION= 11.1.0
- download gcc-11.1.0.tar.xz manually from a GCC mirror to /usr/ports/distfiles
- remove (rename) patches in files/ and MASTERDIR devel/aarch64-none-elf-gcc/files/. Inspecting the patches and the files targeted in the extracted GCC source, as far as I can tell, the modifications are implemented in that version.

Code:
# make makesum
# make
# make makeplist > pkg-plist   # remove mentioned first line
# make install
 
Note that there a bunch of other ports depending on this one. So you will need to make sure those can still be built before submitting this as an update. There are a bunch of uboot-* ports that have this as a build dependency. You don't want to break those.
 
download gcc-11.1.0.tar.xz manually from a GCC mirror to /usr/ports/distfiles
make makesum will do that. This will also test the fetch and generate a good distinfo file with a checksum.
 
Note that there a bunch of other ports depending on this one. So you will need to make sure those can still be built before submitting this as an update. There are a bunch of uboot-* ports that have this as a build dependency. You don't want to break those.
I didn't tough submitting an update, tried the latest version on that specific port for testing purposes only.

I might test further to update the port. I see slave port devel/riscv32-unknown-elf-gcc is already updated to 11.1.0. As I can see all of the ports depending to build and run on that port are also found in devel/arm-none-eabi-gcc. It might be uncomplicated to update. Building poudriere test ports should show for sure.

make makesum will do that. This will also test the fetch and generate a good distinfo file with a checksum.
Ah, OK, when I checked, the distfile couldn't be downloaded, maybe I should have waited a little more.
 
alright, so I actually determined that 10.2 is OK for me for now and decided to take the below instructed steps with that version:
# make makesum
# make
# make makeplist > pkg-plist # remove mentioned first line
# make install

also depeted that first line from pkg-plist

but again, after running "make install" I get exactly same error. why?
 
but again, after running "make install" I get exactly same error. why?

I think the original pkg-plist file is responsible. It was most likely untouched when you made the changes to the port (Makefile). When I did the test build I renamed the pkg-plist before. Sorry, I forgot to include that to the instructions.

The Makefile reads that pkg-plist (PLIST= ${.CURDIR}/pkg-plist) and build generates a work/.PLIST.mktmp file. That files is read by the 'install' target to install all the compiled files.

In your case Makefile read the pkg-plist 8.4.0 version and it generated the faulty work/.PLIST.mktmp file. 'makeplist' run after build doesn't touch the .PLIST.mktmp file, so the installation fails.

In my case there was no pkg-plist file to read from and the build had the correct .PLIST.mktmp version generated and I assumed, incorrectly, the 'makeplist' target had generated the correct file version.

You can correct the situation with these two methods:

1 - clean the directory and rebuild with the 10.2.0 version pkg-plist or with no file at all
2 - without building again, copy work/.staged-files to work/.PLIST.mktmp and run install
 
If you generate a new pkg-plist you have to make clean and make the port again from scratch. Or else it's going to keep the "old" pkg-plist info.

What I usually do:
Code:
make # to test the fix, updates, patches, whatever changes
mv pkg-plist pkg-plist.orig
make makeplist > pkg-plist
# Edit the pkg-plist, compare it with pkg-plist.orig for obvious things (sometimes options aren't correctly interpreted)
make clean
make
If all that works without problems I copy the updated port to my Poudriere install and run poudriere testport on it. That does another batch of checks to make sure everything's in order.
 
Back
Top