Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation warnings #96

Closed
peremato opened this issue Mar 14, 2014 · 9 comments
Closed

Compilation warnings #96

peremato opened this issue Mar 14, 2014 · 9 comments
Assignees

Comments

@peremato
Copy link

When compiling version 3.3.6 on MacOSX 10.9 with clang I get zillions of warnings as the attached ones.
Do I need to configure specially?
Cheers,
Pere

---------------------------------------------------------------
pb-d-128-141-25-236:XROOTD-build mato$ make
-- Could NOT find SWIG (missing:  SWIG_EXECUTABLE SWIG_DIR) 
-- Could NOT find LibEvent (missing:  LIBEVENT_INCLUDE_DIR) 
-- ----------------------------------------
-- Installation path: /Users/mato/Development/ROOT/root.master
-- C Compiler:        /Users/mato/Development/clang
-- C++ Compiler:      /Users/mato/Development/clang++
-- Build type:        RelWithDebInfo
-- 
-- Readline support:  yes
-- Fuse support:      disabled
-- Crypto support:    yes
-- Kerberos5 support: yes
-- Perl support:      yes
-- XrdCl:             yes
-- LibEvent support:  disabled
-- Tests:             disabled
-- ----------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD-build
[I] No git repository info found. Trying to interpret VERSION_INFO
[I] src/XrdVersion.hh successfully generated
[  0%] Built target XrdVersion.hh
[  1%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysDNS.cc.o
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysDNS.cc:61:41: warning: missing field 'ai_family' initializer [-Wmissing-field-initializers]
   struct addrinfo myhints = {0x00000002};
                                        ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysDNS.cc:400:33: warning: missing field 'ai_family' initializer [-Wmissing-field-initializers]
    struct addrinfo myhints = {0};
                                ^
2 warnings generated.
[  1%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysDir.cc.o
[  1%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysPlugin.cc.o
[  2%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysPriv.cc.o
[  2%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysPlatform.cc.o
[  2%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysPthread.cc.o
[  2%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysTimer.cc.o
[  3%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysUtils.cc.o
[  3%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysXSLock.cc.o
[  3%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysFAttr.cc.o
[  3%] Building CXX object src/CMakeFiles/XrdUtils.dir/XrdSys/XrdSysIOEvents.cc.o
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:154:29: warning: unused parameter 'syncp' [-Wunused-parameter]
void Begin(XrdSysSemaphore *syncp, int &rc, const char **eTxt) {}
                            ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:154:41: warning: unused parameter 'rc' [-Wunused-parameter]
void Begin(XrdSysSemaphore *syncp, int &rc, const char **eTxt) {}
                                        ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:154:58: warning: unused parameter 'eTxt' [-Wunused-parameter]
void Begin(XrdSysSemaphore *syncp, int &rc, const char **eTxt) {}
                                                         ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:156:23: warning: unused parameter 'cP' [-Wunused-parameter]
void Exclude(Channel *cP, bool &isLocked, bool dover=1) {}
                      ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:156:33: warning: unused parameter 'isLocked' [-Wunused-parameter]
void Exclude(Channel *cP, bool &isLocked, bool dover=1) {}
                                ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:156:48: warning: unused parameter 'dover' [-Wunused-parameter]
void Exclude(Channel *cP, bool &isLocked, bool dover=1) {}
                                               ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:158:63: warning: unused parameter 'isLocked' [-Wunused-parameter]
bool Include(Channel *cP, int &eNum, const char **eTxt, bool &isLocked)
                                                              ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:164:63: warning: unused parameter 'isLocked' [-Wunused-parameter]
bool Modify (Channel *cP, int &eNum, const char **eTxt, bool &isLocked)
                                                              ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:193:29: warning: unused parameter 'syncp' [-Wunused-parameter]
void Begin(XrdSysSemaphore *syncp, int &rc, const char **eTxt) {}
                            ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:193:41: warning: unused parameter 'rc' [-Wunused-parameter]
void Begin(XrdSysSemaphore *syncp, int &rc, const char **eTxt) {}
                                        ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:193:58: warning: unused parameter 'eTxt' [-Wunused-parameter]
void Begin(XrdSysSemaphore *syncp, int &rc, const char **eTxt) {}
                                                         ^
/Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD/src/XrdSys/XrdSysIOEvents.cc:195:23: warning: unused parameter 'cP' [-Wunused-parameter]
void Exclude(Channel *cP, bool &isLocked, bool dover=1) {}
 ....
@ljanyst
Copy link
Contributor

ljanyst commented Mar 14, 2014

No, you don't need anything special on Mac. We don see these warnings in TeamCity... Must be defaults of new clang, which version are you using?

@ljanyst
Copy link
Contributor

ljanyst commented Mar 14, 2014

Do you pass extra CXXFLAGS?

@peremato
Copy link
Author

Hi Lukasz,

I do pass the CMAKE_CXX_FLAGS from ROOT to it. I am using the ExternalProject like this:

ExternalProject_Add(
XROOTD
URL http://xrootd.org/download/v${xrootd_version}/xrootd-${xrootd_version}.tar.gz
INSTALL_DIR ${CMAKE_BINARY_DIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)

This produces the following configuration command:

cmake -DCMAKE_INSTALL_PREFIX:PATH=/Users/mato/Development/ROOT/root.master -DCMAKE_C_COMPILER=/Users/mato/Development/clang “-DCMAKE_C_FLAGS= -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments" -DCMAKE_CXX_COMPILER=/Users/mato/Development/clang++ "-DCMAKE_CXX_FLAGS= -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -stdlib=libc++" "-GUnix Makefiles" /Users/mato/Development/ROOT/root.master/XROOTD-prefix/src/XROOTD

Cheers,

Pere

On 14 Mar 2014, at 16:44, Lukasz Janyst <notifications@github.commailto:notifications@github.com> wrote:

Do you pass extra CXXFLAGS?


Reply to this email directly or view it on GitHubhttps://github.com//issues/96#issuecomment-37662085.


Pere Mato CERN, PH Department, CH 1211 Geneva 23, Switzerland
e-mail: pere.mato@cern.chmailto:pere.mato@cern.ch tel: +41 22 76 78696
fax: +41 22 76 68792 gsm: +41 76 48 70855

@ljanyst
Copy link
Contributor

ljanyst commented Mar 14, 2014

Yup, that's the reason. This warning is rather silly, but we will likely fix all this stuff gradually in 4.x anyways.

BTW. Why are you compiling XRootD with ROOT? The agreement was that it will be treated as an external dependency?

Lukasz

@peremato
Copy link
Author

Hi Lukasz,

It is used as external by default in the CMake build. But, if you configure with builtin_xrootd=ON then I download it and I build as external project at the same time as ROOT.
Cheers,

Pere

On 14 Mar 2014, at 17:13, Lukasz Janyst <notifications@github.commailto:notifications@github.com> wrote:

Yup, that's the reason. This warning is rather silly, but we will likely fix all this stuff gradually in 4.x anyways.

BTW. Why are you compiling XRootD with ROOT? The agreement was that it will be treated as an external dependency?

Lukasz


Reply to this email directly or view it on GitHubhttps://github.com//issues/96#issuecomment-37665714.


Pere Mato CERN, PH Department, CH 1211 Geneva 23, Switzerland
e-mail: pere.mato@cern.chmailto:pere.mato@cern.ch tel: +41 22 76 78696
fax: +41 22 76 68792 gsm: +41 76 48 70855

@ljanyst
Copy link
Contributor

ljanyst commented Mar 14, 2014

OK, thanks for the clarification. Is it possible for you to add something like -Wno-unused-parameter to CXXFLAGS for the time being?

@peremato
Copy link
Author

Hi Lukasz,

This was not sufficient. There many other warnings. I had to remove -Wall and -W and add some additional flags to disable more.

I did it like this:

string(REPLACE "-Wall " "" __cxxflags "${CMAKE_CXX_FLAGS}") # Otherwise it produces tones of warnings
string(REPLACE "-W " "" __cxxflags "${__cxxflags} -Wno-deprecated-declarations -Wno-duplicate-decl-specifier")

Cheers,

Pere

On 14 Mar 2014, at 17:20, Lukasz Janyst <notifications@github.commailto:notifications@github.com> wrote:

OK, thanks for the clarification. Is it possible for you to add something like -Wno-unused-parameter to CXXFLAGS for the time being?


Reply to this email directly or view it on GitHubhttps://github.com//issues/96#issuecomment-37666524.


Pere Mato CERN, PH Department, CH 1211 Geneva 23, Switzerland
e-mail: pere.mato@cern.chmailto:pere.mato@cern.ch tel: +41 22 76 78696
fax: +41 22 76 68792 gsm: +41 76 48 70855

@ljanyst
Copy link
Contributor

ljanyst commented Mar 17, 2014

Hi Pere,

yes, we are aware about the other warnings. They are a result of recent change (and deprecation) of some of the ssl and kerberos APIs which affect our security plug-ins. These need to be investigated further and we will most likely need to rewrite this code.

Cheers,
Lukasz

@abh3 abh3 self-assigned this Jul 7, 2015
@abh3
Copy link
Member

abh3 commented Jul 7, 2015

I believe these issues have been resolved.

@abh3 abh3 closed this as completed Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants