Print

Print


There is a difference in behavior after commit 9e01966 which stops propagation of CXXFLAGS to the build of Python bindings in certain cases. Reverting this commit fixed a problem I observed while testing a build on macOS (where I am using Python 3.9), where the flags for setting the C++ standard were not being propagated, leading to the error below:

$ cd bindings/python
$ python3 -m pip wheel --verbose .
...
  /usr/bin/gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/tmp/xrootd/xrootd/src -I/tmp/xrootd/xrootd_build/src -I/Users/Shared/cvmfs/sft.cern.ch/lcg/releases/Python/3.9.12-7971d/arm64-mac12-clang131-opt/include/python3.9 -c /tmp/xrootd/xrootd/bindings/python/src/PyXRootDCopyProcess.cc -o build/temp.macosx-12.4-arm64-3.9/tmp/xrootd/xrootd/bindings/python/src/PyXRootDCopyProcess.o -g
  In file included from /tmp/xrootd/xrootd/bindings/python/src/PyXRootDCopyProcess.cc:26:
  In file included from /tmp/xrootd/xrootd/bindings/python/src/PyXRootDCopyProcess.hh:30:
  In file included from /tmp/xrootd/xrootd/src/XrdCl/XrdClCopyProcess.hh:29:
  In file included from /tmp/xrootd/xrootd/src/XrdCl/XrdClXRootDResponses.hh:22:
  /tmp/xrootd/xrootd/src/XrdCl/XrdClBuffer.hh:50:22: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
        Buffer( Buffer &&buffer )
                       ^
  /tmp/xrootd/xrootd/src/XrdCl/XrdClBuffer.hh:58:33: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
        Buffer& operator=( Buffer && buffer )
                                  ^
  /tmp/xrootd/xrootd/src/XrdCl/XrdClBuffer.hh:249:26: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
        void Steal( Buffer &&buffer )
                           ^
  In file included from /tmp/xrootd/xrootd/bindings/python/src/PyXRootDCopyProcess.cc:26:
  In file included from /tmp/xrootd/xrootd/bindings/python/src/PyXRootDCopyProcess.hh:30:
  In file included from /tmp/xrootd/xrootd/src/XrdCl/XrdClCopyProcess.hh:29:
  /tmp/xrootd/xrootd/src/XrdCl/XrdClXRootDResponses.hh:289:16: error: no template named 'tuple' in namespace 'std'
    typedef std::tuple<std::string, std::string> xattr_t;
            ~~~~~^
... (many more errors follow due to C++14 not being used)

In part, build/install failures have been masked by the fact that make install didn't fail (i.e. returned 0) even when the call to pip install for the Python bindings failed, which I am fixing in #1822, by checking the return status of the installation of the Python bindings.

On Linux, using Python 3.10 and regardless of commit 9e01966 being reverted or not I don't see the CMAKE_CXX_FLAGS in the wheel build flags, even when I use cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ... to configure (at least -O2 -g should have been there). I also added -DCMAKE_CXX_FLAGS=-fno-omit-frame-pointer and that flag doesn't appear in the compilation either.

I think it may be worth the effort to write a more modern setup for building/installing the Python bindings, so that we restore consistent behavior across the various versions of Python and OSs that are supported.

@simonmichal What do you think?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <xrootd/xrootd/issues/1807/1308881857@github.com>

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/issues/1807#issuecomment-1308881857", "url": "https://github.com/xrootd/xrootd/issues/1807#issuecomment-1308881857", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1