Skip to content

cmake: check for aligned_alloc() instead of checking tcmalloc version - #18557

Merged
dillaman merged 1 commit into
ceph:masterfrom
tchaikov:wip-cmake-cleanup
Oct 27, 2017
Merged

dillaman merged 1 commit into
ceph:masterfrom
tchaikov:wip-cmake-cleanup

Conversation

@tchaikov

@tchaikov tchaikov commented Oct 26, 2017 •

Copy link
Copy Markdown
Contributor

@tchaikov

Copy link
Copy Markdown
Contributor Author

@dillaman it's the follow-up of #17788 (comment)

@tchaikov

Copy link
Copy Markdown
Contributor Author

retest this please.

@dillaman dillaman left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to work in my Fedora 26 environment. I downgraded back to 2.5.93-1.fc26 and it passed this test

@dillaman

Copy link
Copy Markdown

... adding -nostdlib helped for me:

/usr/bin/ld: /tmp/ccZ56GEj.o: undefined reference to symbol 'aligned_alloc@@GLIBC_2.16'

@tchaikov

tchaikov commented Oct 26, 2017 •

Copy link
Copy Markdown
Contributor Author

This doesn't seem to work in my Fedora 26 environment.

@dillaman weird ... did you remove your CMakeCache.txt before rerunning cmake. i tested with gperftools master HEAD and 2.5.93, it works. tcmalloc 2.5.93 should assert in free() , because the memory chunk is not allocated by it.

anyway, i updated the code to mimic the scenario of rocksdb . hopefully it will work for you.

if it does not, i will just add -nostdlib.

@dillaman

Copy link
Copy Markdown

@tchaikov w/ the updated commit, it fails regardless if I have the broken or fixed gperftools RPMs installed

@tchaikov

tchaikov commented Oct 26, 2017 •

Copy link
Copy Markdown
Contributor Author

@dillaman thanks for testing. i just fixed a typo stdlib => stdlib.h. could you try it again?

@dillaman

Copy link
Copy Markdown

@tchaikov both the bad and good RPMs are now permitted

@tchaikov

Copy link
Copy Markdown
Contributor Author

@dillaman fixed and repushed. i have no idea why the "bad" RPM passes w/o debugging it in a fc26 env. probably will leave it for a boring week-end.

@dillaman

Copy link
Copy Markdown

@tchaikov Thanks -- latest commit works for me now:

bad RPMs:

-- Performing Test HAVE_ALIGNED_ALLOC - Failed

good RPMs:

-- Performing Test HAVE_ALIGNED_ALLOC - Success

@dillaman

Copy link
Copy Markdown

@tchaikov ... of course, the second I type "works for me", Jenkins reports that it failed on tcmalloc 2.4

@tchaikov

Copy link
Copy Markdown
Contributor Author

changelog

  • do check_aligned_alloc() only if tcmalloc's version is greater than 2.5

in case developer is using patched tcmalloc.

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov

Copy link
Copy Markdown
Contributor Author

@dillaman i moved the cmake cleanup stuff into #18576. hopefully it'd be easier to review.

@dillaman dillaman left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm -- running it through a Jenkins build right now

@dillaman
dillaman merged commit 900f1c0 into ceph:master Oct 27, 2017
@tchaikov
tchaikov deleted the wip-cmake-cleanup branch October 27, 2017 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants