-
Notifications
You must be signed in to change notification settings - Fork 10
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
make error on Debian 10 #3
Comments
Can confirm it doesn't build either in Ubuntu 18.04 with g++ 7.5.0. I had to apply the following patch to get around some missing includes that g++ was complaining about and to fix the install prefix to the Phosg library to the one used by the Phosg Makefile here.
After the patch it fails with the following compilation error that I honestly can't make head or tails off (c++14 isn't my forte either), though by the looks of it, it makes me think that maaaaaaybe it needs a specific version of g++ higher than 7.5.0 🤔️
Also tried to compile it with clang but it throws an impressive ammount of linking error with the Phosg library (also compiled with clang). The library itself compiles fine with both g++ and clang, however. |
There were a couple of problems here; I've addressed them in b3bb502, which should make the project build properly in Ubuntu 18.04 / gcc 7.5.0 and hopefully other Linuxes as well; I don't have any other distributions already set up to try with though. This commit fixes numerous sign-compare warnings (clang doesn't warn about these), adds missing includes, and fixes the linker argument order so ld won't complain. It's remarkable to me that in 2020, the linker still isn't smart enough to link libraries correctly regardless of the order they're specified on the command line... Feel free to reopen if this doesn't fix the build issues for you. |
Hi, I'm not a C++ expert, this is my output on my Debian 10
make
g++ -I/opt/local/include -g -Wall -std=c++14 -c -o render_bits.o render_bits.cc
In file included from resource_fork.hh:14,
from render_bits.cc:10:
quickdraw_formats.hh:48:8: warning: ignoring packed attribute because of unpacked non-POD field ‘rect bit_map_header::bounds’
rect bounds;
^~~~~~
quickdraw_formats.hh:55:8: warning: ignoring packed attribute because of unpacked non-POD field ‘rect pixel_map_header::bounds’
rect bounds;
^~~~~~
render_bits.cc: In function ‘int main(int, char**)’:
render_bits.cc:136:24: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
for (size_t x = 1; x < argc; x++) {
~~^~~~~~
render_bits.cc:176:16: error: ‘sqrt’ was not declared in this scope
double z = sqrt(pixel_count);
^~~~
render_bits.cc:176:16: note: suggested alternative: ‘stat’
double z = sqrt(pixel_count);
^~~~
stat
render_bits.cc:177:14: error: ‘floor’ was not declared in this scope
if (z != floor(z)) {
^~~~~
render_bits.cc:177:14: note: suggested alternative: ‘flock’
if (z != floor(z)) {
^~~~~
flock
make: *** [: render_bits.o] Error 1
The text was updated successfully, but these errors were encountered: