Skip to contentSkip to conversation

gcc-runtime: Remove libgfortran data from receipe

PATCH Superseded Daniel Dragomir 2 participants 4 messages Jan 15, 2015 – Jan 16, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc-runtime: Remove libgfortran data from receipe

Remove libgfortran packages from PACKAGES list and skip them at compiling and installing as long as libgfortran has separate receipe since commit

5bde5d9b39ea67f19a1a6aedd0c08c6cfedcbe5f
gcc: Allow fortran to build successfully in 4.8

Otherwise, when fortran support will be enabled in the compiler, both lingfortran and gcc-runtime receipes will create the same files and will try to install them. This will cause errors:

ERROR: The recipe libgfortran is trying to install files into a shared area when those files already exist. Those files and their manifest location are: ...
Please verify which recipe should provide the above files.

---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 41 ++++++++++++-------------------
 1 file changed, 16 insertions(+), 25 deletions(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +16 -25
index 167869e..c3b4a46 100644
@@ -22,28 +22,34 @@ do_configure () {
 	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
 	hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
 	for d in libgcc ${RUNTIMETARGET}; do
-		echo "Configuring $d"
-		rm -rf ${B}/$target/$d/
-		mkdir -p ${B}/$target/$d/
-		cd ${B}/$target/$d/
-		chmod a+x ${S}/$d/configure
-		${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+		if [ "$d" != "libgfortran" ]; then
+			echo "Configuring $d"
+			rm -rf ${B}/$target/$d/
+			mkdir -p ${B}/$target/$d/
+			cd ${B}/$target/$d/
+			chmod a+x ${S}/$d/configure
+			${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+		fi
 	done
 }
 
 do_compile () {
 	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
 	for d in libgcc ${RUNTIMETARGET}; do
-		cd ${B}/$target/$d/
-		oe_runmake MULTIBUILDTOP=${B}/$target/$d/
+		if [ "$d" != "libgfortran" ]; then
+			cd ${B}/$target/$d/
+			oe_runmake MULTIBUILDTOP=${B}/$target/$d/
+		fi
 	done
 }
 
 do_install () {
 	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
 	for d in ${RUNTIMETARGET}; do
-		cd ${B}/$target/$d/
-		oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
+		if [ "$d" != "libgfortran" ]; then
+			cd ${B}/$target/$d/
+			oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
+		fi
 	done
 	rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
 	rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
@@ -76,9 +82,6 @@ PACKAGES = "\
     libssp \
     libssp-dev \
     libssp-staticdev \
-    libgfortran \
-    libgfortran-dev \
-    libgfortran-staticdev \
     libmudflap \
     libmudflap-dev \
     libmudflap-staticdev \
@@ -131,18 +134,6 @@ FILES_libssp-dev = "\
 "
 FILES_libssp-staticdev = "${libdir}/libssp*.a"
 
-FILES_libgfortran = "${libdir}/libgfortran.so.*"
-FILES_libgfortran-dev = "\
-    ${libdir}/libgfortran*.so \
-    ${libdir}/libgfortran.spec \
-    ${libdir}/libgfortran.la \
-    ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
-    ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
-"
-FILES_libgfortran-staticdev = "${libdir}/libgfortran.a"
-
-INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev"
-
 FILES_libquadmath = "${libdir}/libquadmath*.so.*"
 FILES_libquadmath-dev = "\
     ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
Signature · 1 line
1.8.1.4
#1 lore raw
Quoted 25 lines · Daniel Dragomir

Remove libgfortran packages from PACKAGES list and skip them at compiling and installing as long as libgfortran has separate receipe since commit

5bde5d9b39ea67f19a1a6aedd0c08c6cfedcbe5f
gcc: Allow fortran to build successfully in 4.8

Otherwise, when fortran support will be enabled in the compiler, both lingfortran and gcc-runtime receipes will create the same files and will try to install them. This will cause errors:

ERROR: The recipe libgfortran is trying to install files into a shared area when those files already exist. Those files and their manifest location are: ...
Please verify which recipe should provide the above files.

---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 41 ++++++++++++-------------------
 1 file changed, 16 insertions(+), 25 deletions(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
index 167869e..c3b4a46 100644

meta/recipes-devtools/gcc/gcc-runtime.inc do_configure () { · line 25

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +1 -6
@@ -22,28 +22,34 @@ do_configure () {
 	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
 	hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
 	for d in libgcc ${RUNTIMETARGET}; do
-		echo "Configuring $d"
-		rm -rf ${B}/$target/$d/
-		mkdir -p ${B}/$target/$d/
-		cd ${B}/$target/$d/
-		chmod a+x ${S}/$d/configure
-		${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+		if [ "$d" != "libgfortran" ]; then

Why would libgfortran be in RUNTIMETARGET? Surely it would be better just to ensure it isn't rather than ignore it?

Cheers,

Richard

Quoted 66 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +15 -19
+			echo "Configuring $d"
+			rm -rf ${B}/$target/$d/
+			mkdir -p ${B}/$target/$d/
+			cd ${B}/$target/$d/
+			chmod a+x ${S}/$d/configure
+			${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+		fi
 	done
 }
 
 do_compile () {
 	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
 	for d in libgcc ${RUNTIMETARGET}; do
-		cd ${B}/$target/$d/
-		oe_runmake MULTIBUILDTOP=${B}/$target/$d/
+		if [ "$d" != "libgfortran" ]; then
+			cd ${B}/$target/$d/
+			oe_runmake MULTIBUILDTOP=${B}/$target/$d/
+		fi
 	done
 }
 
 do_install () {
 	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
 	for d in ${RUNTIMETARGET}; do
-		cd ${B}/$target/$d/
-		oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
+		if [ "$d" != "libgfortran" ]; then
+			cd ${B}/$target/$d/
+			oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
+		fi
 	done
 	rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
 	rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
@@ -76,9 +82,6 @@ PACKAGES = "\
     libssp \
     libssp-dev \
     libssp-staticdev \
-    libgfortran \
-    libgfortran-dev \
-    libgfortran-staticdev \
     libmudflap \
     libmudflap-dev \
     libmudflap-staticdev \
@@ -131,18 +134,6 @@ FILES_libssp-dev = "\
 "
 FILES_libssp-staticdev = "${libdir}/libssp*.a"
 
-FILES_libgfortran = "${libdir}/libgfortran.so.*"
-FILES_libgfortran-dev = "\
-    ${libdir}/libgfortran*.so \
-    ${libdir}/libgfortran.spec \
-    ${libdir}/libgfortran.la \
-    ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
-    ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
-"
-FILES_libgfortran-staticdev = "${libdir}/libgfortran.a"
-
-INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev"
-
 FILES_libquadmath = "${libdir}/libquadmath*.so.*"
 FILES_libquadmath-dev = "\
     ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
Signature · 1 line
1.8.1.4
#2 lore raw
Quoted 41 lines · Daniel Dragomir
Quoted 25 lines

Remove libgfortran packages from PACKAGES list and skip them at compiling and installing as long as libgfortran has separate receipe since commit

5bde5d9b39ea67f19a1a6aedd0c08c6cfedcbe5f
gcc: Allow fortran to build successfully in 4.8

Otherwise, when fortran support will be enabled in the compiler, both lingfortran and gcc-runtime receipes will create the same files and will try to install them. This will cause errors:

ERROR: The recipe libgfortran is trying to install files into a shared area when those files already exist. Those files and their manifest location are: ...
Please verify which recipe should provide the above files.

---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 41 ++++++++++++-------------------
 1 file changed, 16 insertions(+), 25 deletions(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
index 167869e..c3b4a46 100644

meta/recipes-devtools/gcc/gcc-runtime.inc do_configure () { · line 25

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +1 -6
@@ -22,28 +22,34 @@ do_configure () {
      target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
      hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
      for d in libgcc ${RUNTIMETARGET}; do
-             echo "Configuring $d"
-             rm -rf ${B}/$target/$d/
-             mkdir -p ${B}/$target/$d/
-             cd ${B}/$target/$d/
-             chmod a+x ${S}/$d/configure
-             ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+             if [ "$d" != "libgfortran" ]; then

Why would libgfortran be in RUNTIMETARGET? Surely it would be better just to ensure it isn't rather than ignore it?

Quoted 3 lines

Cheers,

Richard

My mistake.
I didn't noticed that I had in my layer, in a bbappend for gcc-runtime this line

RUNTIMETARGET += "libgfortran"

because I added fortran support in dora branch.
And in dora the receipes (gcc-runtime and libgfortran) were not splited.

That's why I added those "if" statements to skip libgfortran.

I remove the line and iny layer I added "libgfortran" in DEPENDS for image to build it.

Do you thing that we still need to ensure libgfortran is not in RUNTIMETARGET? Or I should remove the "if" statements and create a patch just with the other changes?

BR,
Daniel

Quoted 66 lines
Quoted 66 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +15 -20
+                     echo "Configuring $d"
+                     rm -rf ${B}/$target/$d/
+                     mkdir -p ${B}/$target/$d/
+                     cd ${B}/$target/$d/
+                     chmod a+x ${S}/$d/configure
+                     ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+             fi
     done
 }
 
 do_compile () {
      target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
      for d in libgcc ${RUNTIMETARGET}; do
-             cd ${B}/$target/$d/
-             oe_runmake MULTIBUILDTOP=${B}/$target/$d/
+             if [ "$d" != "libgfortran" ]; then
+                     cd ${B}/$target/$d/
+                     oe_runmake MULTIBUILDTOP=${B}/$target/$d/
+             fi
      done
 }
 
 do_install () {
      target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
      for d in ${RUNTIMETARGET}; do
-             cd ${B}/$target/$d/
-             oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
+             if [ "$d" != "libgfortran" ]; then
+                     cd ${B}/$target/$d/
+                     oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
+             fi
      done
      rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
      rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
@@ -76,9 +82,6 @@ PACKAGES = "\
     libssp \
     libssp-dev \
     libssp-staticdev \
-    libgfortran \
-    libgfortran-dev \
-    libgfortran-staticdev \
     libmudflap \
     libmudflap-dev \
     libmudflap-staticdev \
@@ -131,18 +134,6 @@ FILES_libssp-dev = "\
 "
 FILES_libssp-staticdev = "${libdir}/libssp*.a"
 
-FILES_libgfortran = "${libdir}/libgfortran.so.*"
-FILES_libgfortran-dev = "\
-    ${libdir}/libgfortran*.so \
-    ${libdir}/libgfortran.spec \
-    ${libdir}/libgfortran.la \
-    ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
-    ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
-"
-FILES_libgfortran-staticdev = "${libdir}/libgfortran.a"
-
-INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev"
-
 FILES_libquadmath = "${libdir}/libquadmath*.so.*"
 FILES_libquadmath-dev = "\
     ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
--

1.8.1.4

#3 lore raw
Quoted 52 lines · Daniel
Quoted 40 lines · Daniel Dragomir
Quoted 25 lines

Remove libgfortran packages from PACKAGES list and skip them at compiling and installing as long as libgfortran has separate receipe since commit

5bde5d9b39ea67f19a1a6aedd0c08c6cfedcbe5f
gcc: Allow fortran to build successfully in 4.8

Otherwise, when fortran support will be enabled in the compiler, both lingfortran and gcc-runtime receipes will create the same files and will try to install them. This will cause errors:

ERROR: The recipe libgfortran is trying to install files into a shared area when those files already exist. Those files and their manifest location are: ...
Please verify which recipe should provide the above files.

---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 41 ++++++++++++-------------------
 1 file changed, 16 insertions(+), 25 deletions(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
index 167869e..c3b4a46 100644

meta/recipes-devtools/gcc/gcc-runtime.inc do_configure () { · line 25

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +1 -6
@@ -22,28 +22,34 @@ do_configure () {
      target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
      hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
      for d in libgcc ${RUNTIMETARGET}; do
-             echo "Configuring $d"
-             rm -rf ${B}/$target/$d/
-             mkdir -p ${B}/$target/$d/
-             cd ${B}/$target/$d/
-             chmod a+x ${S}/$d/configure
-             ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+             if [ "$d" != "libgfortran" ]; then

Why would libgfortran be in RUNTIMETARGET? Surely it would be better just to ensure it isn't rather than ignore it?

Quoted 3 lines

Cheers,

Richard

My mistake.
I didn't noticed that I had in my layer, in a bbappend for gcc-runtime this line

RUNTIMETARGET += "libgfortran"

because I added fortran support in dora branch.
And in dora the receipes (gcc-runtime and libgfortran) were not splited.

Quoted 6 lines

That's why I added those "if" statements to skip libgfortran.

I remove the line and iny layer I added "libgfortran" in DEPENDS for image to build it.

Do you thing that we still need to ensure libgfortran is not in RUNTIMETARGET? Or I should remove the "if" statements and create a patch just with the other changes?

I think a patch with just the other changes should be fine now I understand how you reached this point.

Cheers,

Richard