[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
error: call of overloaded 'abs(const long long int&)' is ambiguous
From: |
Jordi Sanfeliu |
Subject: |
error: call of overloaded 'abs(const long long int&)' is ambiguous |
Date: |
Wed, 7 Aug 2024 18:53:26 +0200 |
User-agent: |
Mozilla Thunderbird |
Hello,
Since version 1.26 I'm unable to build 'ddrescue' (that is versions
1.26, 1.27 and 1.28) on my hobbyOS FiwixOS (https://www.fiwix.org).
Version 1.25 compiled successfully.
I'm using GCC 4.7.4 on FiwixOS 3.3:
[(root) ~]# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i386-pc-fiwix/4.7.4/lto-wrapper
Target: i386-pc-fiwix
Configured with: ../gcc-4.7.4/configure --prefix=/usr --with-arch=i386
--with-gmp=/ --with-mpfr=/ --with-mpc=/ --enable-languages=c,c++
--disable-lto --disable-shared --disable-multilib --with-newlib
--disable-nls --disable-bootstrap --disable-libstdcxx-pch --disable-werror
Thread model: single
gcc version 4.7.4 (GCC)
This is the compilation log:
creating config.status
creating Makefile
VPATH = .
prefix = /usr
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
datarootdir = $(prefix)/share
infodir = $(datarootdir)/info
mandir = $(datarootdir)/man
CXX = g++
CPPFLAGS =
CXXFLAGS = -Wall -W -O2
LDFLAGS =
MAKEINFO = makeinfo
OK. Now you can run make.
g++ -Wall -W -O2 -c -o arg_parser.o arg_parser.cc
g++ -Wall -W -O2 -c -o rational.o rational.cc
g++ -Wall -W -O2 -c -o non_posix.o non_posix.cc
g++ -Wall -W -O2 -c -o loggers.o loggers.cc
g++ -Wall -W -O2 -c -o block.o block.cc
g++ -Wall -W -O2 -c -o mapfile.o mapfile.cc
g++ -Wall -W -O2 -c -o mapbook.o mapbook.cc
g++ -Wall -W -O2 -c -o fillbook.o fillbook.cc
g++ -Wall -W -O2 -c -o genbook.o genbook.cc
g++ -Wall -W -O2 -c -o io.o io.cc
g++ -Wall -W -O2 -c -o rescuebook.o rescuebook.cc
g++ -Wall -W -O2 -c -o command_mode.o command_mode.cc
g++ -Wall -W -O2 -DPROGVERSION=\"1.28\" -c -o main.o main.cc
g++ -Wall -W -O2 -o ddrescue arg_parser.o rational.o non_posix.o
loggers.o block.o mapfile.o mapbook.o fillbook.o genbook.o io.o
rescuebook.o command_mode.o main.o
g++ -Wall -W -O2 -DPROGVERSION=\"1.28\" -c -o ddrescuelog.o ddrescuelog.cc
ddrescuelog.cc: In function 'void {anonymous}::test_offset(long long
int, int)':
ddrescuelog.cc:178:24: error: call of overloaded 'abs(const long long
int&)' is ambiguous
ddrescuelog.cc:178:24: note: candidates are:
In file included from
/usr/lib/gcc/i386-pc-fiwix/4.7.4/../../../../include/c++/4.7.4/cstdlib:66:0,
from
/usr/lib/gcc/i386-pc-fiwix/4.7.4/../../../../include/c++/4.7.4/bits/stl_algo.h:61,
from
/usr/lib/gcc/i386-pc-fiwix/4.7.4/../../../../include/c++/4.7.4/algorithm:63,
from ddrescuelog.cc:24:
/usr/lib/gcc/i386-pc-fiwix/4.7.4/../../../../i386-pc-fiwix/include/stdlib.h:70:5:
note: int abs(int)
In file included from
/usr/lib/gcc/i386-pc-fiwix/4.7.4/../../../../include/c++/4.7.4/bits/stl_algo.h:61:0,
from
/usr/lib/gcc/i386-pc-fiwix/4.7.4/../../../../include/c++/4.7.4/algorithm:63,
from ddrescuelog.cc:24:
/usr/lib/gcc/i386-pc-fiwix/4.7.4/../../../../include/c++/4.7.4/cstdlib:140:3:
note: long int std::abs(long int)
make: *** [Makefile:62: ddrescuelog.o] Error 1
Any idea?
Let me know if you need more information.
Best regards.
--
Jordi Sanfeliu
FIBRANET Network Services Provider
https://www.fibranet.cat
- error: call of overloaded 'abs(const long long int&)' is ambiguous,
Jordi Sanfeliu <=