You are not logged in.
Hi,
I have gcc 6.1.1 installed. For one program I require an older compiler. Googling told me that gcc45 (and other versions) are gcc versions in the AUR that install alongside the usual gcc.
So I tried installing gcc45 but I get the following error:
error: failed to commit transaction (conflicting files)
gcc45: /usr/lib/libgcc_s.so exists in filesystem
gcc45: /usr/lib/libgcc_s.so.1 exists in filesystem
gcc45: /usr/lib/libgfortran.so exists in filesystem
gcc45: /usr/lib/libgfortran.so.3 exists in filesystem
gcc45: /usr/lib/libgfortran.so.3.0.0 exists in filesystem
gcc45: /usr/lib/libobjc.so exists in filesystem
gcc45: /usr/lib/libstdc++.a exists in filesystem
gcc45: /usr/lib/libstdc++.so exists in filesystem
gcc45: /usr/lib/libstdc++.so.6 exists in filesystem
gcc45: /usr/lib/libsupc++.a exists in filesystem
Errors occurred, no packages were upgraded.
So those files belong to gcc-libs 6.1.1-2. Makes sense. Apparently gcc45 does not install alongside a newer version. What am I doing wrong?
Last edited by kunterbunt (2016-08-04 19:38:37)
Offline
Fix the PKGBUILD so it doesn't conflict.
Mod note: Not a pacman issue, moving to AUR Issues.
Last edited by WorMzy (2016-08-04 20:37:16)
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Fix the PKGBUILD so it doesn't conflict.
And how do I do that? I have never touched a PKGBUILD before and I don't understand the general idea of what to do. The conflicting files belong to a newer version of that library. I could let the older version provide the files but I don't want that as the up-to-date gcc would then not work anymore (and who knows what else). So I want both versions of the library, just as with gcc. Ideally the older version would have a subdirectory containing the files and be told to use them. Is that how you do it? If it is, then how do you do it?
Last edited by kunterbunt (2016-08-05 09:12:02)
Offline
And how do I do that? I have never touched a PKGBUILD before and I don't understand the general idea of what to do.
As I wrote in another thread recently: Then learn. This is Arch. However, in this case the solution is far from obvious, so I'll help you out. Replace this line:
mv "${pkgdir}/usr/lib/gcc/${CHOST}"/lib*/ "${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/" || : # Not needed for 32 bit compile
with this one:
mv ${pkgdir}/usr/lib/lib* "${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/" || : # Not needed for 32 bit compile
This does exactly what you describe, it moves the conflicting files from /usr/lib/ (where the newer, gcc 6 libraries are) into a version-specific directory. I suppose the original line is meant to do that, but it does it incorrectly.
Last edited by Gusar (2016-08-05 09:39:36)
Offline
As I wrote in another thread recently: Then learn. This is Arch.
That's the whole point of me asking. Apparently I was on the right track, too.
Anyway, thanks for your help.
Offline
You can do it like aur/gcc49 does:
## Lazy way of dealing with conflicting man and info pages and locales...
rm -rf ${pkgdir}/usr/share/
rm -rf ${pkgdir}/usr/include/
find ${pkgdir}/ -name \*iberty\* | xargs rm
# Move potentially conflicting stuff to version specific subdirectory
$(ls "$pkgdir"/usr/lib/gcc/$CHOST/lib* &> /dev/null) && mv "$pkgdir"/usr/lib/gcc/$CHOST/lib* "$pkgdir/usr/lib/gcc/$CHOST/$pkgver/"
# Install Runtime Library Exception
install -Dm644 ${srcdir}/gcc-${pkgver}/COPYING.RUNTIME \
${pkgdir}/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION
# create symlinks
cd ${pkgdir}/usr/bin
rm ${CHOST}-gcc-${pkgver}
for ii in c++ cpp g++ gcc gcc-ar gcc-nm gcc-ranlib gfortran; do
ln -s ${ii}-${_pkgver} ${ii}-${pkgver}
ln -s ${CHOST}-${ii}-${_pkgver} ${CHOST}-${ii}-${pkgver}
done
ln -s gcov-${_pkgver} gcov-${pkgver}
Intel(R) Celeron(R) CPU E3400 @ 2.60GHz, x86_64. AURs.
“No one without the knowledge of geometry may enter.“ Plato.
Offline