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

Build fails: error: result of comparison of constant 18446744073709551615 with expression of type 'size_t' #310

Closed
yurivict opened this issue Jan 18, 2020 · 9 comments

Comments

@yurivict
Copy link

It fails on the i386 architecture:
http://beefy5.nyi.freebsd.org/data/120i386-default/523384/logs/abyss-2.2.3.log

@jwcodee
Copy link
Member

jwcodee commented Jan 22, 2020

Hmm, we have CI for 32-bit systems so I'm not sure why that is happening but I'll look into it

@jwcodee
Copy link
Member

jwcodee commented Jan 30, 2020

What is "c++" you are using? is that an alias for g++

@stale
Copy link

stale bot commented Feb 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Feb 20, 2020
@yurivict
Copy link
Author

c++ is clang8

@stale stale bot removed the stale label Feb 20, 2020
@stale
Copy link

stale bot commented Mar 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Mar 12, 2020
@yurivict
Copy link
Author

@jowong4 So what's the resolution of this?

@stale stale bot removed the stale label Mar 12, 2020
@sjackman
Copy link
Collaborator

clang compiler on i386 architecture is not a supported target of ABySS. A PR to fix the issue is welcome if you are able to find a fix.

@jwcodee
Copy link
Member

jwcodee commented Apr 6, 2020

@sjackman I had considered blanket substituting all size_t to uint64_t so that this never happens anymore but I recall you said the solution is non-ideal.

@sjackman
Copy link
Collaborator

sjackman commented Apr 6, 2020

No, it's not ideal. The C++ standard library uses size_t as the type of variables that represent a count or index into an array, such as vector.size. http://www.cplusplus.com/reference/vector/vector/size/

It's best in my opinion to stick with that convention. The alternative is a lot of casting from size_t to uint64_t and back when interacting with the standard library.

When a value represents not an index into an array, but is instead a counter (like a count of the number of observed k-mers), and that counter is likely to exceed a billion, then it's better to use a uint64_t.

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

3 participants