Cmake build. C compiler.
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).
Quoted 6 lines · Evgeniy Firsov
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.
Quoted 8 lines
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.hwhich 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
Quoted 11 lines
‹
EvgeniyPLEASE 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
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.
Quoted 24 lines · Willem Jan Withagen
Quoted 12 lines · Evgeniy Firsov
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¹sassert.hwhich is C++.Quoted 4 lines
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:
Quoted 27 lines
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
Quoted 19 lines
‹
EvgeniyPLEASE 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 [email protected]
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).
Quoted 4 lines · Evgeniy Firsov
It has nothing to do with compilers.
There is a bug in NDEBUG handling in ZetaScale, which Ceph’s CmakeLists.txt passes down.
Quoted 10 lines
And “in tree” build just uses wrong include paths, I guess.
Quoted 6 lines · Willem Jan Withagen
Quoted 5 lines · Evgeniy Firsov
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.
Quoted 1 line
Quoted 1 line
Quoted 1 line
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?
Quoted 46 lines
Quoted 17 lines
Quoted 10 lines
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¹sassert.hwhich 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:
Quoted 27 lines
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
Quoted 19 lines
‹
EvgeniyPLEASE 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlPLEASE 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).
Signature · 2 lines
Regards Kefu Chai
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?
Quoted 109 lines · kefu chai
Quoted 4 lines · Evgeniy Firsov
It has nothing to do with compilers.
There is a bug in NDEBUG handling in ZetaScale, which Ceph’s CmakeLists.txt passes down.Quoted 11 lines
And “in tree” build just uses wrong include paths, I guess.
Quoted 7 lines · Willem Jan Withagen
Quoted 6 lines · Evgeniy Firsov
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.cis 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(quoted diff) +0
-10-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.
Quoted 1 line
Quoted 1 line
Quoted 1 line
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?
Quoted 48 lines
Quoted 18 lines
Quoted 11 lines
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¹sassert.hwhich 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:
Quoted 29 lines
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
Quoted 21 lines
‹
EvgeniyPLEASE 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 9 lines
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).
Quoted 3 lines
--
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).
Quoted 6 lines · Evgeniy Firsov
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?
Quoted 117 lines · kefu chai
Quoted 110 lines
Quoted 4 lines · Evgeniy Firsov
It has nothing to do with compilers.
There is a bug in NDEBUG handling in ZetaScale, which Ceph’s CmakeLists.txt passes down.Quoted 11 lines
And “in tree” build just uses wrong include paths, I guess.
Quoted 7 lines · Willem Jan Withagen
Quoted 6 lines · Evgeniy Firsov
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.cis 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(quoted diff) +0
-10-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.
Quoted 1 line
Quoted 1 line
Quoted 1 line
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?
Quoted 48 lines
Quoted 18 lines
Quoted 11 lines
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¹sassert.hwhich 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:
Quoted 29 lines
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
Quoted 21 lines
‹
EvgeniyPLEASE 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 9 lines
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).
Quoted 3 lines
--
Regards
Kefu ChaiPLEASE 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).
Signature · 2 lines
Regards Kefu Chai
Quoted 11 lines · kefu chai
Quoted 6 lines · Evgeniy Firsov
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.
Quoted 137 lines
Quoted 125 lines · kefu chai
Quoted 119 lines
Quoted 4 lines · Evgeniy Firsov
It has nothing to do with compilers.
There is a bug in NDEBUG handling in ZetaScale, which Ceph’s CmakeLists.txt passes down.Quoted 12 lines
And “in tree” build just uses wrong include paths, I guess.
Quoted 8 lines · Willem Jan Withagen
Quoted 7 lines · Evgeniy Firsov
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.cis 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(quoted diff) +0
-10-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.
Quoted 1 line
Quoted 1 line
Quoted 1 line
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?
Quoted 55 lines
Quoted 20 lines
Quoted 8 lines
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¹sassert.hwhich is C++.Quoted 5 lines
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:
Quoted 34 lines
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
Quoted 25 lines
‹
EvgeniyPLEASE 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 10 lines
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).Quoted 3 lines
--
Regards
Kefu ChaiQuoted 9 lines
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).
Quoted 3 lines
--
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).