Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Build fails with Cephasonics on Ubuntu 18.04 #95

Closed
RemiDelaunay opened this issue Feb 7, 2020 · 1 comment
Closed

Build fails with Cephasonics on Ubuntu 18.04 #95

RemiDelaunay opened this issue Feb 7, 2020 · 1 comment

Comments

@RemiDelaunay
Copy link

Hi

I am trying to build SUPRA with Cephasonics but have the following error :

/home/cephasonics/git/supra/src/SupraLib/InputOutput/UsIntCephasonicsBtcc.cpp: In member function ‘void supra::UsIntCephasonicsBtcc::putData(uint16_t, uint32_t, size_t, size_t, int16_t*)’:
/home/cephasonics/git/supra/src/SupraLib/InputOutput/UsIntCephasonicsBtcc.cpp:879:60: error: call of overloaded ‘abs(uint32_t&)’ is ambiguous
       uint32_t absVal = m_intensityScaling*(double)(abs(sum)) / numSamples;
                                                            ^
In file included from /usr/include/c++/7/cstdlib:75:0,
                 from /usr/local/include/boost/config/platform/linux.hpp:15,
                 from /usr/local/include/boost/config.hpp:53,
                 from /usr/local/include/boost/thread/detail/platform.hpp:14,
                 from /usr/local/include/boost/thread/mutex.hpp:12,
                 from /usr/local/cusdk/inc/fal/capdmp/DataProcessor.h:29,
                 from /home/cephasonics/git/supra/src/SupraLib/InputOutput/UsIntCephasonicsBtccProc.h:16,
                 from /home/cephasonics/git/supra/src/SupraLib/InputOutput/UsIntCephasonicsBtcc.cpp:12:
/usr/include/stdlib.h:837:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/include/c++/7/cstdlib:77:0,
                 from /usr/local/include/boost/config/platform/linux.hpp:15,
                 from /usr/local/include/boost/config.hpp:53,
                 from /usr/local/include/boost/thread/detail/platform.hpp:14,
                 from /usr/local/include/boost/thread/mutex.hpp:12,
                 from /usr/local/cusdk/inc/fal/capdmp/DataProcessor.h:29,
                 from /home/cephasonics/git/supra/src/SupraLib/InputOutput/UsIntCephasonicsBtccProc.h:16,
                 from /home/cephasonics/git/supra/src/SupraLib/InputOutput/UsIntCephasonicsBtcc.cpp:12:
/usr/include/c++/7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
/usr/include/c++/7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double)
   abs(double __x)
   ^~~
/usr/include/c++/7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float)
   abs(float __x)
   ^~~
/usr/include/c++/7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double)
   abs(long double __x)
   ^~~
/usr/include/c++/7/bits/std_abs.h:84:3: note: candidate: constexpr __int128 std::abs(__int128)
   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
   ^~~
/usr/include/c++/7/bits/std_abs.h:102:3: note: candidate: constexpr __float128 std::abs(__float128)
   abs(__float128 __x)
   ^~~
[ 80%] Building CXX object src/SupraLib/CMakeFiles/SUPRA_Lib.dir/InputOutput/MhdSequenceWriter.cpp.o
src/SupraLib/CMakeFiles/SUPRA_Lib.dir/build.make:15573: recipe for target 'src/SupraLib/CMakeFiles/SUPRA_Lib.dir/InputOutput/UsIntCephasonicsBtcc.cpp.o' failed
make[2]: *** [src/SupraLib/CMakeFiles/SUPRA_Lib.dir/InputOutput/UsIntCephasonicsBtcc.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:85: recipe for target 'src/SupraLib/CMakeFiles/SUPRA_Lib.dir/all' failed
make[1]: *** [src/SupraLib/CMakeFiles/SUPRA_Lib.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

This error only happen when I try to build supra with cephasonics. My cusdk version is 2.6.13. Any idea what could cause this ?

Thank you !

@goeblr
Copy link
Member

goeblr commented Feb 14, 2020

Thanks for the details!
That is an issue where I just went with what prior GCC versions accepted, so only the newer one on 18.04 complains about that.

It will be fixed with #96

Make sure to check which version of boost you are using: For 18.04 it is best to just use the one from the ubuntu packages and not the specific version that was requested before.

@goeblr goeblr closed this as completed in 779e3e4 Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants