Hi Kenneth and Fotis,
  thank you for your answers. Well in the end I decided to pursue Gentoo:Prefix 
path which gave me isolated Gentoo Linux with its optimized apps in a separate 
directory location, not conflicting with the host RedHat instance. It is very 
nice and all I had to to was to run a /scratch/mmokrejs/gentoo/startprefix 
shellscript to get my environment setup and my bash.
  Unfortunately, the Gentoo:Prefix does not allow me to use a different glibc 
and it turned out I need for many java apps newer glibc (2.14 or newer). For 
those curious what the java issues were about, see:
https://bugs.gentoo.org/show_bug.cgi?id=586716
https://bugs.gentoo.org/show_bug.cgi?id=588578

  There were/are more issues with some packages in the Gentoo::Prefix path as 
it uses a modified portage tree (with fixes relating to the $EPREFIX, etc.) but 
on the other hand, some packages are a bit outdated compared to the MAIN Gentoo 
portage tree. Anyway, it was not a complete solution for me, although I 
compiled many apps using the old, glibc-2.12 from RedHat.

  Finally, I discovered Gentoo::RAP which has a bit cryptic documentation and the 
table at the top of the https://wiki.gentoo.org/wiki/Prefix/libc page drives me 
always crazy (I have more questions than which the table tries to 
document&explain). Gentoo::RAP uses Gentoo's MAIN portage repository (so less 
confusion for me but issues fixed in Gentoo::Prefix repository may still be broken 
in the MAIN tree ... ;)). You cannot get everything at once. What is very important 
for me, on Gentoo::RAP I got glibc-2.23 installed and more or less all apps 
including lots of java stuff can be run there. So, it is an amazing system how to 
get all the bells and whistles of Gentoo Linux on almost any platform.
In my case, I could compile many apps with 'gcc -march=native' and because the Gentoo's 
build system is ready-made for non-gcc compilers as well (icc, f77, f90, clang, etc), I 
will recompile some of the applications using "CC=icc CXX=icc CFLAGS=opts 
CXXFLAG=opts emerge foo" with no effort. The process will either succeed and 
overwrite the gcc-made binaries, or not. I won't cry if some fail.

  Here is merely the whole trickery to get you :-) running:

#export PORTAGE_TMPDIR=/dev/shm # to speedup compile process using a fast temp 
space
#EPREFIX/etc/locale.gen
export GENTOO_MIRRORS="http://gentoo.mirror.dkm.cz/pub/gentoo/";
export EPREFIX="/scratch/mmokrejs/gentoo_rap" # the place where you want to 
install the whole Gentoo thing
# either fetch bootstrap-prefix.sh or bootstrap-rap.sh, refer to 
https://wiki.gentoo.org/wiki/Prefix/libc
./bootstrap-rap.sh
$EPREFIX/startprefix # voila, you are done, you get your environment and 
without any mount/chroot calls!

# inside prefixed/RAP-ed Gentoo execute the following
# emerge app-portage/emerge-delta-webrsync emerge-webrsync # if you are behind 
a ftp/rsync firewall fetch snapshots via http
emerge cpuinfo2cpuflags # figure out your CPUFLAGS or study /proc/cpuinfo 
yourself
cpuinfo2cpuflags-x86
# read 
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Stage#CFLAGS_and_CXXFLAGS
# edit/tune CFLAGS/CXXFLAGS/CC/CXX in $EPREFIX/etc/portage/make.conf
emerge system

# below is how I continued with installation of the latest&greatest apps from 
science and haskell overlays (supplementing the apps from MAIN portage tree)
emerge layman
layman -a science
layman -a haskell
echo "sci-biology/* **" >> $EPREFIX/etc/portage/package.accept_keywords
echo 'PORTDIR_OVERLAY="/scratch/mmokrejs/gentoo_rap/var/lib/layman"' >> 
$EPREFIX/etc/portage/make.conf
echo 'source /scratch/mmokrejs/gentoo_rap/var/lib/layman/make.conf' >> 
$EPREFIX/etc/portage/make.conf
gcc-config -l
eselect profile list

echo "en_US ISO-8859-1" >> "$EPREFIX"/etc/locale.gen
echo "en_US.UTF-8 UTF-8" >> "$EPREFIX"/etc/locale.gen
locale-gen

emerge =sys-devel/gcc-4.7.3-r1 =sys-devel/gcc-4.9.3 =sys-devel/gcc-4.8.5 
=sys-devel/gcc-4.2.4-r2 =sys-devel/gcc-4.1.2 =sys-devel/gcc-3.4.6-r2 
--keep-going
cd $EPREFIX/var/lib/layman/science/sci-biology
for p in *; do emerge -uN --keep-going --autounmask=y --backtrack=1000 $p; done




  So in summary, I myself did not see a reason to try to convert *.ebuild files 
to *.eb, and from a brief inspection of some easybuild files in the HPCugent 
github repository I realized the packages in Gentoo have more patches.

  Anyway, our cluster admins feel they want to create new *.eb files for some 
packages, so I can only wish them good luck and enough time to port the 
known/existing patches from other Linux distro's to easybuild.


Anyway, thank you for you work, easybuild is a nice way to keep clean isolated 
environment, which Gentoo tries to yield using SLOTs and 
gcc-config/java-config, etc. Both approaches offer binaries compiled using your 
wished compiler and its options but the Gentoo:RAP approach was faster then 
even thinking about converting *.ebuild files to *.eb. :-))


So, now I hope some of you try now Gentoo and eventually join the community. ;-)
Martin

Fotis Georgatos wrote:

Hi Martin,

this could become a very interesting direction.

The script Kenneth mentioned is actually this one, it won't won any prizes 
other than antediluvian hackery:
https://github.com/fgeorgatos/easybuild.experimental/blob/master/bin/pkg2eb_v2.sh

More broadly, I would love to see more concerted efforts across distros, to 
keep their processes and entropy in check.
Currently, it is all VERY ad-hoc about experience is exchanged across different 
build systems.

F.

p.s. At some point we could have a skype/hangout to swap knowledge and 
interests - just to catch up with the news.


On 10 June 2016 at 11:00, Kenneth Hoste <[email protected] 
<mailto:[email protected]>> wrote:

    Hi Martin,

    On 09/06/16 11:55, Martin MOKREJŠ wrote:

        Hi,
           I would like to know if there is some automated way to install 
Gentoo packages through EasyBuild. I want to take packages available in science 
overlay of Gentoo Linux at 
http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git and install them on a 
non-Gentoo host. Is it doable? ;-)

           I foresee some difficulty because there can be classes inherited in 
the ebuild files, complicating the conversion. Also syntax (EAPI) is changing 
time to time.


    Interesting!

    I'm currently unaware of any effort on this, but Fotis (in CC) has done 
some work like this for pkgsrc recipes, cfr. 
https://github.com/fgeorgatos/easybuild.experimental/tree/master/contrib/pkgsrc.

    I'm not sure if the script he used for this is availble anywhere (can't 
seem to find it in the repo), or if it would be helpful at all for this...


    regards,

    Kenneth


        Thank you,
        Martin
        P.S.: Do not confuse official Gentoo portage tree which has far less 
packages, the packages in the overlay are of more testing quality but mostly 
work fine. On the other hand, there are many more available.
        P.P.S.: Do not confuse a github tree of science overlay, it is manually 
synced in both directions with the official 
http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git science overlay tree.. 
That is because some users prefer more the github access including pull 
requests and issue reports, etc. But devs have to pull/cherrypick the changes 
in both directions.





--
echo "sysadmin know better bash than english"|sed s/min/mins/ \
  | sed 's/better bash/bash better/' # signal detected in a CERN forum

Reply via email to