PelicanPlatform / xrdcl-pelican

A Pelican platform-based plugin for the XrdCl interface
Apache License 2.0
1 stars 3 forks source link

Unable to build in alma 8 container with g++ 8.5.0 and cmake 3.26.5 #6

Closed jhiemstrawisc closed 2 weeks ago

jhiemstrawisc commented 4 months ago

At some point, the build commands I had in my development Dockerfile stopped working for xrdcl-pelican:

RUN git clone https://github.com/PelicanPlatform/xrdcl-pelican.git && \
    cd xrdcl-pelican && \
    mkdir build && cd build && \
    cmake -DLIB_INSTALL_DIR=/usr/lib64 -DCMAKE_CXX_FLAGS="-std=c++14" .. && \
    make && make install

During my latest container rebuild, this started erroring on make, complaining about override functions that aren't actually overriding:

[ 14%] Building CXX object CMakeFiles/XrdClPelican.dir/src/CurlOps.cc.o
In file included from /xrdcl-pelican/src/CurlOps.cc:21:
/xrdcl-pelican/src/PelicanFile.hh:46:33: error: ‘virtual XrdCl::XRootDStatus Pelican::File::Open(const string&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, XrdCl::ResponseHandler*, uint16_t)’ marked ‘override’, but does not override
     virtual XrdCl::XRootDStatus Open(const std::string      &url,
                                 ^~~~
/xrdcl-pelican/src/PelicanFile.hh:52:33: error: ‘virtual XrdCl::XRootDStatus Pelican::File::Close(XrdCl::ResponseHandler*, uint16_t)’ marked ‘override’, but does not override
     virtual XrdCl::XRootDStatus Close(XrdCl::ResponseHandler *handler,
                                 ^~~~~
/xrdcl-pelican/src/PelicanFile.hh:55:33: error: ‘virtual XrdCl::XRootDStatus Pelican::File::Stat(bool, XrdCl::ResponseHandler*, uint16_t)’ marked ‘override’, but does not override
     virtual XrdCl::XRootDStatus Stat(bool                    force,
                                 ^~~~
/xrdcl-pelican/src/PelicanFile.hh:59:33: error: ‘virtual XrdCl::XRootDStatus Pelican::File::Read(uint64_t, uint32_t, void*, XrdCl::ResponseHandler*, uint16_t)’ marked ‘override’, but does not override
     virtual XrdCl::XRootDStatus Read(uint64_t                offset,
                                 ^~~~
/xrdcl-pelican/src/PelicanFile.hh:65:33: error: ‘virtual XrdCl::XRootDStatus Pelican::File::PgRead(uint64_t, uint32_t, void*, XrdCl::ResponseHandler*, uint16_t)’ marked ‘override’, but does not override
     virtual XrdCl::XRootDStatus PgRead(uint64_t                offset,
                                 ^~~~~~
make[2]: *** [CMakeFiles/XrdClPelican.dir/build.make:90: CMakeFiles/XrdClPelican.dir/src/CurlOps.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/XrdClPelican.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
jhiemstrawisc commented 4 months ago

I'll add this appears to be an issue tied to upstream XRootD. Previously I was building xrootd from source, but switching to whichever version gets installed with dnf resolved my problems.

bbockelm commented 3 months ago

XRootD devel branch now corresponds to a future XRootD 6.0.0. At the major version changes, they permit themselves API breakage (the class definitions had subtle changes which broke the overrides).

We'll probably have to start putting in some ifdef's into the codebase to represent the different major versions. For now, XRootD 6 isn't expected until fall/winter 2024 -- we have some time.