phylonium icon indicating copy to clipboard operation
phylonium copied to clipboard

Additional fix for 32-bit systems.

Open mr-c opened this issue 1 year ago • 4 comments

Thank you for https://github.com/EvolBioInf/phylonium/commit/a47612628b2b2c8366d2df98f5da527849ab544a ; I had to add the contents of this PR as well to fix the 32-bit builds of Phylonium for Debian.

Possibly this was also needed because we define -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 on armel/armhf?

mr-c avatar Mar 29 '24 11:03 mr-c

Thanks for your continued effort on this. Could you give me the error you get on arm? I was certain that with my change it should have been fixed.

kloetzl avatar Mar 29 '24 14:03 kloetzl

Ah, so I think the problem here is the following. On 32bit systems saidx64_t is bigger than size_t. Hence the shift is larger than the underlying type and produces a warning. (Not sure why debian gets a build failure without seeing the error. I hope they don't compile with -Werror?) The better fix would be to shift left depending on min(sizeof(size_t), sizeof(saidx64_t)).

Then there is also the more subtle issue of trying to read a sequence that doesn't fit into memory/size_t. Not sure what is the best way to prevent that.

kloetzl avatar Apr 12 '24 16:04 kloetzl

Hi, I've pushed my version of a fix. Could you check if that solves it the Debian side?

kloetzl avatar May 11 '24 15:05 kloetzl

@kloetzl https://github.com/EvolBioInf/phylonium/commit/f1463b795b66687a59714326918f8c81832c0c57 ? Okay, I'll do a test later this weekend, thanks!

mr-c avatar May 11 '24 17:05 mr-c