Closed MuhammedKpln closed 7 years ago
same here with rolling Arch 4.10 and GCC6.3
It works with g++-5, but not g++-6, as far as I can tell
Using Debian 9
@MuhammedKpln How did you fix this issue?
@Cyclic3 I think nothing, you should downgrade the GCC. If you are using Arch:
I'm using Devuan ascii distribution, I have gcc 6.3.0-18 and I'm getting this error. That's a 20170516 version
Here's a patch fixing the issue with newer GCC : https://gist.github.com/YamashitaRen/43482f1eed4a505f7076593e5d9dfa1e
@YamashitaRen I applied similar changes to my version before, basically renaming that function. Instead of a patch here is a fork (this case with exactly your rename), and I'll submit a PR
PR #41
having a similar issue, appreciate any ideas. running Debian buster.
also new to GitHub, should i open a new issue?
$ find /dev/cpu /dev/cpu /dev/cpu/3 /dev/cpu/3/cpuid /dev/cpu/3/msr /dev/cpu/2 /dev/cpu/2/cpuid /dev/cpu/2/msr /dev/cpu/1 /dev/cpu/1/cpuid /dev/cpu/1/msr /dev/cpu/0 /dev/cpu/0/cpuid /dev/cpu/0/msr /dev/cpu/microcode
$ g++ --version g++ (Debian 8.3.0-6) 8.3.0
$ make /bin/sh: 1: svn: not found /bin/sh: 1: svnversion: not found g++ -O2 -MMD -MF obj/x86_64/.MSVC_Round.d -MT obj/x86_64/MSVC_Round.o -c -o obj/x86_64/MSVC_Round.o MSVC_Round.cpp In file included from MSVC_Round.cpp:1: MSVC_Round.h:5:17: error: ‘int round(float)’ conflicts with a previous declaration int round (float); ^ In file included from /usr/include/c++/8/math.h:36, from MSVC_Round.h:3, from MSVC_Round.cpp:1: /usr/include/c++/8/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’ round(float __x) ^~~~~ make: *** [Makefile:62: obj/x86_64/MSVC_Round.o] Error 1
@ihgwf Try my fork or Pull Request https://github.com/turionpowercontrol/tpc/pull/41 mentioned above
guys, amdctl is such a great tool as well. supports a lot of architectures and the maintainer is a little bit more active. btw, i'm pretty sure this repo is just an old mirror from Google's code. https://github.com/kevinlekiller/amdctl you can grab the user repo package for Arch Linux: https://aur.archlinux.org/packages/amdctl-git
I have still the same bug in Ubuntu 20.04 and Linux Mint Debian Edition. So issue was closed but not corrected...
It is because function round() is defined twice, in the libraries of gcc and again in the source code of TurionPowerControl. If the function's name is modified in the files MSVC_Round.h and MSVC_Round.cpp to eg round_mod() then compilation is OK. TurionPowerControl then uses the standard round() function of gcc but works very well.
Aaand 1.5 years later my PR is still sitting there...
Who is your PR ? Cat, dog, else ? :)
The problem with linux people is that most of the time there are no explanations about what happens. Here it is so easy that I wanted to inform the millions of other users who will experience the problem. Moreover, your patch (same as my solution) is ugly. You renamed the function round() to round_to_int() for the main program to use the gcc library function round(). In fact the 2 files MSVC_Round.h and MSVC_Round.cpp should not be used with the gcc versions which already have round() defined, and then test the gcc version used to compile... And I was too lazy to do this.........
/bin/sh: 1: svn: not found /bin/sh: 1: svnversion: not found g++ -O2 -MMD -MF obj/x86_64/.MSVC_Round.d -MT obj/x86_64/MSVC_Round.o -c -o obj/x86_64/MSVC_Round.o MSVC_Round.cpp In file included from MSVC_Round.cpp:1:0: MSVC_Round.h:5:17: error: ‘int round(float)’ conflicts with a previous declaration int round (float); ^ In file included from /usr/include/c++/6/math.h:36:0, from MSVC_Round.h:3, from MSVC_Round.cpp:1: /usr/include/c++/6/cmath:1708:3: note: previous declaration ‘constexpr float std::round(float)’ round(float __x) ^~~~~ Makefile:62: recipe for target 'obj/x86_64/MSVC_Round.o' failed make: *** [obj/x86_64/MSVC_Round.o] Error 1 sense@Sense:~/Masaüstü/tpc$
Here im getting the problem when im triyng to compile it with "make" without admin privileges.