Project

General

Profile

Actions

Bug #14788

closed

librados (C++) linker error (undefined reference)

Added by Jesse Williamson about 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
infernalis
Regression:
Yes
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When compiling a patched librados C++ example (or other C++ programs-- see included patchfile), pointing to the headers in the git repository causes linker errors
against librados (note that the stock Makefile uses only the system-wide headers and libraries, so here we're manually pointing at
the local build):

g++ -g -c hello_world.cc -o hello_world.o -std=c++0x -I../../src/include
g++ -I../../src/include -g hello_world.o -o librados_hello_world -Wl,-rpath,../../../ceph/src/.libs -L../../../ceph/src/.libs/ -lrados
hello_world.o: In function `ceph::buffer::list::iterator_impl<false>::iterator_impl(ceph::buffer::list*, unsigned int)':
/home/jwilliamson/work/ceph/ceph/examples/librados/../../src/include/rados/buffer.h:289: undefined reference to `ceph::buffer::list::iterator_impl<false>::advance(int)'

Using the system-wide headers results in successful linkage:
g++ -g -c hello_world.cc -o hello_world.o -std=c++0x
g++ -g hello_world.o -o librados_hello_world -Wl,-rpath,../../../ceph/src/.libs -L../../../ceph/src/.libs/ -lrados


Files


Related issues 2 (0 open2 closed)

Related to Ceph - Bug #13429: bufferlist::iterator no longer ABI compatibleResolvedJason Dillaman10/09/2015

Actions
Copied to Ceph - Backport #14916: infernalis: librados (C++) linker error (undefined reference)RejectedNathan CutlerActions
Actions

Also available in: Atom PDF