Re: Cmake build. C compiler.

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

 



On Tue, Sep 20, 2016 at 9:48 AM, Evgeniy Firsov
<Evgeniy.Firsov@xxxxxxxxxxx> wrote:
> It has nothing to do with compilers.
> There is a bug in NDEBUG handling in ZetaScale, which Ceph’s
> CmakeLists.txt passes down.
>
> And “in tree” build just uses wrong include paths, I guess.
>
> On 9/19/16, 3:00 PM, "Willem Jan Withagen" <wjw@xxxxxxxxxxx> wrote:
>
>>On 19-9-2016 23:37, Evgeniy Firsov wrote:
>>> Hi, Guys,
>>>
>>> When I build Ceph using ./do_cmake.sh && cd build && make -j32, looks
>>>like
>>> everything is compiled using C++ compiler, even files with .c extension.

this is not true. src/tracing/librados.c is a pure C source file. when
i run following command, i have:

$ make rados_tp VERBOSE=1
...
Building C object
src/tracing/CMakeFiles/rados_tp.dir/__/__/include/tracing/librados.c.o
cd /var/ceph/ceph/build/src/tracing && ccache /usr/bin/cc
-DCEPH_LIBDIR=\"/home/kefu/.local/lib\"
-DCEPH_PKGLIBDIR=\"/home/kefu/.local/lib/ceph\" -D__linux__
-Drados_tp_EXPORTS -I/var/ceph/ceph/build/src/include
-I/var/ceph/ceph/src -I/var/ceph/ceph/build/include
-I/var/ceph/ceph/src/xxHash  -Wall -Wtype-limits -Wignored-qualifiers
-Winit-self -Wpointer-arith -Werror=format-security
-fno-strict-aliasing -fsigned-char -rdynamic -fstack-protector-strong
-fdiagnostics-color=auto -g -fPIC   -DHAVE_CONFIG_H -D__CEPH__
-D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -o
CMakeFiles/rados_tp.dir/__/__/include/tracing/librados.c.o   -c
/var/ceph/ceph/build/include/tracing/librados.c
Linking C shared library ../../lib/librados_tp.so
...

so it is using cc not c++ to compile this source file.


>>> This fails ZetaScale compilation, which is pure C.

could you share your repo/branch address of Ceph with ZetaScale so
people can try and verify?

>>>
>>> In oppose to that if I am building ³in tree², with cmake . && make -j32,
>>> Ceph build fails, because it uses proper C compiler for .c extension,
>>>but
>>> they include Ceph¹s assert.h which is C++.
>>>
>>> So, probably, I need to configure compiler on per directory basis, is
>>> there known way to do that?
>>> Also, can somebody point me where in the CMakeList.txt compiler is
>>> configured for ³out of tree² build? I mean C++ for everything.
>>
>>You can run
>>cmake --system-information
>>to find out what you system is using for defaults....
>>
>>Mine (FreeBSD) has:
>>
>>CMAKE_CXX_COMPILER == "/usr/bin/CC"
>>CMAKE_C_COMPILER == "/usr/bin/cc"
>>
>>So it sort of already knows from the beginning the difference between C
>>and C++
>>
>>--WjW
>>>
>>> ‹
>>> Evgeniy
>>>
>>>
>>> PLEASE NOTE: The information contained in this electronic mail message
>>>is intended only for the use of the designated recipient(s) named above.
>>>If the reader of this message is not the intended recipient, you are
>>>hereby notified that you have received this message in error and that
>>>any review, dissemination, distribution, or copying of this message is
>>>strictly prohibited. If you have received this communication in error,
>>>please notify the sender by telephone or e-mail (as shown above)
>>>immediately and destroy any and all copies of this message in your
>>>possession (whether hard copies or electronically stored copies).
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>
> PLEASE NOTE: The information contained in this electronic mail message is intended only for the use of the designated recipient(s) named above. If the reader of this message is not the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify the sender by telephone or e-mail (as shown above) immediately and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies).



-- 
Regards
Kefu Chai
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [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