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

Missing #includes in Macaroons #1468

Closed
dmacks opened this issue Jun 18, 2021 · 0 comments
Closed

Missing #includes in Macaroons #1468

dmacks opened this issue Jun 18, 2021 · 0 comments

Comments

@dmacks
Copy link
Contributor

dmacks commented Jun 18, 2021

Building xrootd-4.12.6 on OS X 10.13 with all the libs that support macaroons available:

-- Macaroons support: yes
[...]
[ 80%] Building CXX object src/CMakeFiles/XrdMacaroons-4.dir/XrdMacaroons/XrdMacaroonsHandler.cc.o
cd /sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/build/src && /sw/var/lib/fink/path-prefix-clang/c++ -DHAVE_ATOMICS -DHAVE_CRYPT -DHAVE_CURL_MULTI_WAIT -DHAVE_DH_PADDED -DHAVE_FSTATAT -DHAVE_GETIFADDRS -DHAVE_LIBZ -DHAVE_NAMEINFO -DHAVE_READLINE -DHAVE_SSL -DHAVE_STRLCPY -DHAVE_TLS -DHAVE_TLS1 -DHAVE_TLS11 -DHAVE_TLS12 -DHAVE_XML2 -DHAVE_XRDCRYPTO -DLT_MODULE_EXT=\".dylib\" -DUSE_LIBC_SEMAPHORE=1 -DXRDPLUGIN_SOVERSION=\"4\" -DXrdMacaroons_4_EXPORTS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__macos__=1 -I/sw/include -I/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src/.. -I/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src/. -I/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src -I/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/build/src -I/usr/local/include -I/sw/include/json-c -MD -std=c++0x -DOPENSSL_NO_FILENAMES -Wno-deprecated-declarations -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -fPIC -MD -MT src/CMakeFiles/XrdMacaroons-4.dir/XrdMacaroons/XrdMacaroonsHandler.cc.o -MF CMakeFiles/XrdMacaroons-4.dir/XrdMacaroons/XrdMacaroonsHandler.cc.o.d -o CMakeFiles/XrdMacaroons-4.dir/XrdMacaroons/XrdMacaroonsHandler.cc.o -c /sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src/XrdMacaroons/XrdMacaroonsHandler.cc
/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src/XrdMacaroons/XrdMacaroonsHandler.cc:120:23: error: implicit instantiation of undefined template 'std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
    std::stringstream ss;
                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:126:32: note: template is declared here
    class _LIBCPP_TEMPLATE_VIS basic_stringstream;
                               ^

and several more of that same error in other lines. It's cured by adding #include <sstream>, which gets me further until:

cd /sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/build/src && /sw/var/lib/fink/path-prefix-clang/c++ -DHAVE_ATOMICS -DHAVE_CRYPT -DHAVE_CURL_MULTI_WAIT -DHAVE_DH_PADDED -DHAVE_FSTATAT -DHAVE_GETIFADDRS -DHAVE_LIBZ -DHAVE_NAMEINFO -DHAVE_READLINE -DHAVE_SSL -DHAVE_STRLCPY -DHAVE_TLS -DHAVE_TLS1 -DHAVE_TLS11 -DHAVE_TLS12 -DHAVE_XML2 -DHAVE_XRDCRYPTO -DLT_MODULE_EXT=\".dylib\" -DUSE_LIBC_SEMAPHORE=1 -DXRDPLUGIN_SOVERSION=\"4\" -DXrdMacaroons_4_EXPORTS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__macos__=1 -I/sw/include -I/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src/.. -I/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src/. -I/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src -I/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/build/src -I/usr/local/include -I/sw/include/json-c -MD -std=c++0x -DOPENSSL_NO_FILENAMES -Wno-deprecated-declarations -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -fPIC -MD -MT src/CMakeFiles/XrdMacaroons-4.dir/XrdMacaroons/XrdMacaroonsConfigure.cc.o -MF CMakeFiles/XrdMacaroons-4.dir/XrdMacaroons/XrdMacaroonsConfigure.cc.o.d -o CMakeFiles/XrdMacaroons-4.dir/XrdMacaroons/XrdMacaroonsConfigure.cc.o -c /sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src/XrdMacaroons/XrdMacaroonsConfigure.cc
/sw/build.build/xrootd4-4.12.6-1/xrootd-4.12.6/src/XrdMacaroons/XrdMacaroonsConfigure.cc:47:32: error: use of undeclared identifier 'errno'
    return log->Emsg("Config", errno, "open config file", config);
                               ^

and again several more such. #include <errno.h> cures it.

I know xrootd4 is headed for EOL, but this same code (and lack of those includes) appear in the latest file in git.

@dmacks dmacks changed the title Missing #include in XrdMacaroons.cc Missing #includes in Macaroons Jun 18, 2021
gganis pushed a commit to gganis/xrootd that referenced this issue Nov 23, 2021
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

1 participant