Hello Stonie,
I tried to compile LDM 6.15.0 under Ubuntu Linux 24.04.1, and I get this error message:
make[2]: Entering directory '/home/ldm/ldm-6.15.0/src/noaaport'
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
--------------------------------------------------------------------------------------------------------------------------------
Is there a package I am missing? Commands to compile were:
./configure –with-noaaport
make install
Gilbert Sebenste
Meteorology Support Analyst
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).
Hi Stonie,
That got me a lot further, but I ran into problems at the end. Here’s what happened:
libtool: link: ar cr .libs/lib.a .libs/ByteBuf.o .libs/cmplxpack.o .libs/compack.o .libs/comunpack.o .libs/dec_jpeg2000.o .libs/dec_png.o .libs/drstemplates.o .libs/enc_jpeg2000.o .libs/enc_png.o .libs/g2_addfield.o .libs/g2_addgrid.o .libs/g2_addlocal.o .libs/g2_create.o
.libs/g2_free.o .libs/g2_getfld.o .libs/g2_gribend.o .libs/g2_info.o .libs/g2_miss.o .libs/g2_pack_gp.o .libs/g2_rdieee.o .libs/g2_reduce.o .libs/g2_unpack1.o .libs/g2_unpack2.o .libs/g2_unpack3.o .libs/g2_unpack4.o .libs/g2_unpack5.o .libs/g2_unpack6.o .libs/g2_unpack7.o
.libs/gbits.o .libs/getpoly.o .libs/gribid.o .libs/gridtemplates.o .libs/int_power.o .libs/jpcpack.o .libs/jpcunpack.o .libs/misspack.o .libs/mkieee.o .libs/pdstemplates.o .libs/pngpack.o .libs/pngunpack.o .libs/seekgb.o .libs/simpack.o .libs/simunpack.o .libs/specpack.o
.libs/specunpack.o
libtool: link: ranlib .libs/lib.a
libtool: link: ( cd ".libs" && rm -f "lib.la" && ln -s "../lib.la" "lib.la" )
make[2]: Entering directory '/home/ldm/ldm-6.15.0/src/grib2'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/ldm/ldm-6.15.0/src/grib2'
make[1]: Leaving directory '/home/ldm/ldm-6.15.0/src/grib2'
Making install in gempak
make[1]: Entering directory '/home/ldm/ldm-6.15.0/src/gempak'
make install-recursive
make[2]: Entering directory '/home/ldm/ldm-6.15.0/src/gempak'
Making install in tables
make[3]: Entering directory '/home/ldm/ldm-6.15.0/src/gempak/tables'
make[4]: Entering directory '/home/ldm/ldm-6.15.0/src/gempak/tables'
/usr/bin/mkdir -p '/home/etc'
/usr/bin/mkdir: cannot create directory ‘/home/etc’: Permission denied
make[4]: *** [Makefile:396: install-dist_sysconfDATA] Error 1
make[4]: Leaving directory '/home/ldm/ldm-6.15.0/src/gempak/tables'
make[3]: *** [Makefile:467: install-am] Error 2
make[3]: Leaving directory '/home/ldm/ldm-6.15.0/src/gempak/tables'
make[2]: *** [Makefile:954: install-recursive] Error 1
make[2]: Leaving directory '/home/ldm/ldm-6.15.0/src/gempak'
make[1]: *** [Makefile:1275: install] Error 2
make[1]: Leaving directory '/home/ldm/ldm-6.15.0/src/gempak'
make: *** [Makefile:673: install-recursive] Error 1
So…this is odd. There was nothing to make for install-exec|data-am. Hmmmm.
Gilbert Sebenste
Meteorology Support Analyst
From: NSF Unidata Local Data Manager (LDM) <support-ldm@unidata.ucar.edu>
Sent: Tuesday, September 3, 2024 8:03 PM
To: Sebenste, Gilbert <sebensteg@cod.edu>
Cc: archive-ldm@unidata.ucar.edu
Subject: [External] RE: (#HVS-6249412) LDM compilation error using noaaport under Ubuntu Linux 24.04.1
CAUTION: This email originated from outside of COD’s system. Do not click links, open attachments, or respond with sensitive information unless you recognize the sender and know the content is safe.
Gilbert - More curious but also can band-aid to allow you to complete your compile, if you:
grep ETC /home/ldm/ldm-6.15.0/src/gempak/Makefile
-and-
grep ETC /home/ldm/ldm-6.15.0/src/gempak/tables/Makefile
autoconf should have made them both /home/ldm/etc - which is also your fix, but also let me know what yours indicate.
If you edit your /home/ldm/ldm-6.15.0/src/gempak/tables/Makefile to the proper path, that should finish the install, hopefully.
The base of the issue goes back to the initial ./configure, however, in that it appears that it requires the assignment of the env LDMHOME, and that is not being picked up or was not the case. Do you see an assignment of LDMHOME when you:
env | grep LDMHOME
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).
So I decided to “wipe out” my LDM and start over on the server. I noticed that in .bashrc, I did not have the required entries as described in the instructions.
I did that, and I do a ./configure –with-noaaport, and this happens now:
checking for sys/wait.h... yes
checking for unistd.h... (cached) yes
checking for stropts.h... no
checking for sys/ioctl.h... yes
checking for library containing log10... -lm
checking for library containing shm_open... none required
checking for library containing setsockopt... none required
checking for library containing inet_addr... none required
checking for zlib.h... yes
checking for library containing deflate... -lz
checking for png.h... no
configure: error: Header-file not found
Furthermore,
env | grep LDMHOME
Returns blank.
Gilbert Sebenste
Meteorology Support Analyst
From: NSF Unidata Local Data Manager (LDM) <support-ldm@unidata.ucar.edu>
Sent: Wednesday, September 4, 2024 2:39 AM
To: Sebenste, Gilbert <sebensteg@cod.edu>
Cc: archive-ldm@unidata.ucar.edu
Subject: [External] RE: (#HVS-6249412) LDM compilation error using noaaport under Ubuntu Linux 24.04.1
CAUTION: This email originated from outside of COD’s system. Do not click links, open attachments, or respond with sensitive information unless you recognize the sender and know the content is safe.
Gilbert,
The missing header file is at the system level; if you are not the admin on the machine, you will need to solicit help from whoever that may be to install the libpng-dev package to get the png.h. And it may not be the only one, but that would resolve that issue.
For the other, you can do the following as a backup to what should be happening automatically:
export LDMHOME;LDMHOME=${HOME}
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).
OK. I see that the issue with the png missing was that I didn’t have my .bashrc properly configured…but up until this point, it wasn’t a problem.
As for the png library, that was related somehow to the missing required entries in .bashrc.
Anyway, I get further down the install now, but not through it:
Making install in rpc
make[1]: Entering directory '/home/ldm/ldm-6.15.0/src/rpc'
make[2]: Entering directory '/home/ldm/ldm-6.15.0/src/rpc'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/ldm/ldm-6.15.0/src/rpc'
make[1]: Leaving directory '/home/ldm/ldm-6.15.0/src/rpc'
Making install in log
make[1]: Entering directory '/home/ldm/ldm-6.15.0/src/log'
Making install in ulog
make[2]: Entering directory '/home/ldm/ldm-6.15.0/src/log/ulog'
make[3]: Entering directory '/home/ldm/ldm-6.15.0/src/log/ulog'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/home/ldm/include'
/usr/bin/mkdir: cannot create directory ‘/home/ldm/include’: File exists
make[3]: *** [Makefile:744: install-includeHEADERS] Error 1
make[3]: Leaving directory '/home/ldm/ldm-6.15.0/src/log/ulog'
make[2]: *** [Makefile:1026: install-am] Error 2
make[2]: Leaving directory '/home/ldm/ldm-6.15.0/src/log/ulog'
make[1]: *** [Makefile:898: install-recursive] Error 1
make[1]: Leaving directory '/home/ldm/ldm-6.15.0/src/log'
make: *** [Makefile:673: install-recursive] Error 1
ldm@noaaport1:~/src$ env | grep LDMHOME
LDMHOME=/home/ldm
Gilbert Sebenste
Meteorology Support Analyst
From: NSF Unidata Local Data Manager (LDM) <support-ldm@unidata.ucar.edu>
Sent: Wednesday, September 4, 2024 2:39 AM
To: Sebenste, Gilbert <sebensteg@cod.edu>
Cc: archive-ldm@unidata.ucar.edu
Subject: [External] RE: (#HVS-6249412) LDM compilation error using noaaport under Ubuntu Linux 24.04.1
CAUTION: This email originated from outside of COD’s system. Do not click links, open attachments, or respond with sensitive information unless you recognize the sender and know the content is safe.
That type of error typically occurs if the file exists but is not a directory . . .such as a link or an actual file. What do you see when you do this:
ls -l /home/ldm
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).
Hi Stonie,
I see:
lrwxrwxrwx 1 ldm ldm 11 Jan 8 2020 bin -> runtime/bin
-rw-rw-r-- 1 ldm ldm 1768 Dec 21 2022 crontab
-rw-rw-r-- 1 ldm ldm 1551 Jan 8 2020 crontab.np1.20191202
drwxrwxr-x 3 ldm ldm 4096 Sep 4 21:14 etc
lrwxrwxrwx 1 ldm ldm 15 Jan 8 2020 include -> runtime/include
drwxr-xr-x 3 ldm ldm 4096 Dec 6 2023 ldm-6.15.0
-rw-rw-r-- 1 ldm ldm 5975503 Dec 6 2023 ldm-6.15.0.tar.gz
lrwxrwxrwx 1 ldm ldm 11 Jan 8 2020 lib -> runtime/lib
drwx------ 2 ldm ldm 4096 Nov 18 2022 mail
-rw-rw-r-- 1 ldm ldm 423694 May 7 2016 novramon_3.24.1p5-1_amd64.deb
-rw-rw-r-- 1 ldm ldm 1583 Jan 19 2019 Novras300Nconfig01192019
-rw-rw-r-- 1 ldm ldm 1488 Mar 15 2017 Novras300Nconfig03152017
-rw-rw-r-- 1 ldm ldm 71 Jan 28 2019 novrasignal
-rw-rw-r-- 1 ldm ldm 287820 May 7 2016 npstats_0.5.3p5-1_amd64.deb
-rw-rw-r-- 1 ldm ldm 258004 Aug 20 2017 npstats_0.6.1p3-1_amd64.deb
lrwxrwxrwx 1 ldm ldm 10 Dec 7 2023 runtime -> ldm-6.15.0
drwxrwxr-x 4 ldm ldm 4096 Jan 8 2020 scripts
lrwxrwxrwx 1 ldm ldm 13 Jan 8 2020 share -> runtime/share
lrwxrwxrwx 1 ldm ldm 11 Jan 8 2020 src -> runtime/src
drwxrwxr-x 3 ldm ldm 4096 Mar 16 2022 util
drwxrwxr-x 5 ldm ldm 4096 Jan 8 2020 var
Gilbert Sebenste
Meteorology Support Analyst
From: NSF Unidata Local Data Manager (LDM) <support-ldm@unidata.ucar.edu>
Sent: Wednesday, September 4, 2024 4:31 PM
To: Sebenste, Gilbert <sebensteg@cod.edu>
Cc: archive-ldm@unidata.ucar.edu
Subject: [External] RE: (#HVS-6249412) LDM compilation error using noaaport under Ubuntu Linux 24.04.1
CAUTION: This email originated from outside of COD’s system. Do not click links, open attachments, or respond with sensitive information unless you recognize the sender and know the content is safe.
Gilbert - you may need to remove the links until you have the compilation complete . .
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).
Gilbert,
I created an ubuntu 24.04 instance to fetter the installation delta from pre-24.04, and I did the following with success (the extra steps are already addressed in the development tree on github to remove them as a requirement). I will also post to the ldm-users group.
Install ubuntu 24.04:
Type of Installation: Ubuntu Server
.....
Featured server snaps: -none-
.....
reboot
In fresh install:
apt update
apt upgrade
apt install build-essential
apt install net-tools
apt install pax
apt install libz-dev
apt install libpng-dev
apt install libxml2-dev
.......
<create your user group with groupadd>
<create your user with useradd - will assume "ldm" for rest of directions>
Follow the directions for 6.15.0 here (until . . .)
https://docs.unidata.ucar.edu/ldm/current/basics/source-install-steps.html
Stop short of the "make install" line, and then perform the following if, and only if, perform the ./configure step with --with-noaaport.
Before the "make install":
Edit the file ~ldm/ldm-6.15.0/src/noaaport/Makefile, line 327, and edit the AM_CXXFLAGS to look like this:
AM_CXXFLAGS = -std=c++17
Save. Then edit the file ~ldm/ldm-6.15.0/src/noaaport/FrameQueue.h, moving your cursor to after line 21 that is:
#include <mutex>
And add the two follow lines:
#include <string>
#include <stdexcept>
Save. Then, continue with the step:
make install >install.log 2>&1
And on to completion.
That should take care of the installation ubuntu 24.04. The issues that require the edits above are already resolved in the development tree for LDM on github.
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).