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

amiberry fails to compile #1619

Closed
ut316ab opened this issue Jan 30, 2025 · 5 comments
Closed

amiberry fails to compile #1619

ut316ab opened this issue Jan 30, 2025 · 5 comments
Assignees

Comments

@ut316ab
Copy link

ut316ab commented Jan 30, 2025

Trying to build amiberry is failing. I followed the instructions from the Compile from Source page and this is the error i'm getting.

[308/510] Building CXX object CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o
FAILED: CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o
/usr/bin/c++ -DAMIBERRY_DATADIR="/usr/local/share/amiberry" -DAMIBERRY_LIBDIR="/usr/local/lib/amiberry" -DAMIBERRY_VERSION="7.0.2" -DAMIBERRY_VERSION_PRE_RELEASE="" -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -I/home/darryl/amiberry/src -I/home/darryl/amiberry/src/osdep -I/home/darryl/amiberry/src/include -I/home/darryl/amiberry/src/threaddep -I/home/darryl/amiberry/src/archivers -I/home/darryl/amiberry/src/ppc/pearpc -I/home/darryl/amiberry/external/libguisan/include -I/home/darryl/amiberry/external/mt32emu/src -I/home/darryl/amiberry/external/floppybridge/src -I/home/darryl/amiberry/build/external/mt32emu/include -pipe -O3 -std=gnu++17 -fno-pie -MD -MT CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o -MF CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o.d -o CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o -c /home/darryl/amiberry/src/osdep/dpi_handler.cpp
/home/darryl/amiberry/src/osdep/dpi_handler.cpp: In static member function ‘static float DPIHandler::get_scale()’:
/home/darryl/amiberry/src/osdep/dpi_handler.cpp:10:12: error: ‘floor’ was not declared in this scope
10 | return floor(dpi / default_dpi);
| ^~~~~
[325/510] Building CXX object CMakeFiles/amiberry.dir/src/mame/tm34010/tms34010.cpp.o
ninja: build stopped: subcommand failed.

@midwan
Copy link
Collaborator

midwan commented Jan 30, 2025

More details are needed.
Platform, operating system, and OS version specifically are important.

There are automated builds running weigh each be commit, for all supported platforms, to ensure nothing breaks. :)

@ut316ab
Copy link
Author

ut316ab commented Jan 30, 2025

CachyOS Linux

❯ uname -a
Linux cachyos-x8664 6.13.0-2-cachyos #1 SMP PREEMPT_DYNAMIC Mon, 20 Jan 2025 21:26:55 +0000 x86_64 GNU/Linux

@midwan
Copy link
Collaborator

midwan commented Jan 30, 2025

Does it work for you, if you change this line:

return floor(dpi / default_dpi);

to this:

return std::floor(dpi / default_dpi);

@midwan midwan self-assigned this Jan 30, 2025
@midwan
Copy link
Collaborator

midwan commented Jan 30, 2025

@solskogen might have more info, regarding the Arch-based distro you're using.

@ut316ab
Copy link
Author

ut316ab commented Jan 30, 2025

[309/510] Building CXX object CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o
FAILED: CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o
/usr/bin/c++ -DAMIBERRY_DATADIR="/usr/local/share/amiberry" -DAMIBERRY_LIBDIR="/usr/local/lib/amiberry" -DAMIBERRY_VERSION="7.0.2" -DAMIBERRY_VERSION_PRE_RELEASE="" -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -I/home/darryl/amiberry/src -I/home/darryl/amiberry/src/osdep -I/home/darryl/amiberry/src/include -I/home/darryl/amiberry/src/threaddep -I/home/darryl/amiberry/src/archivers -I/home/darryl/amiberry/src/ppc/pearpc -I/home/darryl/amiberry/external/libguisan/include -I/home/darryl/amiberry/external/mt32emu/src -I/home/darryl/amiberry/external/floppybridge/src -I/home/darryl/amiberry/build/external/mt32emu/include -pipe -O3 -std=gnu++17 -fno-pie -MD -MT CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o -MF CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o.d -o CMakeFiles/amiberry.dir/src/osdep/dpi_handler.cpp.o -c /home/darryl/amiberry/src/osdep/dpi_handler.cpp
/home/darryl/amiberry/src/osdep/dpi_handler.cpp: In static member function ‘static float DPIHandler::get_scale()’:
/home/darryl/amiberry/src/osdep/dpi_handler.cpp:10:17: error: ‘floor’ is not a member of ‘std’
10 | return std::floor(dpi / default_dpi);
| ^~~~~
[326/510] Building CXX object CMakeFiles/amiberry.dir/src/mame/tm34010/tms34010.cpp.o
ninja: build stopped: subcommand failed.
[darryl@darryl-endeavour amiberry]$

@midwan midwan closed this as completed in 0c14f47 Jan 30, 2025
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