Compile/build EOS on a Rocky host

Hello,

Can you please give me some pointers how to compile and build EOS from source on a Rocky host? I think I should at lines 433-456 in

but if you could confirm that would be great.

Thanks,

George

Hi Gerge,

You have a step by step workflow here on how to build eos:
https://eos-docs.web.cern.ch/diopside/manual/develop.html

Indeed, the lines that you referenced are also a good start for compiling it yourself from source. Furthermore, you have the actual build steps in the eos.spec.in file at the top of EOS repository.

Cheers,
Elvin

Hi Elvin,

Thanks for this. Combining stuff from the yml and the eos-docs, I followed these steps which worked nicely and resulted in the generation of rpms.

Can you please confirm the options for the cmake3 step? It is mentioned that “To build EOS, you need gcc (>=7) with C++17 features and CMake installed on your system”. Even after specifying -DCMAKE_CXX_STANDARD=17 for the generation of the srpm, I did see warnings during compilation (but none of which was fatal for compilation)

  • git clone dss / eos · GitLab

  • cd eos/

  • git checkout tags/4.8.103

  • git submodule sync --recursive && git submodule update --init -f --recursive

  • mkdir build; cd build

  • cmake3 …/ -DPACKAGEONLY=1 -DCMAKE_CXX_STANDARD=17 -Wno-dev

  • make srpm

  • Create cat /etc/yum.repos.d/eos-depend.repo

[eos-depend]
name=EOS dependencies
baseurl=Index of /storage-ci/eos/citrine-depend/el-8/x86_64
gpgcheck=0
enabled=1
priority=2

  • yum-builddep --nogpgcheck --setopt=“cern*.exclude=xrootd*” -y build/SRPMS/*

  • rpmbuild --rebuild --with server --define “_rpmdir build/RPMS/” --define “_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm” build/SRPMS/* | ts

Hi George,

Yes, all looks correct. The warnings that you see at compilation are expected.

Cheers,
Elvin

Thanks Elvin. Managed, also to build EOS5 following the above procedure. I noticed the following

what is the difference between them (el-8 vs el-8s).

  • When I run the yum-builddep step, no xrootd packages (xrootd-lib, etc) were installed unlike the case of EOS4. Is this expected.

  • These are the rpms I generated. Does look like the full list to you?

[root@host-172-16-110-108 eos]# ls -lrt build/RPMS/
total 609900
-rw-r–r-- 1 root root 199955788 Sep 15 11:08 eos-server-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 32295792 Sep 15 11:08 eos-ns-inspect-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 6248 Sep 15 11:09 eos-fusex-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 35069504 Sep 15 11:09 eos-client-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 29090872 Sep 15 11:09 eos-fusex-core-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 8588 Sep 15 11:09 eos-fusex-selinux-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 50801404 Sep 15 11:09 eos-quarkdb-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 7416 Sep 15 11:09 eos-testkeytab-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 50404 Sep 15 11:09 eos-archive-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 277218728 Sep 15 11:11 eos-test-5.1.8-1.el8.x86_64.rpm
-rw-r–r-- 1 root root 8460 Sep 15 11:11 eos-cleanup-5.1.8-1.el8.x86_64.rpm

Thanks again,

George

Hi George,

The el-8s was aimed at CentosStream8 builds (which we won’t provide anymore) and the el-8 covers Alma/Rocky/RHEL8. What was the error that you were getting when using the el-8 one? This should work in principle.

Yes, in EOS 5 we rely only on eos-xrootd by default to build the eos packages so it’s normal.

The list of packages that you got is complete so everything looks fine from my point of view.

Cheers,
Elvin

Hi Elvin,

Thanks for the thumbs up. It seemed that when using el-8, yum-builddep complained about a missing dependency (cant remember which one).

I uninstalled all the deps, changed to the el-8 diopside-depend repo and ran again yum-builddep and this time it worked…! Maybe I did sth wrong in the first place.

George

Hi Elvin,

Sorry for the hassle. I tried again to compile version 4.8.105 following exactly the steps above but, weirdly, this time I have compilation errors (see below). Do you know what I should I do or where to look at? Thanks.

Oct 20 15:49:03 [ 10%] Built target EosFuseAuth
Oct 20 15:49:13 [ 10%] Built target EosCliProto-Objects
make: *** [Makefile:171: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.RDyXIU (%build)
Macro expanded in comment on line 14: %{?rhel} == 7

Macro expanded in comment on line 15: %global __strip /bin/true

Macro expanded in comment on line 23: %{?rhel} == 7

Macro expanded in comment on line 24: %global __strip /opt/rh/%{devtoolset}/root/usr/bin/strip

Macro expanded in comment on line 25: %global __objdump /opt/rh/%{devtoolset}/root/usr/bin/objdump

Bad exit status from /var/tmp/rpm-tmp.RDyXIU (%build)

Oct 20 15:49:13
Oct 20 15:49:13
Oct 20 15:49:13 RPM build errors:

Hi George,

Hard to say what is actually the underlying error in this case. I don’t think there is something wrong with the code which is being built, but probably some issue with the environment. I would check the more basic things, like do you have enough disk space, are all the dependencies installed etc.

Cheers,
Elvin

Hi Elvin,

You were right, it was probably some missing dep. I removed all installed packages, did again yum clean, repeated the procedure and this time it worked.

Best,

George