Missing glibc 2.6 prereq for HAVE_ATOMIC dependency #1456

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@reflection
Contributor

reflection commented Dec 9, 2013

We have an environment where GCC > 4.0.1 (4.1.2) but glibc < 2.6 (2.5) (I know, weird). Thus linking would fail because even though HAVE_ATOMIC was set to true, there is no 'sync_add_and_fetch' . The simple one-line change is to also require glibc 2.6.

@antirez

This comment has been minimized.

Show comment Hide comment
@antirez

antirez Dec 12, 2013

Owner

Hello, when we test for GLIBC features, we test that actually GLIBC is being used and that the macro __GLIBC_PREREQ is defined, like that:

#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
#if (LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6))
#define HAVE_SYNC_FILE_RANGE 1
#endif

Please could you make the change and test in your target system? I know it is trivial and I could make it but it is a good thing if we can get it tested in the target system. Thanks!

Owner

antirez commented Dec 12, 2013

Hello, when we test for GLIBC features, we test that actually GLIBC is being used and that the macro __GLIBC_PREREQ is defined, like that:

#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
#if (LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6))
#define HAVE_SYNC_FILE_RANGE 1
#endif

Please could you make the change and test in your target system? I know it is trivial and I could make it but it is a good thing if we can get it tested in the target system. Thanks!

@reflection

This comment has been minimized.

Show comment Hide comment
@reflection

reflection Dec 14, 2013

Contributor

Your simple addition worked just fine on the 32-bit system I was testing on, thanks. I updated the pull request.

Contributor

reflection commented Dec 14, 2013

Your simple addition worked just fine on the 32-bit system I was testing on, thanks. I updated the pull request.

@reflection

This comment has been minimized.

Show comment Hide comment
@reflection

reflection Jan 3, 2014

Contributor

Bumping in hopes this will be pulled in soon. Thanks.

Contributor

reflection commented Jan 3, 2014

Bumping in hopes this will be pulled in soon. Thanks.

mattsta added a commit to mattsta/redis that referenced this pull request Aug 2, 2014

Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456

mattsta added a commit to mattsta/redis that referenced this pull request Aug 2, 2014

Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456

@mattsta mattsta referenced this pull request Aug 2, 2014

Closed

ALL simple issue fixes #1906

mattsta added a commit to mattsta/redis that referenced this pull request Aug 6, 2014

Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456

@antirez antirez closed this in 7e9f24d Aug 25, 2014

antirez added a commit that referenced this pull request Aug 26, 2014

Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456

antirez added a commit that referenced this pull request Aug 27, 2014

Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment