Project

General

Profile

Bug #35682

34164d55c839acd35bbb1be5279e3e23e3bec1fd broke the librados examples

Added by Brad Hubbard over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Dev Interfaces
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

$ cd examples/librados
$ make
g++ -std=c++11 -Wno-unused-parameter -Wall -Wextra -Werror -g -I../../src/include -L../../build/lib/ -Wl,-rpath,../../build/lib -o hello_world_cpp hello_world.cc -lrados -lradosstriper                                                    
In file included from ../../src/include/rados/librados.hpp:10:0,
                 from hello_world.cc:14:
../../src/include/rados/buffer.h: In member function ‘void ceph::buffer::ptr::set_offset(unsigned int)’:
../../src/include/rados/buffer.h:351:7: error: ‘assert’ was not declared in this scope
       assert(raw_length() >= o);
       ^~~~~~
../../src/include/rados/buffer.h:351:7: note: suggested alternative: ‘assertf’
       assert(raw_length() >= o);
       ^~~~~~
       assertf
../../src/include/rados/buffer.h: In member function ‘void ceph::buffer::ptr::set_length(unsigned int)’:
../../src/include/rados/buffer.h:359:7: error: ‘assert’ was not declared in this scope
       assert(raw_length() >= l);
       ^~~~~~
../../src/include/rados/buffer.h:359:7: note: suggested alternative: ‘assertf’
       assert(raw_length() >= l);
       ^~~~~~
       assertf
make: *** [Makefile:29: hello_world_cpp] Error 1

Related issues

Related to Ceph - Feature #15100: qa: test building a librados application Resolved 03/12/2016

History

#1 Updated by Brad Hubbard over 5 years ago

  • Category set to librados

#2 Updated by John Spray over 5 years ago

I'm seeing the same thing.

I'm guessing that this is happening because the include of assert.h in buffer.h is picking up the Ceph one instead of the proper one.

We should probably rename assert.h to ceph_assert.h

#3 Updated by John Spray over 5 years ago

  • Project changed from Ceph to RADOS
  • Category changed from librados to Dev Interfaces

#4 Updated by Brad Hubbard over 5 years ago

Thanks John, That's one of the options I'm looking into.

#5 Updated by Brad Hubbard over 5 years ago

https://github.com/ceph/ceph/pull/24098

Working on a teuthology task to do a test build of the examples as well.

#6 Updated by Brad Hubbard over 5 years ago

  • Status changed from New to In Progress

#7 Updated by Nathan Cutler over 5 years ago

Brad Hubbard wrote:

Working on a teuthology task to do a test build of the examples as well.

@Brad: I already have https://github.com/ceph/ceph/pull/23131 open to do this.

#8 Updated by Nathan Cutler over 5 years ago

  • Related to Feature #15100: qa: test building a librados application added

#9 Updated by Sage Weil over 5 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF