c3d / db48x

RPL runtime for the DM42 calculator, in the spirit of HP48/49/50
http://48calc.org
GNU Lesser General Public License v3.0
66 stars 9 forks source link

Fix build on Fedora 38 #853

Closed vkadlcik closed 3 months ago

vkadlcik commented 4 months ago

I can't build the simulator on Fedora (tried 39 and 38, clean installs in a virtual machine):

# dnf -y install arm-none-eabi-gcc arm-none-eabi-gcc-cs-c++ arm-none-eabi-newlib gcc-c++ git make findutils qt-devel qt6-qtbase-devel qt6-qtdeclarative-devel freetype-devel
# git clone https://github.com/c3d/DB48X-on-DM42.git
# sed -i'' 's|git@github.com:c3d/|https://github.com/c3d/|' DB48X-on-DM42/.gitmodules
# cd DB48X-on-DM42/
# git submodule update --init --recursive
# make sim &>make_sim.log
# echo $?
2 

I'm attaching the whole log but I guess the key problem is this:

# grep error: make_sim.log.
../src/settings.cc:153:15: error: call of overloaded ‘format(settings&, renderer&, const char [23], long long unsigned int)’ is ambiguous

make_sim.log

c3d commented 4 months ago

Thanks @vkadlcik for the report.

I am in the process of fixing the Linux build. There are many warnings that the new GCC picks up, e.g. about unused variables or various problems with C-style struct initialization. I will also address the problem you reported.

c3d commented 4 months ago

Changed title (was "../src/settings.cc:153:15: error: call of overloaded ‘format(settings&, renderer&, const char [23], long long unsigned int)’ is ambiguous".

prismv commented 4 months ago

Hi Christohphe, eventually you have recognized already my SwissMicros post. I tried again with stable branch, and then saw this open issue. Therefore it is already registered. For completeness also the show-stopper on Arch Linux with recent clang++ compiler:

> make CXX=/usr/bin/clang++ CC=/usr/bin/clang QMAKESPEC=linux-clang sim 2>&1 | grep error
../src/ids.tbl:836:1: error: call to 'format' is ambiguous
1 error generated.

> LC_ALL=C clang++ --version
clang version 17.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/sbin
JohnRobson commented 3 weeks ago

Thanks @vkadlcik for the report.

I am in the process of fixing the Linux build. There are many warnings that the new GCC picks up, e.g. about unused variables or various problems with C-style struct initialization. I will also address the problem you reported.

Please, do that, I want to compile the Simulator to share it. Thanks.