Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

beta4 linux build error. #5

Closed
phdsg opened this issue Feb 1, 2018 · 4 comments
Closed

beta4 linux build error. #5

phdsg opened this issue Feb 1, 2018 · 4 comments

Comments

@phdsg
Copy link

phdsg commented Feb 1, 2018

tried to build the beta4. compiler bails with this:

Makefile:18: warning: overriding recipe for target 'dist'
../../plugin.mk:36: warning: ignoring old recipe for target 'dist'
g++ -I./src -fPIC -I../../include -I../../dep/include -DVERSION=0.5.0-beta.4 -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_LIN  -Wsuggest-override -std=c++11 -c -o build/src/plugin/dhe-modules.cpp.o src/plugin/dhe-modules.cpp
g++ -I./src -fPIC -I../../include -I../../dep/include -DVERSION=0.5.0-beta.4 -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_LIN  -Wsuggest-override -std=c++11 -c -o build/src/stage/stage-widget.cpp.o src/stage/stage-widget.cpp
In file included from ./src/util/ramp.h:8:0,
                 from src/stage/stage.h:9,
                 from src/stage/stage-widget.cpp:1:
./src/util/sigmoid.h: In function ‘float DHE::sigmoid(float, float)’:
./src/util/sigmoid.h:19:46: error: call of overloaded ‘abs(float&)’ is ambiguous
   return (x - x*curvature)/(curvature - abs(x)*2.0f*curvature + 1.0f);
                                              ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from /usr/include/c++/6/ext/string_conversions.h:41,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/stdexcept:39,
                 from /usr/include/c++/6/array:39,
                 from /usr/include/c++/6/tuple:39,
                 from /usr/include/c++/6/functional:55,
                 from /usr/include/c++/6/memory:79,
                 from src/stage/stage.h:4,
                 from src/stage/stage-widget.cpp:1:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/include/c++/6/ext/string_conversions.h:41:0,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/stdexcept:39,
                 from /usr/include/c++/6/array:39,
                 from /usr/include/c++/6/tuple:39,
                 from /usr/include/c++/6/functional:55,
                 from /usr/include/c++/6/memory:79,
                 from src/stage/stage.h:4,
                 from src/stage/stage-widget.cpp:1:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
../../compile.mk:53: recipe for target 'build/src/stage/stage-widget.cpp.o' failed
make: *** [build/src/stage/stage-widget.cpp.o] Error 1

@dhemery
Copy link
Owner

dhemery commented Feb 1, 2018

Thanks for the report. I was expecting std::abs() to have a float overload, but it appears not to.

Can you try the issues/issue-5 branch? I've switched to std::fabs().

If it works, please attach the zip file.

@phdsg
Copy link
Author

phdsg commented Feb 1, 2018

works (i mean builds)... zip coming soon. just some quick runtests...

@phdsg
Copy link
Author

phdsg commented Feb 1, 2018

DHE-Modules-0.5.0-beta.4-lin.zip

@dhemery
Copy link
Owner

dhemery commented Feb 1, 2018

Thank you so much for this report and for the Linux build!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants