compile error on Kubuntu 16.04
31 Mar 2016 15:04 #72479
by tomate
compile error on Kubuntu 16.04 was created by tomate
Hi,
First, I would like to sincerely thank all LinuxCNC contributors for this awesome software.
I installed Kubuntu 16.04 a couple of days ago, and gave a try at building LinuxCNC 2.7.4 on a self-compiled RT-PREEMPT Kernel (4.1.20-rt23).
Unfortunately, I ran into errors :Would someone have a clue on how to fix this ?
Thanks,
Chris
First, I would like to sincerely thank all LinuxCNC contributors for this awesome software.
I installed Kubuntu 16.04 a couple of days ago, and gave a try at building LinuxCNC 2.7.4 on a self-compiled RT-PREEMPT Kernel (4.1.20-rt23).
Unfortunately, I ran into errors :
Linking classicladder
Compiling hal/utils/meter.c
Linking halmeter
Compiling hal/utils/scope.c
Compiling hal/utils/scope_horiz.c
Compiling hal/utils/scope_vert.c
Compiling hal/utils/scope_trig.c
Compiling hal/utils/scope_disp.c
Compiling hal/utils/scope_files.c
Linking halscope
Compiling emc/rs274ngc/interp_read.cc
In file included from emc/rs274ngc/interp_read.cc:29:0:
emc/rs274ngc/interp_read.cc: In member function ‘int Interp::read_real_value(char*, int*, double*, double*)’:
emc/rs274ngc/interp_read.cc:2704:25: error: ‘isnan’ was not declared in this scope
CHKS(isnan(*double_ptr),
^
emc/rs274ngc/interp_internal.hh:879:13: note: in definition of macro ‘CHKS’
if (bad) { \
^
emc/rs274ngc/interp_read.cc:2704:25: note: suggested alternatives:
CHKS(isnan(*double_ptr),
^
emc/rs274ngc/interp_internal.hh:879:13: note: in definition of macro ‘CHKS’
if (bad) { \
^
In file included from /usr/include/c++/5/random:38:0,
from /usr/include/c++/5/bits/stl_algo.h:66,
from /usr/include/c++/5/algorithm:62,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function/function_template.hpp:13,
from /usr/include/boost/function/detail/maybe_include.hpp:13,
from /usr/include/boost/function/function0.hpp:11,
from /usr/include/boost/python/errors.hpp:13,
from /usr/include/boost/python/handle.hpp:11,
from /usr/include/boost/python/args_fwd.hpp:10,
from /usr/include/boost/python/args.hpp:10,
from /usr/include/boost/python.hpp:11,
from emc/rs274ngc/interp_read.cc:17:
/usr/include/c++/5/cmath:641:5: note: ‘std::isnan’
isnan(_Tp __x)
^
In file included from /usr/include/boost/lexical_cast/detail/inf_nan.hpp:35:0,
from /usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp:64,
from /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:53,
from /usr/include/boost/lexical_cast/try_lexical_convert.hpp:34,
from /usr/include/boost/lexical_cast.hpp:32,
from /usr/include/boost/python/operators.hpp:19,
from /usr/include/boost/python.hpp:50,
from emc/rs274ngc/interp_read.cc:17:
/usr/include/boost/math/special_functions/fpclassify.hpp:579:14: note: ‘boost::math::isnan’
inline bool (isnan)(T x)
^
In file included from emc/rs274ngc/interp_read.cc:29:0:
emc/rs274ngc/interp_read.cc:2706:25: error: ‘isinf’ was not declared in this scope
CHKS(isinf(*double_ptr),
^
emc/rs274ngc/interp_internal.hh:879:13: note: in definition of macro ‘CHKS’
if (bad) { \
^
emc/rs274ngc/interp_read.cc:2706:25: note: suggested alternatives:
CHKS(isinf(*double_ptr),
^
emc/rs274ngc/interp_internal.hh:879:13: note: in definition of macro ‘CHKS’
if (bad) { \
^
In file included from /usr/include/c++/5/random:38:0,
from /usr/include/c++/5/bits/stl_algo.h:66,
from /usr/include/c++/5/algorithm:62,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function/function_template.hpp:13,
from /usr/include/boost/function/detail/maybe_include.hpp:13,
from /usr/include/boost/function/function0.hpp:11,
from /usr/include/boost/python/errors.hpp:13,
from /usr/include/boost/python/handle.hpp:11,
from /usr/include/boost/python/args_fwd.hpp:10,
from /usr/include/boost/python/args.hpp:10,
from /usr/include/boost/python.hpp:11,
from emc/rs274ngc/interp_read.cc:17:
/usr/include/c++/5/cmath:621:5: note: ‘std::isinf’
isinf(_Tp __x)
^
In file included from /usr/include/boost/lexical_cast/detail/inf_nan.hpp:35:0,
from /usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp:64,
from /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:53,
from /usr/include/boost/lexical_cast/try_lexical_convert.hpp:34,
from /usr/include/boost/lexical_cast.hpp:32,
from /usr/include/boost/python/operators.hpp:19,
from /usr/include/boost/python.hpp:50,
from emc/rs274ngc/interp_read.cc:17:
/usr/include/boost/math/special_functions/fpclassify.hpp:496:14: note: ‘boost::math::isinf’
inline bool (isinf)(T x)
^
Makefile:216: recipe for target 'objects/emc/rs274ngc/interp_read.o' failed
make: *** [objects/emc/rs274ngc/interp_read.o] Error 1
Thanks,
Chris
Please Log in or Create an account to join the conversation.
31 Mar 2016 20:34 - 31 Mar 2016 20:42 #72491
by jepler
Replied by jepler on topic compile error on Kubuntu 16.04
This appears to be related: sourceware.org/bugzilla/show_bug.cgi?id=19439#c12
that source file includes <math.h> and uses unqualified isnan. adding an inclusion of <cmath> and using std::isnan instead may resolve the problem.
If you get it working, please submit a patch.
that source file includes <math.h> and uses unqualified isnan. adding an inclusion of <cmath> and using std::isnan instead may resolve the problem.
If you get it working, please submit a patch.
Last edit: 31 Mar 2016 20:42 by jepler.
The following user(s) said Thank You: tomate
Please Log in or Create an account to join the conversation.
31 Mar 2016 21:01 #72492
by tomate
Replied by tomate on topic compile error on Kubuntu 16.04
So, this may be a glibc problem.
i'll try to fix it tomorrow, and inform you about the result.
Thanks a lot !
i'll try to fix it tomorrow, and inform you about the result.
Thanks a lot !
Please Log in or Create an account to join the conversation.
01 Apr 2016 11:53 #72522
by tomate
Replied by tomate on topic compile error on Kubuntu 16.04
Hi jepler,
Your fix made the building process successful. Thanks a lot.
When running Axis, I got an error :Googling this gave me the fix.
So, the attached patch (I'm not a developer, so I hope it is good ) makes LinuxCNC 2.7.4 compile on Kubuntu 16.04.
Chris
Your fix made the building process successful. Thanks a lot.
When running Axis, I got an error :
'utf8' codec can't decode byte ...
So, the attached patch (I'm not a developer, so I hope it is good ) makes LinuxCNC 2.7.4 compile on Kubuntu 16.04.
Chris
Please Log in or Create an account to join the conversation.
01 Apr 2016 12:26 #72523
by jepler
Replied by jepler on topic compile error on Kubuntu 16.04
Thanks. Both changes will be a part of a future linuxcnc 2.7.x release.
The following user(s) said Thank You: tomate
Please Log in or Create an account to join the conversation.
04 Apr 2016 21:25 #72742
by halbritt
Replied by halbritt on topic compile error on Kubuntu 16.04
I encountered similar errors compiling against a 4.4.6 PREEMPT_RT kernel in taskintf.cc. Adding the std:: namespace to the function allows it to compile properly.
Patch attached.
Patch attached.
Please Log in or Create an account to join the conversation.
06 Apr 2016 09:34 #72831
by tomate
Replied by tomate on topic compile error on Kubuntu 16.04
Hi,
Thanks for the patch.
I don't know why I didn't get this problem when compiling LinuxCNC myself ?
BTW, does your Preempt kernel work good for you ?
I have compiled several preempt kernels this past year, and always get some desktop freezes ( 10 to 15 seconds duration ) happening a couple of times in an hour.
All my machining work well, but that's pretty annoying.
I am not at all a computer expert, so I am wondering if I do something wrong with my kernel config.
Would you post your kernel config, please, so that I can give a try at it ?
Thanks,
Chris
Thanks for the patch.
I don't know why I didn't get this problem when compiling LinuxCNC myself ?
BTW, does your Preempt kernel work good for you ?
I have compiled several preempt kernels this past year, and always get some desktop freezes ( 10 to 15 seconds duration ) happening a couple of times in an hour.
All my machining work well, but that's pretty annoying.
I am not at all a computer expert, so I am wondering if I do something wrong with my kernel config.
Would you post your kernel config, please, so that I can give a try at it ?
Thanks,
Chris
Please Log in or Create an account to join the conversation.
- cncnoob1979
- Offline
- Platinum Member
Less
More
- Posts: 403
- Thank you received: 75
06 Apr 2016 17:10 - 06 Apr 2016 17:10 #72857
by cncnoob1979
Replied by cncnoob1979 on topic compile error on Kubuntu 16.04
tomate,
What graphics are you using? Intel HD?
If so I was experiencing this with a Kepler Arch CPU. It is a known bug with the accelerated graphics accelerator. UXA vs SNA.
wiki.archlinux.org/index.php/Intel_graphics#SNA_issues
I experienced this with Linux Mint LMDE2 and Jessie. I decided to go with Linux Mint 17.3 Mate instead and not use the Intel Drivers Changing from SNA to UXA did not help with my issue however.
What graphics are you using? Intel HD?
If so I was experiencing this with a Kepler Arch CPU. It is a known bug with the accelerated graphics accelerator. UXA vs SNA.
wiki.archlinux.org/index.php/Intel_graphics#SNA_issues
I experienced this with Linux Mint LMDE2 and Jessie. I decided to go with Linux Mint 17.3 Mate instead and not use the Intel Drivers Changing from SNA to UXA did not help with my issue however.
Last edit: 06 Apr 2016 17:10 by cncnoob1979.
Please Log in or Create an account to join the conversation.
06 Apr 2016 20:27 #72871
by tomate
Replied by tomate on topic compile error on Kubuntu 16.04
Hi,
No, i'm using the radeonsi driver ( radeon HD 7750 ).
But, indeed, i suspect these freezes to be related to graphic driver since they seem to happen especially (but not only) when I hover an app in the taskbar and the thumbnail appears ...
Chris
No, i'm using the radeonsi driver ( radeon HD 7750 ).
But, indeed, i suspect these freezes to be related to graphic driver since they seem to happen especially (but not only) when I hover an app in the taskbar and the thumbnail appears ...
Chris
Please Log in or Create an account to join the conversation.
07 Apr 2016 02:36 #72891
by halbritt
There's a couple of reasons the errors may have arisen. It could the version of the c library that I'm using or it could be that cmath was included before math.h. Either way, the correct implementation explicitly defines the namespace.
As for how well preempt_rt is working, I've gotten jitter down to around 40 and 60 microseconds for servo and base thread respectively using isolcpu. This is on a pretty beefy server I had lying around. I've been messing around with the bios settings and can't seem to improve on that.
I've ordered a low power industrial computer that might work okay. I'm going to try that. In either case, I don't plan to do any soft-stepping. If I did, I'd probably try RTAI.
I might do that just for giggles anyway.
Replied by halbritt on topic compile error on Kubuntu 16.04
Hi,
Thanks for the patch.
I don't know why I didn't get this problem when compiling LinuxCNC myself ?
BTW, does your Preempt kernel work good for you ?
I have compiled several preempt kernels this past year, and always get some desktop freezes ( 10 to 15 seconds duration ) happening a couple of times in an hour.
All my machining work well, but that's pretty annoying.
I am not at all a computer expert, so I am wondering if I do something wrong with my kernel config.
Would you post your kernel config, please, so that I can give a try at it ?
Thanks,
Chris
There's a couple of reasons the errors may have arisen. It could the version of the c library that I'm using or it could be that cmath was included before math.h. Either way, the correct implementation explicitly defines the namespace.
As for how well preempt_rt is working, I've gotten jitter down to around 40 and 60 microseconds for servo and base thread respectively using isolcpu. This is on a pretty beefy server I had lying around. I've been messing around with the bios settings and can't seem to improve on that.
I've ordered a low power industrial computer that might work okay. I'm going to try that. In either case, I don't plan to do any soft-stepping. If I did, I'd probably try RTAI.
I might do that just for giggles anyway.
Please Log in or Create an account to join the conversation.
Time to create page: 0.076 seconds