Thanks for your input. Unfortunately adding your suggested line: RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath" doesn't seem to change the build error for me.
Odd thing is when I look at the output of the RUNTIMETARGET variable it doesn't appear to be set: $ bitbake -e libgfortran | grep "RUNTIMETARGET" # $RUNTIMETARGET RUNTIMETARGET="" On Thu, Nov 15, 2018 at 3:42 PM akuster808 <akuster...@gmail.com> wrote: > > > On 11/15/18 1:31 PM, Mike Worster wrote: > > I'm trying to get Fortran support (gfortran and libgfortran) enabled in a > Yocto Sumo build. > > Based on advice I got from this site: > https://jumpnowtek.com/yocto/Add-Fortran-support-to-a-Yocto-build.html > > I have enabled fortran in my local.conf via adding: > > FORTRAN_forcevariable = ",fortran" > > And I have created a gcc-runtime_7.3.bbappend file containing: > > RUNTIMETARGET += "libgfortran" > > > I recently ran into something similar. I ended up using in my local.conf > FORTRAN_forcevariable = ",fortran" > RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath" <<<--- maybe key?? > > and in one recipe I had a depends on "libgfortran" and is seems to build > fine. > > - armin > > > And I have added gfortran to my image: > > FORTRAN_TOOLS = " \ > gfortran \ > gfortran-symlinks \ > libgfortran \ > libgfortran-dev \ > " > > IMAGE_INSTALL += " \ > ${FORTRAN_TOOLS} \ > " > After all these modifications when I go to build I see the following error: > > | > ../../../../../../../../work-shared/gcc-7.3.0-r0/gcc-7.3.0/libgfortran/runtime/backtrace.c:36:10: > fatal error: backtrace-supported.h: No such file or directory > | #include "backtrace-supported.h" > | ^~~~~~~~~~~~~~~~~~~~~~~ > | compilation terminated. > | Makefile:2310: recipe for target 'backtrace.lo' failed > | make[1]: *** [backtrace.lo] Error 1 > > I've found I can get past this by updating > poky/meta/recipes-devtools/gcc/gcc-7.3.inc with the following line: > > CFLAGS += " -I../../libbacktrace " > > The build then dies later here: > > | libtool: link: cannot find the library `../libbacktrace/libbacktrace.la' > or unhandled argument `../libbacktrace/libbacktrace.la' > | Makefile:1364: recipe for target 'libgfortran.la' failed > | make[1]: *** [libgfortran.la] Error 1 > > I can resolve that by adjusting the Makefile found at: > tmp/work/cortexa9hf-neon-poky-linux-gnueabi/gcc-runtime/7.3.0-r0/gcc-7.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libgfortran/Makefile. > The following adjustment: > > $(LTLDFLAGS) $(LIBQUADLIB) ../../libbacktrace/libbacktrace.la \ > > gets past the failure to find the library (one directory up). Then running > the build again, there is the real problem: > > | ../../libbacktrace/.libs/libbacktrace.a: member > ../../libbacktrace/.libs/libbacktrace.a(atomic.o) in archive is not an > object > | collect2: error: ld returned 1 exit status > | ERROR: oe_runmake failed > | Makefile:1364: recipe for target 'libgfortran.la' failed > | make[1]: *** [libgfortran.la] Error 1 > > As far as I can tell, the archive's elements (atomic.o being first) are > being built for x86 instead of ARM, and thus they are not being recognized > as objects. > > Does anyone have input on this issue? Any ideas why this is broken, or how > to resolve this? > > -Mike > > >
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto