[CentOS-devel] Ceph on arm32 - failing to compile devtoolset-8-gcc-8.3.1-3.1.el7.src.rpm

Wed Dec 23 19:22:11 UTC 2020
Pablo Sebastián Greco <pgreco at centosproject.org>

On 22/12/20 05:54, Oliver Weinmann wrote:
>
> Hi Pablo,
>
> have you had time to build the rpms yet? I was a bit impatient and so 
> I simply changed the ceph.spec file to point to
>
> devtoolset-8-gcc-c++-8.3.1-3.el7.armv7hl.rpm
>
> instead of
>
> devtoolset-8-gcc-c++-8.3.1-3.1el7.armv7hl.rpm
>
It is all ready to be built, but most of RH is son shutdown until Jan, 
so we don't have many people to push the build
>
> But after hours of compiling ceph I get an error. Maybe its related to 
> not having the required version of devtoolset?
>
> /opt/rh/devtoolset-8/root/usr/include/c++/8/bits/stl_algo.h:3462:5: 
> note:   template argument deduction/substitution 
> failed:                                             |
> /mnt/rpmbuild/BUILD/ceph-15.2.8/src/mds/PurgeQueue.cc:662:65: note:   
> mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned 
> int'                         |
>    files_high_water = std::max(files_high_water, in_flight.size()); |
> ^ |
> In file included from 
> /opt/rh/devtoolset-8/root/usr/include/c++/8/functional:65, |
>                  from 
> /mnt/rpmbuild/BUILD/ceph-15.2.8/build/boost/include/boost/smart_ptr/detail/shared_count.hpp:39, 
> |
>                  from 
> /mnt/rpmbuild/BUILD/ceph-15.2.8/build/boost/include/boost/smart_ptr/shared_ptr.hpp:28, 
> |
>                  from 
> /mnt/rpmbuild/BUILD/ceph-15.2.8/src/include/any.h:25, |
>                  from 
> /mnt/rpmbuild/BUILD/ceph-15.2.8/src/common/ceph_context.h:29, |
>                  from 
> /mnt/rpmbuild/BUILD/ceph-15.2.8/src/common/dout.h:29, |
>                  from 
> /mnt/rpmbuild/BUILD/ceph-15.2.8/src/common/debug.h:18, |
>                  from 
> /mnt/rpmbuild/BUILD/ceph-15.2.8/src/mds/PurgeQueue.cc:15: |
> /opt/rh/devtoolset-8/root/usr/include/c++/8/bits/stl_algo.h:3468:5: 
> note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp 
> std::max(std::initializer_list<_T|
> p>, _Compare)' |
>      max(initializer_list<_Tp> __l, _Compare __comp) |
> ^~~ |
> /opt/rh/devtoolset-8/root/usr/include/c++/8/bits/stl_algo.h:3468:5: 
> note:   template argument deduction/substitution 
> failed:                                             |
> /mnt/rpmbuild/BUILD/ceph-15.2.8/src/mds/PurgeQueue.cc:662:65: note:   
> mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned 
> int'                         |
>    files_high_water = std::max(files_high_water, in_flight.size()); |
> ^ |
> make[2]: *** [src/mds/CMakeFiles/mds.dir/PurgeQueue.cc.o] Error 1 |
> make[1]: *** [src/mds/CMakeFiles/mds.dir/all] Error 2 |
> make: *** [all] Error 2 |
> error: Bad exit status from /var/tmp/rpm-tmp.PANEM1 (%build) |
>
Unless there's a really specific bug in the compiler, I don't see that 
being fixed by the new gcc
>
> Cheers,
>
> Oliver
>
> Am 13.12.2020 um 20:40 schrieb Oliver Weinmann:
>> Great. Thank you very much.
>>
>> Von meinem iPhone gesendet
>>
>>> Am 13.12.2020 um 20:25 schrieb Pablo Sebastián Greco 
>>> <pgreco at centosproject.org>:
>>>
>>> 
>>>
>>> Ok,I see that in git we have .1 and .2, neither of which were built 
>>> for armhfp. I'll try to get that sorted out and let you know.
>>>
>>> On 13/12/20 05:12, Oliver Weinmann via CentOS-devel wrote:
>>>> Ok, I missed an important part. I need version 8.3.1.3.1 the one in 
>>>> the rep is 8.3.1.3 :( So I have to compile it. I will give it a 
>>>> try. Or do you think there will be an updated package available soon?
>>>>
>>>> Cheers,
>>>>
>>>> Oliver
>>>>
>>>> Am 12.12.2020 um 19:40 schrieb Oliver Weinmann via CentOS-devel:
>>>>> Great stuff. I was googling for those packages and couldn't find 
>>>>> them. No more need to rebuild them. They were deps for CEPH. No I 
>>>>> can start building ceph. :) I guess this will take a couple of 
>>>>> days on a raspi3. ;)
>>>>>
>>>>> Am 12.12.2020 um 14:43 schrieb Pablo Sebastián Greco:
>>>>>>
>>>>>> On 12/12/20 07:44, Oliver Weinmann wrote:
>>>>>>> Hi Pablo,
>>>>>>>
>>>>>>> thanks a lot for your reply. The src.rpm I'm using is this one:
>>>>>>>
>>>>>>> https://cbs.centos.org/kojifiles/packages/devtoolset-8-gcc/8.3.1/3.1.el7/src/devtoolset-8-gcc-8.3.1-3.1.el7.src.rpm 
>>>>>>>
>>>>>>>
>>>>>>> It's gcc8 so the patch you linked is not really fitting. :( If 
>>>>>>> you have time and could take a look that would be really cool.
>>>>>> You have the whole devtoolset-8 for armhfp here 
>>>>>> https://buildlogs.centos.org/c7-devtoolset-8.armhfp/ , including 
>>>>>> the srpms. I'll talk to Johnny to upload the patches to git.
>>>>>> If you decide to rebuild it, aside from patience, be careful with 
>>>>>> binutils (needs a patch or executables become invalid) and make 
>>>>>> (has a bug that makes it parallel builds not work correctly).
>>>>>> Both of those issues are fixed in the repo I pointed
>>>>>>>
>>>>>>> Best Regards,
>>>>>>>
>>>>>>> Oliver
>>>>>>>
>>>>>>> Am 12.12.2020 um 10:26 schrieb Pablo Sebastián Greco:
>>>>>>>>
>>>>>>>> On 11/12/20 11:28, Oliver Weinmann via CentOS-devel wrote:
>>>>>>>>> Hi Folks,
>>>>>>>>>
>>>>>>>>> For a small home project I would like to get cephadm working 
>>>>>>>>> on my Odroid HC-2 (armhf 32). Maybe this is not going to work 
>>>>>>>>> but I want to at least give it a try. I see that there are 
>>>>>>>>> only arm64 packages and containers available from the Ceph 
>>>>>>>>> repo. So I thought I just go ahead and compile the dependency 
>>>>>>>>> packages myself and build a new container with CentOS7 arm32. 
>>>>>>>>> Luckily there is a CentOS 7 arm32 container but I still need 
>>>>>>>>> to compile the packages. After downloading all the src rpms i 
>>>>>>>>> started building them and now I ended up to compile this 
>>>>>>>>> package from the SCL repo as it is not available for arm32:
>>>>>>>>>
>>>>>>>>> devtoolset-8-gcc-8.3.1-3.1.el7.src.rpm
>>>>>>>>>
>>>>>>>>> It fails with an error of:
>>>>>>>>>
>>>>>>>>> checking if mkdir takes one argument... no
>>>>>>>>> *** Configuration armv7hl-redhat-linux-gnu7E not supported
>>>>>>>>> make[2]: *** [configure-stage1-gcc] Error 1
>>>>>>>>> make[2]: Leaving directory 
>>>>>>>>> `/root/rpmbuild/BUILD/gcc-8.3.1-20190311/obj-armv7hl-redhat-linux7E' 
>>>>>>>>>
>>>>>>>>> make[1]: *** [stage1-bubble] Error 2
>>>>>>>>> make[1]: Leaving directory 
>>>>>>>>> `/root/rpmbuild/BUILD/gcc-8.3.1-20190311/obj-armv7hl-redhat-linux7E' 
>>>>>>>>>
>>>>>>>>> make: *** [profiledbootstrap] Error 2
>>>>>>>>> error: Bad exit status from /var/tmp/rpm-tmp.knxvjm (%build)
>>>>>>>> This looks very close to this fix we had to add to make gcc 
>>>>>>>> work on arm 
>>>>>>>> https://git.centos.org/rpms/devtoolset-7-gcc/blob/c7/f/SPECS/gcc.spec#_319 
>>>>>>>> (I'm linking to gcc7 because I can't find the other commit, but 
>>>>>>>> it is the same thing).
>>>>>>>> Let me know if that helps  and if it is still failing, point me 
>>>>>>>> to as spec file or an srpm and I'll take a look.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> RPM build errors:
>>>>>>>>>     Bad exit status from /var/tmp/rpm-tmp.knxvjm (%build)
>>>>>>>>>
>>>>>>>>> real    13m36.412s
>>>>>>>>> user    17m57.828s
>>>>>>>>> sys     3m47.905s
>>>>>>>>>
>>>>>>>>> I looked up the build log for arm64 and so I figured out that 
>>>>>>>>> the next step is to access a directory called arm here:
>>>>>>>>>
>>>>>>>>> /root/rpmbuild/BUILD/gcc-8.3.1-20190311/gcc/config
>>>>>>>>>
>>>>>>>>> in the extracted source. Somehow the build process thinks my 
>>>>>>>>> system is armv7hl-redhat-linux-gnu7E instead of arm and so it 
>>>>>>>>> tries to access the armv7hl-redhat-linux-gnu7E directory which 
>>>>>>>>> doesn't exist and fails. I simply created a symlink and this 
>>>>>>>>> seems to be working.
>>>>>>>>>
>>>>>>>>> ln -sf arm armv7hl-redhat-linux-gnu7E
>>>>>>>>>
>>>>>>>>> Not sure if this is in general a bad idea. So I got a lot 
>>>>>>>>> further. But then it fails again with this error:
>>>>>>>>>
>>>>>>>>> In file included from /usr/include/features.h:399,
>>>>>>>>>                  from /usr/include/stdio.h:27,
>>>>>>>>>                  from ../.././libgcc/../gcc/tsystem.h:87,
>>>>>>>>>                  from ../.././libgcc/libgcc2.c:27:
>>>>>>>>> /usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-soft.h: 
>>>>>>>>> No such file or directory
>>>>>>>>>  # include <gnu/stubs-soft.h>
>>>>>>>>>            ^~~~~~~~~~~~~~~~~~
>>>>>>>>> compilation terminated.
>>>>>>>>> make[3]: *** [_muldi3.o] Error 1
>>>>>>>>> make[3]: Leaving directory 
>>>>>>>>> `/root/rpmbuild/BUILD/gcc-8.3.1-20190311/armv7l-unknown-linux-gnueabihf/libgcc'
>>>>>>>>> make[2]: *** [all-stage1-target-libgcc] Error 2
>>>>>>>>> make[2]: Leaving directory 
>>>>>>>>> `/root/rpmbuild/BUILD/gcc-8.3.1-20190311'
>>>>>>>>> make[1]: *** [stage1-bubble] Error 2
>>>>>>>>> make[1]: Leaving directory 
>>>>>>>>> `/root/rpmbuild/BUILD/gcc-8.3.1-20190311'
>>>>>>>>> make: *** [all] Error 2
>>>>>>>>>
>>>>>>>>> real    88m2.283s
>>>>>>>>> user    67m23.211s
>>>>>>>>> sys     6m7.984s
>>>>>>>>>
>>>>>>>>> I can't find any good info on google on how to deal with this 
>>>>>>>>> one. Any ideas?
>>>>>>>>>
>>>>>>>>> Best Regards,
>>>>>>>>>
>>>>>>>>> Oliver
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Pablo.
>>>>>> Pablo.
>>>>> _______________________________________________
>>>>> CentOS-devel mailing list
>>>>> CentOS-devel at centos.org
>>>>> https://lists.centos.org/mailman/listinfo/centos-devel
>>>> _______________________________________________
>>>> CentOS-devel mailing list
>>>> CentOS-devel at centos.org
>>>> https://lists.centos.org/mailman/listinfo/centos-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20201223/f849812d/attachment-0005.html>