I want to enable libgfortran on OpenSTLinux. Based on the informotion that i found on the internet I added the following lines to the local.conf
IMAGE_FEATURES += "tools-sdk"
FORTRAN = ",fortran"
FORTRAN_forcevariable = ",fortran"
RUNTIMETARGET += " libquadmath libgfortran"
IMAGE_INSTALL += " gfortran gfortran-symlinks libgfortran libgfortran-dev"
But i am getting the following error
bitbake st-image-weston
NOTE: Started PRServer with DBfile: /home/user/Desktop/Testing/Ashish/02_STM32MCU/OpenSTLinux2/build-openstlinuxweston-stm32mp1/cache/prserv.sqlite3, Address: 127.0.0.1:44813, PID: 2068707
Loading cache: 100% |##########################################################################################################| Time: 0:00:01
Loaded 4984 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################| Time: 0:00:00
Parsing of 3033 .bb files complete (3024 cached, 9 parsed). 4984 targets, 635 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'libgfortran' (but /home/user/Desktop/Testing/Ashish/02_STM32MCU/OpenSTLinux2/layers/meta-st/meta-st-openstlinux/recipes-st/images/st-image-weston.bb RDEPENDS on or otherwise requires it)
nativesdk-libgfortran RPROVIDES libgfortran but was skipped: libgfortran needs fortran support to be enabled in the compiler
libgfortran was skipped: libgfortran needs fortran support to be enabled in the compiler
NOTE: Runtime target 'libgfortran' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['libgfortran']
ERROR: Required build target 'st-image-weston' has no buildable providers.
Missing or unbuildable dependency chain was: ['st-image-weston', 'libgfortran']
I want to enable libgfortran on OpenSTLinux. Based on the informotion that i found on the internet I added the following lines to the local.conf
IMAGE_FEATURES += "tools-sdk"
FORTRAN = ",fortran"
FORTRAN_forcevariable = ",fortran"
RUNTIMETARGET += " libquadmath libgfortran"
IMAGE_INSTALL += " gfortran gfortran-symlinks libgfortran libgfortran-dev"
But i am getting the following error
bitbake st-image-weston
NOTE: Started PRServer with DBfile: /home/user/Desktop/Testing/Ashish/02_STM32MCU/OpenSTLinux2/build-openstlinuxweston-stm32mp1/cache/prserv.sqlite3, Address: 127.0.0.1:44813, PID: 2068707
Loading cache: 100% |##########################################################################################################| Time: 0:00:01
Loaded 4984 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################| Time: 0:00:00
Parsing of 3033 .bb files complete (3024 cached, 9 parsed). 4984 targets, 635 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'libgfortran' (but /home/user/Desktop/Testing/Ashish/02_STM32MCU/OpenSTLinux2/layers/meta-st/meta-st-openstlinux/recipes-st/images/st-image-weston.bb RDEPENDS on or otherwise requires it)
nativesdk-libgfortran RPROVIDES libgfortran but was skipped: libgfortran needs fortran support to be enabled in the compiler
libgfortran was skipped: libgfortran needs fortran support to be enabled in the compiler
NOTE: Runtime target 'libgfortran' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['libgfortran']
ERROR: Required build target 'st-image-weston' has no buildable providers.
Missing or unbuildable dependency chain was: ['st-image-weston', 'libgfortran']
Share
Improve this question
asked Mar 11 at 12:45
FottenTaleFottenTale
731 silver badge6 bronze badges
1 Answer
Reset to default 0It is not recommended to use in your local.conf
the variable IMAGE_INSTALL
. I would recommend you to create a custom image, based in the one that you are trying to build and start from it.
On What I wish I’d known about Yocto Project
- Create your own image recipe: There are a number of ways to create your own image recipe. We suggest you create your own image recipe as opposed to appending an existing recipe. It is trivial and easy to write an image recipe. Again, do not try appending to an existing image recipe. Create your own and do it right from the start.
You were on the right track changing the variable FORTRAN
to enable the required flags on the compiler. The error that you have is because you are using the old syntax. There is a task in place to check for syntax errors when you used variables in Yocto, but sadly it does not work for all cases, like this one.
See for more details: Override Syntax changes on Honister 3.4
Your local.conf
should look like:
IMAGE_FEATURES += "tools-sdk"
FORTRAN:forcevariable = ",fortran"
# As I mention you, this line should not be used here
IMAGE_INSTALL += " gfortran gfortran-symlinks libgfortran libgfortran-dev"
As best practice, I also recommend you to not use +=
in your global files like local.conf
. Instead you can used :append
.
With those changes, if you build the package libgfortran
, you should not get the error.
bitbake libgfortran
...
NOTE: Tasks Summary: Attempted 668 tasks of which
660 didn't need to be rerun and all succeeded.