Некоторое время назад gentoo стало использовать gcc-4.8 для сборки мира
openmcu-ru этой версией компилятора собрать не получится (вернее: получится - но работать система не будет)
посему:
нужно обязательно оставить установленным gcc версии 4.7
собирать с установленной в отделный слот (не дефолтной) версией gcc-4.7 можно двумя разными способами:
1) Ручной способпроверяем текущую версию по умолчанию gcc:
# gcc-config -l
[1] x86_64-pc-linux-gnu-4.7.3
[2] x86_64-pc-linux-gnu-4.8.3 *
как видим установлена версия 4.8
переводим default версию в 4.7:
# gcc-config -f 1
* Switching native-compiler to x86_64-pc-linux-gnu-4.7.3 ...
!!! Repository 'x-overlay' is missing masters attribute in '/opt/overlay/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
>>> Regenerating /etc/ld.so.cache... [ ok ]
* If you intend to use the gcc from the new profile in an already
* running shell, please remember to do:
* . /etc/profile
проверяем:
# gcc-config -l
[1] x86_64-pc-linux-gnu-4.7.3 *
[2] x86_64-pc-linux-gnu-4.8.3
собираем openmcu-ru:
# emerge openmcu-ru
!!! Repository 'x-overlay' is missing masters attribute in '/opt/overlay/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
WARNING: One or more repositories have missing repo_name entries:
/opt/overlay/profiles/repo_name
NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.
* IMPORTANT: 10 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ~] net-voip/openmcu-ru-999
Would you like to merge these packages? [Yes/No]
возвращаем gcc обратно(иначе при обновлениях мир не соберется):
# gcc-config -f 2
* Switching native-compiler to x86_64-pc-linux-gnu-4.8.3 ...
!!! Repository 'x-overlay' is missing masters attribute in '/opt/overlay/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
>>> Regenerating /etc/ld.so.cache... [ ok ]
* If you intend to use the gcc from the new profile in an already
* running shell, please remember to do:
* . /etc/profile
2)Автоматический способ Широко известный в узких кругах генто-хакер
megobaks написал кастыль позволяющий применять различные(установленные) версии gcc при сборки отдельных пакетов:
https://www.linux.org.ru/forum/development/6975216#comment-6975253https://www.linux.org.ru/forum/general/6975613/Смысл кастыля:
добавляем (или изменяем) файл: /etc/portage/bashrc
if [ -f ${ROOT}/etc/portage/package.compilers ]; then
while read target ver; do
if [ "${target}" = "${CATEGORY}/${PN}" ]; then
MY_GCC="$(find /usr/$MACHTYPE/gcc-bin/ -name "$ver*")"
export ROOTPATH="${MY_GCC}:${ROOTPATH}"
export PATH="${MY_GCC}:${PATH}"
export LIBRARY_PATH="$(gcc-config -L):${LIBRARY_PATH}"
fi
done < ${ROOT}/etc/portage/package.compilers
fi
добавляем конфиг: /etc/portage/package.compilers
формат конфига <пакет> <версия gcc>
net-voip/openmcu-ru 4.7.3
После этого openmcu-ru (или любой другой выбранный пакет) будет собираться с нужной версией gcc