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

Build failure when including tests and -Wl,--no-undefined #857

Closed
kgizdov opened this issue Nov 17, 2018 · 1 comment
Closed

Build failure when including tests and -Wl,--no-undefined #857

kgizdov opened this issue Nov 17, 2018 · 1 comment
Assignees

Comments

@kgizdov
Copy link
Contributor

kgizdov commented Nov 17, 2018

OS: ArchLinux x86_64
GCC: 8.2.1

When building with following config:

mkdir -p "build"
cd "build"
LDFLAGS+="-Wl,--no-undefined" \
cmake -DCMAKE_BUILD_TYPE:STRING=Release \
      -DCMAKE_INSTALL_LIBDIR:PATH=lib \
      -DCMAKE_INSTALL_PREFIX:PATH=/usr \
      -DBUILD_TESTS=1 \
      -DCPPUNIT_FOUND=1 \
      -DCPPUNIT_INCLUDE_DIRS=/usr/include \
      -DCPPUNIT_LIBRARIES=/usr/lib/libcppunit.so \
      -DXRD_PYTHON_REQ_VERSION=3.7 \
      ../

build fails with:

Scanning dependencies of target XrdPosix
[ 80%] Building CXX object src/CMakeFiles/XrdPosix.dir/XrdPosix/XrdPosixAdmin.cc.o
gcc -pthread -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/home/gizdov/builds/xrootd/src/xrootd-4.8.5/src -I/home/gizdov/builds/xrootd/src/build/src -I/usr/include/python2.7 -c /home/gizdov/builds/xrootd/src/xrootd-4.8.5/bindings/python/src/PyXRootDCopyProcess.cc -o build/temp.linux-x86_64-2.7/home/gizdov/builds/xrootd/src/xrootd-4.8.5/bindings/python/src/PyXRootDCopyProcess.o -g
[ 80%] Linking CXX executable xrdpfc_print
[ 80%] Built target xrdpfc_print
[ 80%] Linking CXX shared module libXrdThrottle-4.so
Scanning dependencies of target XrdSsiLib
[ 80%] Linking CXX shared module libXrdClProxyPlugin-4.so
[ 80%] Building CXX object src/CMakeFiles/XrdSsiLib.dir/XrdSsi/XrdSsiAlert.cc.o
[ 80%] Built target XrdClProxyPlugin-4
[ 80%] Linking CXX shared library libXrdClTestsHelper.so
[ 80%] Built target XrdThrottle-4
[ 80%] Building CXX object src/CMakeFiles/XrdSsiLib.dir/XrdSsi/XrdSsiClient.cc.o
[ 80%] Building CXX object src/CMakeFiles/XrdPosix.dir/XrdPosix/XrdPosixCallBack.cc.o
/usr/bin/ld: CMakeFiles/XrdClTestsHelper.dir/Server.cc.o: in function `XrdClTests::Server::HandleConnections()':
Server.cc:(.text+0xa45): undefined reference to `XrdNetUtils::IPFormat(int, char*, int, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [tests/common/CMakeFiles/XrdClTestsHelper.dir/build.make:117: tests/common/libXrdClTestsHelper.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:3028: tests/common/CMakeFiles/XrdClTestsHelper.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
@abh3
Copy link
Member

abh3 commented Feb 18, 2020

I think this has been resolved. Please reopen if this is still an issue.

@abh3 abh3 closed this as completed Feb 18, 2020
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

3 participants