sjnewbury / gentoo-gpu

Bleeding-edge GPU support for Gentoo - OpenCL, GLVND, Vulkan
17 stars 6 forks source link

nvptx-gcc not build #24

Open vovagubin1987 opened 6 years ago

vovagubin1987 commented 6 years ago

cp doc/gcc.1 doc/g++.1 build/genmodes -h > tmp-modes.h /bin/bash /var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/gcc-8.0.0-9999/gcc/../move-if-change tmp-modes.h insn-modes.h echo timestamp > s-modes-h build/genmodes -i > tmp-modes-inline.h /bin/bash /var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/gcc-8.0.0-9999/gcc/../move-if-change tmp-modes-inline.h \ insn-modes-inline.h echo timestamp > s-modes-inline-h build/gengtype \ -S /var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/gcc-8.0.0-9999/gcc -I gtyp-input.list -w tmp-gtype.state make[2]: [Makefile:2651: s-gtype] Illegal instruction rm fsf-funding.pod gcov.pod gpl.pod cpp.pod gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod make[2]: Leaving directory '/var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/build/gcc' make[1]: [Makefile:4237: all-gcc] Error 2 make[1]: Leaving directory '/var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/build' make: *** [Makefile:892: all] Error 2

Failed to emerge sys-devel/offload-gcc-nvptx-8.0.0_pre9999, Log file:

'/var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/temp/build.log'

sjnewbury commented 6 years ago

I'll take a look. I've quite a few local changes I need to commit. Unfortunately, I can only build test, if you're willing to run-test, that would be great!

sjnewbury commented 6 years ago

I've got it building successfully. I will push all my latest changes to the repo today. Let me know if it then works for you.

sjnewbury commented 6 years ago

I will also add a stable gcc-8 release alongside the the live ebuilds.

sjnewbury commented 6 years ago

@vovagubin1987 That was a lot more work than I thought it would be. I now have a properly slotted offload-gcc-nvptx ebuild which works for both versioned and live compiler builds.

I'm about to push it, if you could test it, that would be great!

sjnewbury commented 6 years ago

I'm dropping sys-devel/gcc from the overlay so to use the plugin you'll need to use repos.conf to inherit the eclass for where your gcc ebuilds are located.

vovagubin1987 commented 6 years ago

I compiled gcc-nvptx 8.0 and gcc with offload 8.0 only with gcc version 6.4

sjnewbury commented 6 years ago

I suspect that kernel version is probably too old. The eclass only provides USE=offload-nvptx for version 7+.

sjnewbury commented 6 years ago

kernel? I meant compiler!

sjnewbury commented 6 years ago

I need to make sure the offload driver is added to DEPEND for the gcc build.

sjnewbury commented 6 years ago

I've fixed the dependency to the gcc version/slot.

All you should have to do is ensure your /etc/portage/repos.conf/gentoo.conf includes::

[DEFAULT]
main-repo = gentoo
eclass-overrides = gentoo-gpu

Then when you emerge sys-devel/gcc:8 with USE=offload-nvptx it should pull in the appropriate version.

I'll add ebuilds for all the current (suitable) portage versions.

sjnewbury commented 6 years ago

gcc-7.3 support is there now.

sjnewbury commented 1 year ago

Probably a bit late now, but I've been able to test and fix up the offloading support in conjunction with ROCm since I now have a GPU I can test with. I need to bump the NVPTX version, but I need someone willing to test it.