All of lore.kernel.org
 help / color / mirror / Atom feed
* Cmake build. C compiler.
@ 2016-09-19 21:37 Evgeniy Firsov
  2016-09-19 22:00 ` Willem Jan Withagen
  0 siblings, 1 reply; 7+ messages in thread
From: Evgeniy Firsov @ 2016-09-19 21:37 UTC (permalink / raw)
  To: ceph-devel

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 fails ZetaScale compilation, which is pure C.

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.

‹
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).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cmake build. C compiler.
  2016-09-19 21:37 Cmake build. C compiler Evgeniy Firsov
@ 2016-09-19 22:00 ` Willem Jan Withagen
  2016-09-20  1:48   ` Evgeniy Firsov
  0 siblings, 1 reply; 7+ messages in thread
From: Willem Jan Withagen @ 2016-09-19 22:00 UTC (permalink / raw)
  To: Evgeniy Firsov, ceph-devel

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 fails ZetaScale compilation, which is pure C.
> 
> 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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cmake build. C compiler.
  2016-09-19 22:00 ` Willem Jan Withagen
@ 2016-09-20  1:48   ` Evgeniy Firsov
  2016-09-21  6:04     ` kefu chai
  0 siblings, 1 reply; 7+ messages in thread
From: Evgeniy Firsov @ 2016-09-20  1:48 UTC (permalink / raw)
  To: ceph-devel

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@digiware.nl> 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 fails ZetaScale compilation, which is pure C.
>>
>> 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@vger.kernel.org
>> 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).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cmake build. C compiler.
  2016-09-20  1:48   ` Evgeniy Firsov
@ 2016-09-21  6:04     ` kefu chai
  2016-09-22 23:02       ` Evgeniy Firsov
  0 siblings, 1 reply; 7+ messages in thread
From: kefu chai @ 2016-09-21  6:04 UTC (permalink / raw)
  To: Evgeniy Firsov; +Cc: ceph-devel

On Tue, Sep 20, 2016 at 9:48 AM, Evgeniy Firsov
<Evgeniy.Firsov@sandisk.com> 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@digiware.nl> 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@vger.kernel.org
>>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cmake build. C compiler.
  2016-09-21  6:04     ` kefu chai
@ 2016-09-22 23:02       ` Evgeniy Firsov
  2016-09-23 11:12         ` kefu chai
  0 siblings, 1 reply; 7+ messages in thread
From: Evgeniy Firsov @ 2016-09-22 23:02 UTC (permalink / raw)
  To: kefu chai; +Cc: ceph-devel

Kefu,

You are right. My statement was wrong. I found that the problem was in
NDEBUG handling in ZS code.
However, do you know if there is a way to build “in tree”, I mean as we
did with auto tools, without creating “build” directory?

On 9/20/16, 11:04 PM, "kefu chai" <tchaikov@gmail.com> wrote:

>On Tue, Sep 20, 2016 at 9:48 AM, Evgeniy Firsov
><Evgeniy.Firsov@sandisk.com> 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@digiware.nl> 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@vger.kernel.org
>>>> 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

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).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cmake build. C compiler.
  2016-09-22 23:02       ` Evgeniy Firsov
@ 2016-09-23 11:12         ` kefu chai
  2016-09-27 19:31           ` Evgeniy Firsov
  0 siblings, 1 reply; 7+ messages in thread
From: kefu chai @ 2016-09-23 11:12 UTC (permalink / raw)
  To: Evgeniy Firsov; +Cc: ceph-devel

On Fri, Sep 23, 2016 at 7:02 AM, Evgeniy Firsov
<Evgeniy.Firsov@sandisk.com> wrote:
> Kefu,
>
> You are right. My statement was wrong. I found that the problem was in
> NDEBUG handling in ZS code.
> However, do you know if there is a way to build “in tree”, I mean as we
> did with auto tools, without creating “build” directory?

why would you want to build "in tree"? because you don't want ceph's
"assert.h" to be include by ZS code?

>
> On 9/20/16, 11:04 PM, "kefu chai" <tchaikov@gmail.com> wrote:
>
>>On Tue, Sep 20, 2016 at 9:48 AM, Evgeniy Firsov
>><Evgeniy.Firsov@sandisk.com> 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@digiware.nl> 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@vger.kernel.org
>>>>> 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
>
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cmake build. C compiler.
  2016-09-23 11:12         ` kefu chai
@ 2016-09-27 19:31           ` Evgeniy Firsov
  0 siblings, 0 replies; 7+ messages in thread
From: Evgeniy Firsov @ 2016-09-27 19:31 UTC (permalink / raw)
  To: kefu chai; +Cc: ceph-devel


On 9/23/16, 4:12 AM, "kefu chai" <tchaikov@gmail.com> wrote:

>On Fri, Sep 23, 2016 at 7:02 AM, Evgeniy Firsov
><Evgeniy.Firsov@sandisk.com> wrote:
>> Kefu,
>>
>> You are right. My statement was wrong. I found that the problem was in
>> NDEBUG handling in ZS code.
>> However, do you know if there is a way to build “in tree”, I mean as we
>> did with auto tools, without creating “build” directory?
>
>why would you want to build "in tree"? because you don't want ceph's
>"assert.h" to be include by ZS code?
I just miss the convenience of running “make" anywhere in the tree.
>>
>> On 9/20/16, 11:04 PM, "kefu chai" <tchaikov@gmail.com> wrote:
>>
>>>On Tue, Sep 20, 2016 at 9:48 AM, Evgeniy Firsov
>>><Evgeniy.Firsov@sandisk.com> 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@digiware.nl> 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@vger.kernel.org
>>>>>> 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
>>
>> 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

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).

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-27 20:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 21:37 Cmake build. C compiler Evgeniy Firsov
2016-09-19 22:00 ` Willem Jan Withagen
2016-09-20  1:48   ` Evgeniy Firsov
2016-09-21  6:04     ` kefu chai
2016-09-22 23:02       ` Evgeniy Firsov
2016-09-23 11:12         ` kefu chai
2016-09-27 19:31           ` Evgeniy Firsov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.