Stonie Cooper
Staff
- Tuesday 3rd September 2024 7:02 PM
Hello Gilbert,
I have not tried a compile on Ubuntu 24.04, but I would be surprised if Canonical actually downgraded C++ versions. But stranger things . . . according to Canonical, Ubuntu 22.04 has g++-11 (or 12), and 24.04 has g++-14. These are not the same as the C++ versions, BTW - they are the package version. The point being that it doesn't appear to be a downgrade between Canonical versions.
But . . . . then I researched some more. g++-11 and g++-12 enable the C++ v17 standard by default. It appears that g++-14 does not, and requires the -std=c++17 as a command line argument. I will need to look at why autoconf in the latest version does not automatically generate in the makefiles, but I believe that is the issue. I won't know until I load a Ubuntu 24.04 instance, but you may be able to get past that issue by editing the Makefile in the ~ldm/ldm-6.15.0/src/noaaport directory, scanning down for AM_CXXFLAGS assignment, and changing it from "AM_CXXFLAGS = -std=c++11" to "AM_CXXFLAGS = -std=c++17". Then try a make and see if that gets you any further.
Stonie Cooper, PhD Software Engineer III NSF Unidata Program Center University Corporation for Atmospheric Research I acknowledge that the land I live and work on is the traditional home of The Chahiksichahiks (Pawnee), The Umoⁿhoⁿ (Omaha), and The Jiwere (Otoe). |
Sebenste, Gilbert
User
- Tuesday 3rd September 2024 6:06 PM
Hello Stonie, depbase=`echo FrameQueue.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../grib2 -I../gempak -I../zlib -I../log -I../log -I../protocol -I../protocol -I../protocol2 -I../protocol2 -I../registry -I../registry -I../protocol -I../pq -I../misc -I./retrans -I/usr/include/libxml2 -std=c++11 -g -O2 -MT FrameQueue.o -MD -MP -MF $depbase.Tpo -c -o FrameQueue.o FrameQueue.cpp &&\ mv -f $depbase.Tpo $depbase.Po In file included from FrameQueue.cpp:11: FrameQueue.h:162:39: error: return type ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} is incomplete 162 | std::string to_string() const { | ^ FrameQueue.h: In member function ‘void FrameQueue::Key::to_string() const’: FrameQueue.h:163:36: error: ‘to_string’ is not a member of ‘std’ 163 | return "{upId=" + std::to_string(uplinkId) + | ^~~~~~~~~ FrameQueue.h:163:36: note: ‘std::to_string’ is only available from C++17 onwards FrameQueue.h:164:39: error: ‘to_string’ is not a member of ‘std’ 164 | ", fhSrc=" + std::to_string(fhSource) + | ^~~~~~~~~ FrameQueue.h:164:39: note: ‘std::to_string’ is only available from C++17 onwards FrameQueue.h:165:39: error: ‘to_string’ is not a member of ‘std’ 165 | ", fhRun=" + std::to_string(fhRunNum) + | ^~~~~~~~~ FrameQueue.h:165:39: note: ‘std::to_string’ is only available from C++17 onwards FrameQueue.h:166:39: error: ‘to_string’ is not a member of ‘std’ 166 | ", fhSeq=" + std::to_string(fhSeqNum) + | ^~~~~~~~~ FrameQueue.h:166:39: note: ‘std::to_string’ is only available from C++17 onwards FrameQueue.h:167:40: error: ‘to_string’ is not a member of ‘std’ 167 | ", pdhSeq=" + std::to_string(pdhSeqNum) + | ^~~~~~~~~ FrameQueue.h:167:40: note: ‘std::to_string’ is only available from C++17 onwards FrameQueue.h:168:40: error: ‘to_string’ is not a member of ‘std’ 168 | ", pdhBlk=" + std::to_string(pdhBlkNum) + "}"; | ^~~~~~~~~ FrameQueue.h:168:40: note: ‘std::to_string’ is only available from C++17 onwards FrameQueue.h: In constructor ‘FrameQueue::Frame::Frame(const char*, FrameSize_t)’: FrameQueue.h:227:28: error: ‘runtime_error’ is not a member of ‘std’ 227 | throw std::runtime_error("Frame is too large: " + std::to_string(numBytes) + | ^~~~~~~~~~~~~ FrameQueue.h:24:1: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’? 23 | #include <mutex> +++ |+#include <stdexcept> 24 | FrameQueue.h:227:72: error: ‘to_string’ is not a member of ‘std’ 227 | throw std::runtime_error("Frame is too large: " + std::to_string(numBytes) + | ^~~~~~~~~ FrameQueue.h:227:72: note: ‘std::to_string’ is only available from C++17 onwards In file included from FrameQueue.cpp:12: FrameQueue.cpp: In member function ‘int FrameQueue::add(const NbsFH&, const NbsPDH&, const char*, FrameSize_t)’: FrameQueue.cpp:69:30: error: invalid use of ‘void’ 69 | key.to_string().data(), lastOutputKey.to_string().data()); | ~~~~~~~~~~~~~^~ ../log/log.h:499:20: note: in definition of macro ‘log_add’ 499 | logl_add(&loc, __VA_ARGS__);\ | ^~~~~~~~~~~ FrameQueue.cpp:69:64: error: invalid use of ‘void’ 69 | key.to_string().data(), lastOutputKey.to_string().data()); | ~~~~~~~~~~~~~~~~~~~~~~~^~ ../log/log.h:499:20: note: in definition of macro ‘log_add’ 499 | logl_add(&loc, __VA_ARGS__);\ | ^~~~~~~~~~~ make[2]: *** [Makefile:853: FrameQueue.o] Error 1 make[2]: Leaving directory '/home/ldm/ldm-6.15.0/src/noaaport' make[1]: *** [Makefile:673: all-recursive] Error 1 make[1]: Leaving directory '/home/ldm/ldm-6.15.0/src' make: *** [Makefile:523: all] Error 2
--------------------------------------------------------------------------------------------------------------------------------
Gilbert Sebenste Meteorology Support Analyst
|