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

axl.h redefines kvtree typedef, XLC doesn't like it #89

Open
robertkb opened this issue Dec 16, 2020 · 3 comments
Open

axl.h redefines kvtree typedef, XLC doesn't like it #89

robertkb opened this issue Dec 16, 2020 · 3 comments
Assignees

Comments

@robertkb
Copy link

The CI test for the cmake build on Lassen is failing now. It looks like some typedef issue between KVTree and AXL, or possibly some changed defaults on the IBM compiler. I'm pretty sure I can fix this with some tweaks to the .h file (wrapping the typedef in a #ifdef would probably do it), or by adjusting some compiler flags on Lassen.

@robertkb
Copy link
Author

Redefining typedefs is legal in C11, but not in C99. XLC enforces this by default, but can be switched to C11 with compiler flags.

Unfortunately, adding #ifndef KVTREE_H to axl.h won't fix the problem. Sometimes, kvtree.h gets loaded before axl.h, in which case wrapping the axl definition avoids the redefinition. But other times, kvtree.h is loaded after axl.h, in which case kvtree.h sees the axl.h definition and also produces the error.

If we added a kvtree_def.h to kvtree.h which only included the typedef line, wrapped with a standard #ifndef, then always include that file in kvtree.h, axl.h, and anywhere else the typedef is needed, the conflict would be resolved, but that requires changes to KVTree.

I'm also seeing the error with some other component libraries. I don't have the comprehensive list yet.

@robertkb robertkb assigned adammoody and robertkb and unassigned adammoody and robertkb Dec 16, 2020
@robertkb
Copy link
Author

@rhaas80, @adammoody, I'm moving the discussion here from email.

@robertkb
Copy link
Author

I get warning messages in redset, shuffile, and er, but not errors. Perhaps they have more permissive flags set in their cmake setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants