<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
On Feb 16, 2021, at 5:26 PM, Joel Sherrill <<a href="mailto:joel@rtems.org" class="">joel@rtems.org</a>> wrote:<br class="">
<div>
<blockquote type="cite" class=""><br class="Apple-interchange-newline">
<div class="">
<div dir="auto" class="">Can you provide a cutdown? </div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Sure, it’s 1 line of source:</div>
<div><br class="">
</div>
<div>
<blockquote type="cite" class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">tux%
</b>cat m.cpp </span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">#include <cmath></span></div>
</blockquote>
<div><br class="">
</div>
<div>which when compiled:</div>
<br class="">
<div class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">
<blockquote type="cite" class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">tux%
</b>/local/anj/RTEMS-5.1/rtems-5.1/bin/m68k-rtems5-g++ -B/local/anj/RTEMS-5.1/rtems-5.1/m68k-rtems5/uC5282/lib/ -specs bsp_specs -qrtems -mcpu=5282 -Wall -c m.cpp</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">In file included from
<b class="">m.cpp:1:0</b>:</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">/local/anj/RTEMS-5.1/rtems-5.1/lib/gcc/m68k-rtems5/7.5.0/include/c++/cmath:1086:11:</b>
</span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">error:
</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">'<b class="">::acoshl</b>' has not been declared</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">   using ::</span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">acoshl</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">;</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">          
</span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">^~~~~~</b></span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">/local/anj/RTEMS-5.1/rtems-5.1/lib/gcc/m68k-rtems5/7.5.0/include/c++/cmath:1090:11:</b>
</span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">error:
</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">'<b class="">::asinhl</b>' has not been declared</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">   using ::</span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">asinhl</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">;</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">          
</span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">^~~~~~</b></span></div>
</blockquote>
<div class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class=""><br class="">
</b></span></div>
</div>
</span></div>
</div>
</div>
<div>Long list of errors truncated as before.</div>
<div><br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<div dir="auto" class="">
<div dir="auto" class="">And any idea what those using statements are referring to? I know the methods in libm but so not understand what it means in the context of using</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>I think that's how you ask C++ to import symbols into the current namespace (they are all inside a
<font face="Menlo" class="">namespace std {...}</font> block), but I’m not a C++ expert. In any case they come from gcc. EPICS probably doesn’t need any of the missing functions which look to have been added by C99, but we do need to be able to pull in math.h
 and/or cmath from C++ code.</div>
<div><br class="">
</div>
<div>- Andrew</div>
<div><br class="">
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Feb 16, 2021, 4:42 PM Gedare Bloom <<a href="mailto:gedare@rtems.org" class="">gedare@rtems.org</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Andrew,<br class="">
<br class="">
On Tue, Feb 16, 2021 at 1:16 PM Johnson, Andrew N. <<a href="mailto:anj@anl.gov" target="_blank" rel="noreferrer" class="">anj@anl.gov</a>> wrote:<br class="">
><br class="">
> I tried to build the in-progress port of EPICS for the uC5282 BSP last night against a release build of RTEMS-5.1 with tools and BSP built using RSB. It looks like the g++ cmath routines haven't been configured properly for this target. It failed at the first
 C++ source file includes math.h (other BSPs such as the beatnik and qoriq_e500 get further than this, and only the pc686 build completely succeeds right now):<br class="">
><br class="">
> > /local/anj/RTEMS-5.1/rtems-5.1/bin/m68k-rtems5-g++ -B/local/anj/RTEMS-5.1/rtems-5.1/m68k-rtems5/uC5282/lib/ -specs bsp_specs -qrtems     -mcpu=5282       -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX      -O2 -g -ffunction-sections -fdata-sections 
  -Wall       -DMY_DO_BOOTP=NULL    -D__LINUX_ERRNO_EXTENSIONS__ -DHAVE_SOCKADDR_SA_LEN=1  -I. -I../O.Common -I. -I../osi/compiler/gcc -I../osi/compiler/default -I. -I../osi/os/RTEMS-posix -I../osi/os/RTEMS -I../osi/os/posix -I../osi/os/default -I.. -I../as
 -I../bucketLib -I../calc -I../cvtFast -I../cppStd -I../cxxTemplates -I../dbmf -I../ellLib -I../env -I../error -I../fdmgr -I../flex -I../freeList -I../gpHash -I../iocsh -I../log -I../macLib -I../misc -I../osi -I../pool -I../ring -I../taskwd -I../timer -I../yacc
 -I../yacc -I../yajl -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include         -c ../cxxTemplates/resourceLib.cpp<br class="">
<br class="">
I don't see -lm not sure if that is an issue or not, but it seems<br class="">
suspect. can you snip out the compiler command line to compare with<br class="">
the pc686 build?<br class="">
<br class="">
> > In file included from /local/anj/RTEMS-5.1/rtems-5.1/lib/gcc/m68k-rtems5/7.5.0/include/c++/math.h:36:0,<br class="">
> >                  from ../cxxTemplates/resourceLib.h:38,<br class="">
> >                  from ../cxxTemplates/resourceLib.cpp:15:<br class="">
> > /local/anj/RTEMS-5.1/rtems-5.1/lib/gcc/m68k-rtems5/7.5.0/include/c++/cmath:1086:11: error: '::acoshl' has not been declared<br class="">
> >    using ::acoshl;<br class="">
> >            ^~~~~~<br class="">
> > /local/anj/RTEMS-5.1/rtems-5.1/lib/gcc/m68k-rtems5/7.5.0/include/c++/cmath:1090:11: error: '::asinhl' has not been declared<br class="">
> >    using ::asinhl;<br class="">
> >            ^~~~~~<br class="">
> > /local/anj/RTEMS-5.1/rtems-5.1/lib/gcc/m68k-rtems5/7.5.0/include/c++/cmath:1094:11: error: '::atanhl' has not been declared<br class="">
> >    using ::atanhl;<br class="">
> >            ^~~~~~<br class="">
> ><br class="">
> > ... many similar errors snipped ...<br class="">
> ><br class="">
> > /local/anj/RTEMS-5.1/rtems-5.1/lib/gcc/m68k-rtems5/7.5.0/include/c++/cmath:1220:11: error: '::tgammal' has not been declared<br class="">
> >    using ::tgammal;<br class="">
> >            ^~~~~~~<br class="">
> > /local/anj/RTEMS-5.1/rtems-5.1/lib/gcc/m68k-rtems5/7.5.0/include/c++/cmath:1224:11: error: '::truncl' has not been declared<br class="">
> >    using ::truncl;<br class="">
> >            ^~~~~~<br class="">
><br class="">
> There could very well have been errors building the BSP on my part as I had to hand-create a uC5282.bset file for RSB to build it:<br class="">
><br class="">
> > tux% cat config/5/bsps/uC5282.bset<br class="">
> > %define mail_single_report 1<br class="">
> ><br class="">
> > %define with_rtems_bsp uC5282<br class="">
> > %define rtems_target   m68k-rtems5<br class="">
> > %define rtems_host     %{rtems_target}<br class="">
> ><br class="">
> > 5/rtems-m68k<br class="">
> > 5/rtems-kernel<br class="">
> > 5/rtems-libbsd<br class="">
><br class="">
><br class="">
> The libbsd line there might be wrong, but I wouldn’t expect that to affect the availability of <cmath> functions to the C++ compiler.<br class="">
><br class="">
> Any suggestions?<br class="">
><br class="">
> Thanks,<br class="">
><br class="">
> - Andrew<br class="">
><br class="">
> --<br class="">
> Complexity comes for free, simplicity you have to work for.<br class="">
><br class="">
> _______________________________________________<br class="">
> users mailing list<br class="">
> <a href="mailto:users@rtems.org" target="_blank" rel="noreferrer" class="">users@rtems.org</a><br class="">
> <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank" class="">
http://lists.rtems.org/mailman/listinfo/users</a><br class="">
_______________________________________________<br class="">
users mailing list<br class="">
<a href="mailto:users@rtems.org" target="_blank" rel="noreferrer" class="">users@rtems.org</a><br class="">
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank" class="">http://lists.rtems.org/mailman/listinfo/users</a></blockquote>
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div>-- </div>
<div>Complexity comes for free, simplicity you have to work for.</div>
</div>
</div>
<br class="">
</body>
</html>