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

failed to build on 32bit powerpc #222

Closed
alexmyczko opened this issue Dec 21, 2017 · 8 comments
Closed

failed to build on 32bit powerpc #222

alexmyczko opened this issue Dec 21, 2017 · 8 comments

Comments

@alexmyczko
Copy link
Contributor

alexmyczko commented Dec 21, 2017

Compiling config.c...
In file included from ../klystron/src/gfx/objhdr.h:32:0,
                 from ../klystron/src/gfx/bgcell.h:30,
                 from ../klystron/src/gfx/tiledescriptor.h:31,
                 from ../klystron/src/gfx/font.h:30,
                 from src/mused.h:30,
                 from src/config.c:27:
src/config.c: In function ‘apply_config’:
../klystron/src/macros.h:91:26: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
 #  define CASTTOPTR(t,x) (t*)(Uint64)x
                          ^
src/config.c:87:21: note: in expansion of macro ‘CASTTOPTR’
  change_pixel_scale(CASTTOPTR(void,mused.pixel_scale), 0, 0);
                     ^
../klystron/src/macros.h:91:26: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
 #  define CASTTOPTR(t,x) (t*)(Uint64)x
                          ^
src/config.c:90:20: note: in expansion of macro ‘CASTTOPTR’
  change_oversample(CASTTOPTR(void,mused.oversample), 0, 0);
                    ^
cc1: all warnings being treated as errors
Makefile:151: recipe for target 'objs.release/config.o' failed
make[3]: *** [objs.release/config.o] Error 1
make[3]: Leaving directory '/data/klystrack-0.20171212/klystrack'
Makefile:128: recipe for target 'build' failed
make[2]: *** [build] Error 2
make[2]: Leaving directory '/data/klystrack-0.20171212/klystrack'
dh_auto_build: make -j1 CFG=release returned exit code 2
debian/rules:15: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory '/data/klystrack-0.20171212'
debian/rules:12: recipe for target 'build' failed
make: *** [build] Error 2
@alexmyczko
Copy link
Contributor Author

There is a few more architectures that did not build (red): https://buildd.debian.org/status/package.php?p=klystrack&suite=unstable

@kometbomb
Copy link
Owner

The method I use there is terrible but I guess it's unavoidable since I'm not rewriting this in the near future. :) I assume the pointers something like 48 bits wide or so. Need to check if there's a safe way to force it to 64 bits or so.

@darkhog
Copy link

darkhog commented Jan 3, 2018

Maybe this has something to do with this?

cc1: all warnings being treated as errors

Try turning that option off and see if it builds then.

@kometbomb
Copy link
Owner

kometbomb commented Jan 4, 2018 via email

@kometbomb
Copy link
Owner

I am not able to test all platforms but I just committed a fix here: kometbomb/klystron@ba8e768

This ensures the cast is done with a type whose width equals that of a pointer type. Can the build process above be tested with the branch referenced above?

@alexmyczko
Copy link
Contributor Author

I can test it on 32bit ppc... will report back results here.

@alexmyczko
Copy link
Contributor Author

works

@kometbomb
Copy link
Owner

Thanks a lot for testing! I'll merge the klystron PR.

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