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 is failing on Arch Linux #18

Closed
morgan-greywolf opened this issue Oct 23, 2024 · 5 comments
Closed

Build is failing on Arch Linux #18

morgan-greywolf opened this issue Oct 23, 2024 · 5 comments

Comments

@morgan-greywolf
Copy link

morgan-greywolf commented Oct 23, 2024

   14 | extern float __dj_float_max;
      |              ^
../ansif/float/float_fx.c:4:9: note: type ‘struct float_t’ should match type ‘float’
    4 | float_t __dj_float_max     = { 0x7fffff, 0xfe, 0x0 };
      |         ^
../ansif/float/float_fx.c:4:9: note: ‘__dj_float_max’ was previously declared here
../ansif/float/float_fx.c:4:9: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
../ansi/stdlib/../../../../include/math.h:100:20: error: type of ‘__dj_huge_vall’ does not match original declaration [-Werror=lto-type-mismatch]
  100 | extern long double __dj_huge_vall;
      |                    ^
../c99/math/hugevall.c:6:15: note: type ‘struct long_double_t’ should match type ‘long double’
    6 | long_double_t __dj_huge_vall = { 0x00000000, 0x80000000, 0x7fff, 0x0 };
      |               ^
../c99/math/hugevall.c:6:15: note: ‘__dj_huge_vall’ was previously declared here
../c99/math/hugevall.c:6:15: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
../ansi/stdlib/../../../../include/float.h:30:15: error: type of ‘__dj_double_max’ does not match original declaration [-Werror=lto-type-mismatch]
   30 | extern double __dj_double_max;
      |               ^
../ansif/float/float_dx.c:4:10: note: type ‘struct double_t’ should match type ‘double’
    4 | double_t __dj_double_max     = { 0xffffffffU, 0xfffff, 0x7fe, 0x0 };
      |          ^
../ansif/float/float_dx.c:4:10: note: ‘__dj_double_max’ was previously declared here
../ansif/float/float_dx.c:4:10: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
../ansi/stdlib/../../../../include/math.h:107:14: error: type of ‘__dj_nan’ does not match original declaration [-Werror=lto-type-mismatch]
  107 | extern float       __dj_nan;
      |              ^
../c99/math/nan_def.c:4:9: note: type ‘struct float_t’ should match type ‘float’
    4 | float_t __dj_nan = { 0x7fffff, 0xff, 0x0 };
      |         ^
../c99/math/nan_def.c:4:9: note: ‘__dj_nan’ was previously declared here
../c99/math/nan_def.c:4:9: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
../ansi/stdlib/../../../../include/math.h:99:14: error: type of ‘__dj_huge_valf’ does not match original declaration [-Werror=lto-type-mismatch]
   99 | extern float       __dj_huge_valf;
      |              ^
../c99/math/hugevalf.c:4:9: note: type ‘struct float_t’ should match type ‘float’
    4 | float_t __dj_huge_valf = { 0x00000, 0xff, 0x0 };
      |         ^
../c99/math/hugevalf.c:4:9: note: ‘__dj_huge_valf’ was previously declared here
../c99/math/hugevalf.c:4:9: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
../ansi/stdlib/../../../../include/math.h:22:15: error: type of ‘__dj_huge_val’ does not match original declaration [-Werror=lto-type-mismatch]
   22 | extern double __dj_huge_val;
      |               ^
../ansi/math/huge_val.c:4:10: note: type ‘struct double_t’ should match type ‘double’
    4 | double_t __dj_huge_val = { 0x00000, 0x00000, 0x7ff, 0x0 };
      |          ^
../ansi/math/huge_val.c:4:10: note: ‘__dj_huge_val’ was previously declared here
../ansi/math/huge_val.c:4:10: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto1: all warnings being treated as errors
lto-wrapper: fatal error: cc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [makefile:65: ../../../lib/libdj64.so.0.2] Error 1
make[3]: Leaving directory '/home/rshinn/.cache/paru/clone/dj64-git/src/dj64dev/src/libc/dj64'
make[2]: *** [../makefile.lib:9: all] Error 2
make[2]: Leaving directory '/home/rshinn/.cache/paru/clone/dj64-git/src/dj64dev/src/libc'
make[1]: *** [makefile:7: subs] Error 2
make[1]: Leaving directory '/home/rshinn/.cache/paru/clone/dj64-git/src/dj64dev/src'
make: *** [makefile:59: subs] Error 2```

when issuing `make -j1`
@morgan-greywolf
Copy link
Author

morgan-greywolf commented Oct 23, 2024

I find that I can work around the issue by issuing CFLAGS=-Wno-lto-type-mismatch make -j1 instead of make -j1 in the source folder.

@stsp
Copy link
Owner

stsp commented Oct 23, 2024

Thanks.
I don't think you have to add any options.
I'll make the fix.

@stsp
Copy link
Owner

stsp commented Oct 23, 2024

But thanks for info: that helps me
figure I need -flto to reproduce.

@stsp
Copy link
Owner

stsp commented Oct 23, 2024

Should now be fixed.

@morgan-greywolf
Copy link
Author

Confirmed as working.

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