-
Notifications
You must be signed in to change notification settings - Fork 101
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 with LTO #474
Comments
Thanks for flagging this issue. We will be looking to implement a fix to address this issue. |
@eli-schwartz can you see if https://github.com/bcgsc/abyss/tree/tlo addresses your issue? |
There are 3 definitions:
It looks like your tree changes the second one from char to int, which means now the third is the odd one out. |
I noticed that too, but I didn't see assemble.c including the dialign.h header so I didn't change the char there. What parts of the build script did you add the following flags: |
I don't think it has to? assemble.c has the (only) function implementation and that appears early on in the file before any actual uses.
It was exported before running configure, so it applies to all sources. |
Keep in mind that what LTO is doing here is simply being a massively global optimization pass that is able to keep track of the entire linked program, including full type info, all at the same time. This means that it can double check that the symbol from assemble.c is compatible with the prototype in dialign.h and the additional prototype in museq.c Since they are all referring to the same outputted machine code symbol anyway, they have to be compatible or the compiler might generate faulty code. Often, this passes silently if prototypes are incorrect. Due to the greatly expanded tracking capabilities afforded by the LTO optimizer, it is simply able to provide better diagnostics and uncover otherwise very hard to find issues. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your interest in ABySS! |
Any updates on this, @jwcodee ? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your interest in ABySS! |
Any updates on this, @jwcodee? |
I tried to build abyss-2.3.4 with the following *FLAGS to optimize the build:
-flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Note the -Werror=* flags are used to help detect cases where the compiler tries to optimize by assuming UB cannot exist in the source code -- if it does exist, ordinarily the code would be miscompiled, and this says to make the miscompilation a fatal error.
I got this build error:
Originally reported downstream: https://bugs.gentoo.org/862252
Full build log: build.log
The text was updated successfully, but these errors were encountered: