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

make fails with error: parameter declared ‘auto’ #1524

Closed
iraklic opened this issue Oct 4, 2021 · 12 comments
Closed

make fails with error: parameter declared ‘auto’ #1524

iraklic opened this issue Oct 4, 2021 · 12 comments
Assignees

Comments

@iraklic
Copy link

iraklic commented Oct 4, 2021

I am trying to build xrootd on CentOS Linux release 7.9.2009 (Core). I hope this is the right forum, if not please point me to the right one (I was not able to find it). Below is the dump:

[ 28%] Building CXX object src/XrdCl/CMakeFiles/XrdCl.dir/XrdClFileStateHandler.cc.o
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc: In member function ‘XrdCl::XRootDStatus XrdCl::FileStateHandler::PgWrite(uint6                                                                                                                              4_t, uint32_t, const void*, std::vector<unsigned int>&, XrdCl::ResponseHandler*, uint16_t)’:
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1448:48: error: parameter declared ‘auto’
     auto h = ResponseHandler::Wrap( [=]( auto* s, auto* r ) mutable
                                                ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1448:57: error: parameter declared ‘auto’
     auto h = ResponseHandler::Wrap( [=]( auto* s, auto* r ) mutable
                                                         ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc: In lambda function:
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1450:46: error: ‘r’ was not declared in this scope
           std::unique_ptr<AnyObject> scoped( r );
                                              ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1453:16: error: ‘s’ was not declared in this scope
           if( !s->IsOK() )
                ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1464:31: error: ‘s’ was not declared in this scope
             pgwrt->SetStatus( s );
                               ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1467:18: error: ‘s’ was not declared in this scope
           delete s;
                  ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1484:56: error: parameter declared ‘auto’
             auto h = ResponseHandler::Wrap( [=]( auto *s, auto *r ) mutable
                                                        ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1484:65: error: parameter declared ‘auto’
             auto h = ResponseHandler::Wrap( [=]( auto *s, auto *r ) mutable
                                                                 ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc: In lambda function:
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1493:26: error: type ‘<type error>’ argument given to ‘delete’, expected pointe                                                                                                                              r
                   delete s;
                          ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc: In member function ‘XrdCl::XRootDStatus XrdCl::FileStateHandler::PgWrite(uint6                                                                                                                              4_t, uint32_t, const void*, std::vector<unsigned int>&, XrdCl::ResponseHandler*, uint16_t)’:
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1516:11: error: no matching function for call to ‘XrdCl::ResponseHandler::Wrap(                                                                                                                              XrdCl::FileStateHandler::PgWrite(uint64_t, uint32_t, const void*, std::vector<unsigned int>&, XrdCl::ResponseHandler*, uint16_t)::__lambda0)’
         } );
           ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1516:11: note: candidates are:
In file included from /global/homes/i/iraklic/xrootd/src/./XrdCl/XrdClFileStateHandler.hh:28:0,
                 from /global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:25:
/global/homes/i/iraklic/xrootd/src/./XrdCl/XrdClXRootDResponses.hh:1158:31: note: static XrdCl::ResponseHandler* XrdCl::ResponseHandler::Wrap(std                                                                                                                              ::function<void(XrdCl::XRootDStatus&, XrdCl::AnyObject&)>)
       static ResponseHandler* Wrap( std::function<void(XRootDStatus&, AnyObject&)> func );
                               ^
/global/homes/i/iraklic/xrootd/src/./XrdCl/XrdClXRootDResponses.hh:1158:31: note:   no known conversion for argument 1 from ‘XrdCl::FileStateHand                                                                                                                              ler::PgWrite(uint64_t, uint32_t, const void*, std::vector<unsigned int>&, XrdCl::ResponseHandler*, uint16_t)::__lambda0’ to ‘std::function<void(X                                                                                                                              rdCl::XRootDStatus&, XrdCl::AnyObject&)>’
/global/homes/i/iraklic/xrootd/src/./XrdCl/XrdClXRootDResponses.hh:1166:31: note: static XrdCl::ResponseHandler* XrdCl::ResponseHandler::Wrap(std                                                                                                                              ::function<void(XrdCl::XRootDStatus*, XrdCl::AnyObject*)>)
       static ResponseHandler* Wrap( std::function<void(XRootDStatus*, AnyObject*)> func );
                               ^
/global/homes/i/iraklic/xrootd/src/./XrdCl/XrdClXRootDResponses.hh:1166:31: note:   no known conversion for argument 1 from ‘XrdCl::FileStateHand                                                                                                                              ler::PgWrite(uint64_t, uint32_t, const void*, std::vector<unsigned int>&, XrdCl::ResponseHandler*, uint16_t)::__lambda0’ to ‘std::function<void(X                                                                                                                              rdCl::XRootDStatus*, XrdCl::AnyObject*)>’
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1522:14: error: type ‘<type error>’ argument given to ‘delete’, expected pointe                                                                                                                              r
       delete h;
              ^
/global/homes/i/iraklic/xrootd/src/XrdCl/XrdClFileStateHandler.cc:1525:3: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
cc1plus: all warnings being treated as errors
make[2]: *** [src/XrdCl/CMakeFiles/XrdCl.dir/XrdClFileStateHandler.cc.o] Error 1
make[1]: *** [src/XrdCl/CMakeFiles/XrdCl.dir/all] Error 2
make: *** [all] Error 2
@adriansev
Copy link
Contributor

Hi @iraklic ! are you aware of this? https://github.com/xrootd/xrootd/blob/v5.3.1/docs/ReleaseNotes.txt#L177
What compiler did you use?

@simonmichal
Copy link
Contributor

@adriansev : thanks for pointing this out! :-)

@iraklic : on Centos7 for the build to be successful you need to enable at least devtoolset-7:

scl enablde devtoolset-7 bash

this will give you the right compiler.

@iraklic
Copy link
Author

iraklic commented Oct 4, 2021

thanks for the replies. Looks like I will have to install devtoolset-7 and do it without sudo permission because scl enablde devtoolset-7 bash returns Unable to open /etc/scl/conf/devtoolset-7!

What is the easiest way to go by installing devtoolset without root permission. Just getting the rpm and doing rpm2cpio <devtoolset>.rmp | cpio -id only get me to having iraklic/centos/etc/yum.repos.d/CentOS-SCLo-scl-rh.repo but I cannot yum this repo without root, can I? I understand if this is not xrootd related question and does not belong here, but help is appreciated and might help others too. thanks

@adriansev
Copy link
Contributor

@iraklic there is a typo in command: it should be:
scl enable devtoolset-7 bash
but this will start a new shell; for scripts and usage in local shell and easier usage you can just do:
source /opt/rh/devtoolset-7/enable (also you can check for this file before hand to be sure that devtoolset is installed)

@iraklic
Copy link
Author

iraklic commented Oct 4, 2021

@adriansev devtoolset is not installed, hence my question about whether or not I can succeed installing it without root and if the answer is yes what is the most painless option. thanks

@xrootd-dev
Copy link

xrootd-dev commented Oct 4, 2021 via email

@iraklic
Copy link
Author

iraklic commented Oct 4, 2021

thank you all for the responses, I will try to get devtoolset in place one way or another and if all works will report back to close this thanks

@adriansev
Copy link
Contributor

@iraklic you can make use of software distributed by sft.cern.ch see /cvmfs/sft.cern.ch/README.md
you can try to do:
source /cvmfs/sft.cern.ch/lcg/contrib/gcc/7.3.0/x86_64-centos7/setup.sh and see how it goes

@iraklic
Copy link
Author

iraklic commented Oct 5, 2021

unfortunately cvmfs is not available as well :(

@adriansev
Copy link
Contributor

@iraklic well, then you can try in a vm to install the devtoolset and then copy it in a user-side location of that computer. AFAIK the enable script for activation is relative to it's own location, so if you put the content of /opt/rh/devtoolset-7 anywhere else it should work.
for building operations i begun to use containers instead of vms so you could also try those out.

@simonmichal
Copy link
Contributor

@iraklic : do you still need some assistance or can we close this issue?

@iraklic
Copy link
Author

iraklic commented Mar 10, 2022

You can close the issue. Thank you for all the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants