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 with LTO #411

Open
eli-schwartz opened this issue Feb 29, 2024 · 0 comments · May be fixed by #414
Open

Build fails with LTO #411

eli-schwartz opened this issue Feb 29, 2024 · 0 comments · May be fixed by #414

Comments

@eli-schwartz
Copy link

x86_64-pc-linux-gnu-gcc -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing  -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wall -Wno-unused-function -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS -Wl,-O1 -Wl,--as-needed -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0 bwashm.o bwase.o bwaseqio.o bwtgap.o bwtaln.o bamlite.o bwape.o kopen.o pemerge.o maxk.o bwtsw2_core.o bwtsw2_main.o bwtsw2_aux.o bwt_lite.o bwtsw2_chain.o fastmap.o bwtsw2_pair.o main.o -o bwa -L. -lbwa -lm -lz -lpthread -lrt
bwamem.c:1207:21: error: type of ‘kt_for’ does not match original declaration [-Werror=lto-type-mismatch]
 1207 |         extern void kt_for(int n_threads, void (*func)(void*,int,int), void *data, int n);
      |                     ^
kthread.c:49:6: note: type mismatch in parameter 4
   49 | void kt_for(int n_threads, void (*func)(void*,long,int), void *data, long n)
      |      ^
kthread.c:49:6: note: type ‘long int’ should match type ‘int’
kthread.c:49:6: note: ‘kt_for’ was previously declared here
kthread.c:49:6: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto1: some warnings being treated as errors
lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status

Full logs: build.log
Downstream report: https://bugs.gentoo.org/862255

jmarshall added a commit to jmarshall/bwa that referenced this issue Mar 18, 2024
These were changed to long in 9d8c906 in 2014. Fixes lh3#411.
@jmarshall jmarshall linked a pull request Mar 18, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant