Re: Adding -latomic to cmake

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/9/21 8:24 PM, Thomas Goirand wrote:
> On 12/9/21 6:23 PM, kefu chai wrote:
>> On Wed, Nov 24, 2021 at 4:56 PM Thomas Goirand <zigo@xxxxxxxxxx> wrote:
>>>
>>> Hi Kefu,
>>>
>>> Thanks a lot for your help, that's invaluable!
>>>
>>> I've applied the mips 16-byte atomic support patch and I will rebuild
>>> and re-upload to Experimental, let's see how it goes now! :)
>>
>> hi Zigo, i found following error in
>> https://buildd.debian.org/status/fetch.php?pkg=ceph&arch=mipsel&ver=16.2.6%2Bds-5&stamp=1639003196&raw=0
>>
>> ===== 8< =======
>> Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_9f34f/fast &&
>> gmake[2]: Entering directory
>> '/<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp'
>> /usr/bin/gmake  -f CMakeFiles/cmTC_9f34f.dir/build.make
>> CMakeFiles/cmTC_9f34f.dir/build
>> gmake[3]: Entering directory
>> '/<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp'
>> Building CXX object CMakeFiles/cmTC_9f34f.dir/src.cxx.o
>> /usr/bin/c++ -DHAVE_CXX11_ATOMIC  -g -O2
>> -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
>> -Werror=format-security -g1 -Wdate-time -D_FORTIFY_SOURCE=2
>> -std=c++11 -fPIE -o CMakeFiles/cmTC_9f34f.dir/src.cxx.o -c
>> /<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx
>> /<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:44:
>> error: template argument 1 is invalid
>>    15 | bool atomic16(std::atomic<unsigned __int128> *ptr)
>>       |                                            ^
>> /<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:44:
>> error: template argument 1 is invalid
>> /<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:44:
>> error: template argument 1 is invalid
>> /<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:44:
>> error: template argument 1 is invalid
>> /<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:47:
>> error: ‘ptr’ was not declared in this scope
>>    15 | bool atomic16(std::atomic<unsigned __int128> *ptr)
>>       |                                               ^~~
>> ===== >8 =======
>>
>> so it seems that https://github.com/ceph/ceph/pull/44071 does not
>> work. could you please help test
>> https://github.com/ceph/ceph/pull/44264 ?
> 
> Hi,
> 
> IMO, that's not what should be done. I've done this:
> #if defined(__s390x__) || (defined(__mips__) && _MIPS_SIM ==_ABI64 )
> 
> which seems to work as expected: I've done the beginning of the build on
> a Debian mipsel porter box, and it built.
> 
> I've rebuilt Ceph 16.2.6+ds-6 and uploaded once more to Debian
> Experimental, let's see how it goes. If it builds on the remaining arch
> (ie: mipsel), then I'll send a PR doing what's above.
> 
> Cheers,
> 
> Thomas Goirand (zigo)

Hi again,

Looks like what I did above worked, however the build process still runs
out of memory on that platform... :(

See the build log for mipsel:
https://buildd.debian.org/status/fetch.php?pkg=ceph&arch=mipsel&ver=16.2.6%2Bds-6&stamp=1639173885&raw=0

cd /<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/src/msg && /usr/bin/c++
-DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION
-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DHAVE_CONFIG_H
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT
-D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__
-I/<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/src/include
-I/<<PKGBUILDDIR>>/src -isystem
/<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/include -isystem
/<<PKGBUILDDIR>>/src/xxHash -isystem
/<<PKGBUILDDIR>>/src/rapidjson/include -isystem
/<<PKGBUILDDIR>>/src/fmt/include -g -O2
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -g1 -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g
-DNDEBUG -fPIC   -U_FORTIFY_SOURCE -Wall -fno-strict-aliasing
-fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith
-Werror=format-security -Winit-self -Wno-unknown-pragmas
-Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024
-Wpessimizing-move -Wredundant-move -Wstrict-null-sentinel
-Woverloaded-virtual -fno-new-ttp-matching -fstack-protector-strong
-fdiagnostics-color=auto -fno-builtin-malloc -fno-builtin-calloc
-fno-builtin-realloc -fno-builtin-free -std=c++17 -MD -MT
src/msg/CMakeFiles/common-msg-objs.dir/Message.cc.o -MF
CMakeFiles/common-msg-objs.dir/Message.cc.o.d -o
CMakeFiles/common-msg-objs.dir/Message.cc.o -c
/<<PKGBUILDDIR>>/src/msg/Message.cc
virtual memory exhausted: Cannot allocate memory

Do you see a way I can save on memory? For 32 bits arch, debian/rules
already does:

extraopts += -DDISABLE_DENCODER=1
export DEB_CFLAGS_MAINT_APPEND = -g1
export DEB_CXXFLAGS_MAINT_APPEND = -g1
export DEB_LDFLAGS_MAINT_APPEND= -Wl,--as-needed -latomic
-Wl,--no-keep-memory

Is there anything more that can be done?

Cheers,

Thomas Goirand (zigo)
_______________________________________________
Dev mailing list -- dev@xxxxxxx
To unsubscribe send an email to dev-leave@xxxxxxx




[Index of Archives]     [CEPH Users]     [Ceph Devel]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux