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

RST version 5 installation errors #588

Open
1 task
Yas979 opened this issue Aug 23, 2023 · 28 comments
Open
1 task

RST version 5 installation errors #588

Yas979 opened this issue Aug 23, 2023 · 28 comments

Comments

@Yas979
Copy link

Yas979 commented Aug 23, 2023

Question

Dear SuperDARN RST team, please can I request assistance on make.build and make.code errors when installing RST version 5.0. Thanks

Category

  • Troubleshooting

Details

I have been encountering issues when attempting to install RST version 5.

1st - Issue - upon running make.build the following errors were encountered:
"In file included from scdoc.c:40:0:
hlpstr.h:30:1: warning: missing terminating " character [enabled by default]
\n",help\tprint the help message and exit.
hlpstr.h:30:1: error: missing terminating " character
hlpstr.h:31:1: error: stray ‘\’ in program
\n",ble\tfilename of the file containing the table of search and replace terms.
hlpstr.h:31:3: warning: missing terminating " character [enabled by default]
\n",ble\tfilename of the file containing the table of search and replace terms.
hlpstr.h:31:1: error: missing terminating " character
\n",ble\tfilename of the file containing the table of search and replace terms.
hlpstr.h:32:1: warning: missing terminating " character [enabled by default]
"script\toutline text script.\n",
hlpstr.h:32:1: error: missing terminating " character
hlpstr.h:33:1: error: stray ‘\’ in program
hlpstr.h:31:2: error: ‘n’ undeclared here (not in a function)
\n",ble\tfilename of the file containing the table of search and replace terms.
hlpstr.h:33:2: error: expected ‘}’ before ‘n’
hlpstr.h:33:3: warning: missing terminating " character [enabled by default]
hlpstr.h:33:2: error: missing terminating " character
make: *** [scdoc.o] Error 1"

On first attempt after this, running make.code resulted in the following error:
“/build/script/make.code: line 90: makeall: command not found”

After copying missing files from RST version 4.2 ./codebase/base/src.bin/build/makeall.1.22/
errstr.h
hlpstr.h
makeall.o
version.h

Then copying makeall executable to ./build/script/ - running make.code resulted in the following error:

"contour.c:29:19: fatal error: rmath.h: No such file or directory
#include "rmath.h"
^
compilation terminated.
make: *** [contour.o] Error 1
Compilation Aborted."

Example

If applicable, fill in one of the following.

Code

please provide any pseudocode/code and output that relates to the question.

Installation Process

Followed steps on https://radar-software-toolkit-rst.readthedocs.io/en/latest/user_guide/linux_install/

As a result of first attempt not compiling IDL library followed troubleshooting steps from above website:
tar -P -czvf idl.tar.gz idl
rm -rf idl
cd $RSTPATH/build/script
make.code

After getting the error:
“/build/script/make.code: line 90: makeall: command not found”

I copied missing files from RST version 4.2 ./codebase/base/src.bin/build/makeall.1.22/
errstr.h
hlpstr.h
makeall.o
version.h

into version 5.0 ./codebase/base/src.bin/build/makeall.1.22/

I then compiled makeall.c into an executable:

gcc makeall.c –o makeall

I then moved makeall to ./build/script and ran command:

make.code

Include your Operating System.
Linux CentOS-7

Documentation

Please link to any documentation or other sources of information.

@egthomas
Copy link
Member

@Yas979 thanks for the message. Have you been able to install previous versions of the RST?

Could you copy all of the output text from make.build and share it in a text file? If make.build is failing at scdoc then subsequent attempts to run make.code will also fail (because make.build never reached the step of compiling makeall).

@Yas979
Copy link
Author

Yas979 commented Aug 25, 2023

@egthomas thanks for the reply. Please find attached a .txt file with a copy of the terminal output after running make.build

Many thanks

RST_v5_make_build_terminal_output.txt

@egthomas
Copy link
Member

@Yas979 thanks for sharing the make.build output. The scdoc binary is only used for compiling some of our online documentation, so it isn't necessary for compiling the rest of the analysis code. You could try removing it from line 62 of make.build, eg

binlist="xmldoc/xmldoc xmldoc/scdoc \

or you could simply remove (or tar) the entire scdoc directory (ie codebase/base/src.bin/xmldoc/scdoc.1.4) so that make.build skips over it.

After making one of those two changes, could you try make.build again and see if it successfully completes?

@Yas979
Copy link
Author

Yas979 commented Aug 25, 2023

Thanks. I commented out lines 62 and 63 from make.build and it completed.

Please can I also ask for help with the error message after running make.code? I have attached the terminal output.
RST_v5_make_code_terminal_output.txt

@egthomas
Copy link
Member

@Yas979 sorry, I didn't mean to comment out all of lines 62-63 from make.build, only to remove the xmldoc/scdoc portion, eg

binlist="xmldoc/xmldoc \
         build/addtext build/maketree build/makeall"

@Yas979
Copy link
Author

Yas979 commented Aug 25, 2023

Thanks. I have made the changes to make.build and then rerun make.code, which produces the same error as before - contour.c:29:19: fatal error: rmath.h: No such file or directory
#include "rmath.h"

@egthomas
Copy link
Member

@Yas979 it doesn't look like make.code is finding the codebase/base/src.lib directory, eg this is what I first see when executing make.code:

makeall
Package Source Directory:/home/egthomas/rst/codebase/base/src.lib
Abort on failure:yes
Compile most recent version of code only:yes
================================================================================
Located Source Code:
1.Located Library:/home/egthomas/rst/codebase/base/src.lib/graphic/fbuffer.1.19
2.Located Library:/home/egthomas/rst/codebase/base/src.lib/graphic/fontdb.1.9
3.Located Library:/home/egthomas/rst/codebase/base/src.lib/graphic/imagedb.1.4
4.Located Library:/home/egthomas/rst/codebase/base/src.lib/graphic/iplotlib.1.4
5.Located Library:/home/egthomas/rst/codebase/base/src.lib/graphic/ps.1.9
6.Located Library:/home/egthomas/rst/codebase/base/src.lib/graphic/splotlib.1.3
7.Located Library:/home/egthomas/rst/codebase/base/src.lib/graphic/xwin.1.5
8.Located Library:/home/egthomas/rst/codebase/base/src.lib/httpd/cgi.1.6
9.Located Library:/home/egthomas/rst/codebase/base/src.lib/httpd/rscript.1.6
10.Located Library:/home/egthomas/rst/codebase/base/src.lib/math/rmath.1.8
11.Located Library:/home/egthomas/rst/codebase/base/src.lib/memory/shmem.1.2
12.Located Library:/home/egthomas/rst/codebase/base/src.lib/task/convert.1.11
13.Located Library:/home/egthomas/rst/codebase/base/src.lib/task/option.1.7
14.Located Library:/home/egthomas/rst/codebase/base/src.lib/task/rtypes.1.5
15.Located Library:/home/egthomas/rst/codebase/base/src.lib/tcpip/cnx.1.17
16.Located Library:/home/egthomas/rst/codebase/base/src.lib/xml/tagdb.1.7
17.Located Library:/home/egthomas/rst/codebase/base/src.lib/xml/xml.1.8
18.Located Library:/home/egthomas/rst/codebase/base/src.lib/xml/xmldb.1.6
19.Located Library:/home/egthomas/rst/codebase/base/src.lib/xml/xmldoclib.1.5

which is where that rmath.h file originates from.

Can you confirm these lines are at the beginning of the build.txt file in build/script ?

# SuperDARN RST

base codebase/base/src.lib lib
base codebase/base/src.bin bin 

@Yas979
Copy link
Author

Yas979 commented Aug 25, 2023

Hi, yes build.txt contains the same lines.

Regards

@egthomas
Copy link
Member

@Yas979 unfortunately I'm not sure what the issue might be at this point. It seems like you previously made some custom edits to the build code - would it be possible to create a fresh clone / download of RST 5.0 and try recompiling with just the scdoc fix I suggested?

@Yas979
Copy link
Author

Yas979 commented Aug 25, 2023

Sure thing. I will give that a try. Thanks

@Yas979
Copy link
Author

Yas979 commented Aug 25, 2023

@egthomas Hi, after a fresh clone of RST 5.0, make.build completed when sdoc was removed.

Upon running make.code, gave the following error message:

/data/sol-ionosphere/SuperDARN-rst-5.0_test/build/script/make.code: line 90: makeall: command not found

Thanks

@Yas979
Copy link
Author

Yas979 commented Aug 29, 2023

Hi @egthomas, Please can I check what I can do next?

Thanks

@egthomas
Copy link
Member

@Yas979 Do you mind sharing the terminal output of your most recent attempts to run make.build and make.code again? It doesn't seem like makeall was properly compiled by make.build when you tried the fresh installation.

@Yas979
Copy link
Author

Yas979 commented Aug 31, 2023

Hi @egthomas,

Thanks for getting back. Please find the terminal output from make.build uploaded here.
RST_v5_make_build_terminal_output_v_new.txt

I have also been attempting to install RST v4.2 and understand make.build ends prematurely in the case of RST v5.0

@egthomas
Copy link
Member

@Yas979 thanks for sharing the terminal output. Did you fully remove (or maybe rename) the codebase/base/src.bin/xmldoc/scdoc.1.4 directory? Or did you remove xml/scdoc from the binlist line in the make.build file, eg

binlist="xmldoc/xmldoc \
         build/addtext build/maketree build/makeall"

From your terminal output, it looks like make.build is trying to execute make clean in the scdoc directory but can't find it.

@Yas979
Copy link
Author

Yas979 commented Aug 31, 2023

Hi @egthomas,

I only made the above amendment to the make.build file.

and

ls codebase/base/src.bin/xmldoc/scdoc.1.4/ found the following:
doc
makefile
scdoc.c

Thanks

@Yas979
Copy link
Author

Yas979 commented Sep 5, 2023

Hi @egthomas

I hope you are well. I have been looking into the make.build errors a bit more and have found that

codebase/base/src.bin/xmldoc/scdoc.1.4/scdoc.c
called from binlist="xmldoc/scdoc" - line 62 of make.build

and

codebase/base/src.bin/build/makeall.1.22/makeall.c
called from binlist="build/makeall" - line 63 of make.build

both stop executing after reaching the same following code in either scdoc.c or makeall.c :
#include "hlpstr.h"

What I have noticed is both:
codebase/base/src.bin/xmldoc/scdoc.1.4/hlpstr.h
codebase/base/src.bin/build/makeall.1.22/hlpstr.h

Include the syntax - ^M, which is not included in the equivalent files after running make.build for RST 4.2

Despite removing this syntax, after running make.build for RST 5.0, the same error occurs and find the syntax ^M has been reinstated into the hlpstr.h files.

I had thought make.help, was rewriting the hlpstr.h files with this syntax, however I am not sure why this is the case as make.help is exactly the same in version 4.2 and 5.0.

I have also commented out most of make.help, in order to not overwrite the edited hlpstr.h files. However, another code is deleting the hlpstr.h files, resulting in make.build not able to find the hlpstr.h file. Unfortunately, I am unable to find the code that is deleting the hlpstr.h files.

Thanks

@egthomas
Copy link
Member

egthomas commented Sep 6, 2023

@Yas979 sorry, I'm not quite sure what else to suggest - I'm wondering if this is an OS-specific issue, as I have never encountered it when compiling the RST on any Ubuntu versions up through 22.04. When I search through the files in the makeall and scdoc directories, I don't find the ^M carriage-return characters anywhere (I know in the past those have crept into some files but I don't see them in this case). If they're only appearing in or throwing warnings from the hlpstr.h files, those are populated from the .xml files in the doc subdirectories; maybe you could try checking those files to see if the ^M characters are present?

Also, did I read your previous comment correctly that you are unable to install RST 4.2 either? Or does that version compile correctly?

@Yas979
Copy link
Author

Yas979 commented Sep 6, 2023

Hi @egthomas,

I'm not sure why ^M is being added to the hlpstr.h files, as seems the code is exactly the same as for RST 4.2. However, in the case of RST 5,0, I ran the command dos2unix on all the make files in the /build/script/ directory, as after first downloading the RST 5.0, the make command could not be found after typing into the command line. Only after running the dos2unix on the make files, could I run make.build and make.code etc.

make.code got a little further once I deleted codebase/base/src.bin/xmldoc/scdoc.1.4/doc/scdoc.doc.xml, codebase/base/src.bin/build/makeall.1.22/doc/makeall.doc.xml and codebase/base/src.bin/graphic/padpng.1.2/doc/padpng.doc.xml.

However, was then left with the following error message:
"mkdir -p /data/sol-ionosphere/SuperDARN-rst-5.0_test/bin
cc -L/data/sol-ionosphere/SuperDARN-rst-5.0_test/lib -o /data/sol-ionosphere/SuperDARN-rst-5.0_test/bin/padpng padpng.o -Wl,-Bstatic
-lrfbuf.1 -lrxml.1 -lopt.1 -Wl,-Bdynamic
-lpng -lm
/usr/bin/ld: cannot find -lrfbuf.1
/usr/bin/ld: cannot find -lrxml.1
/usr/bin/ld: cannot find -lopt.1
collect2: error: ld returned 1 exit status
make: *** [padpng] Error 1
Compilation Aborted."

I also tried to install RST 4.2, but make.code did not complete successfully and resulted in the error:
In file included from cnvmapidl.c:20:0:
/cm/shared/apps/idl/idl/external/include/idl_export.h:994:1: error: expected identifier or ‘(’ before ‘/’ token
// BOOLEAN: Check if var is a BOOLEAN
^
/cm/shared/apps/idl/idl/external/include/idl_export.h:1030:3: warning: data definition has no type or storage class [enabled by default]
} IDL_CPU_STRUCT;
^
/cm/shared/apps/idl/idl/external/include/idl_export.h:1030:3: warning: type defaults to ‘int’ in declaration of ‘IDL_CPU_STRUCT’ [-Wimplicit-int]
In file included from cnvmapidl.c:20:0:
/cm/shared/apps/idl/idl/external/include/idl_export.h:3157:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘IDL_SysvCpu’
extern IDL_CPU_STRUCT IDL_SysvCpu;

Unfortunately, I am not sure what can be done to complete the install of RST 4.2, as I am unable to edit the bugs in idl_export.h, which is a read only file.

I have since tried to install RST 5.0 on another computer using "Rocky Linux 9.2 (Blue Onyx)", and was able to run make.build and make.code without needing to use dos2unix first. This makes me believe the above bugs installing RST 5.0 on the computer with "CentOS Linux 7", was a Linux version issue.

Unfortunately, the latest attempt to install RST 5.0 on an "Rocky Linux 9.2 (Blue Onyx)" OS resulted in the following error:
dmaptoncdf.c:34:10: fatal error: netcdf.h: No such file or directory
34 | #include "netcdf.h"
| ^~~~~~~~~~
compilation terminated.
make: *** [/home/y/ys378/SuperDARN-HOME_TEST_rst-5.0/build/make/makebin.linux:38: dmaptoncdf.o] Error 1
Compilation Aborted.

I believe this could be a result of not having all the Linux dependencies installed on the "Rocky Linux 9.2 (Blue Onyx)" OS, and raised another github issue on this (Required dependencies for Rocky Linux 9.2 (Blue Onyx) #590

Thanks,
Yasir

@egthomas
Copy link
Member

egthomas commented Sep 7, 2023

@Yas979 if you've made it that far with the Rocky Linux 9.2 OS then you may just need to install the netcdf dependencies through your package manager, ie something like netcdf or netcdf-dev or libnetcdf, etc.

https://radar-software-toolkit-rst.readthedocs.io/en/latest/user_guide/linux_install/#fedora
https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html

@Yas979
Copy link
Author

Yas979 commented Sep 12, 2023

@egthomas I hope all is well. Apologies to reopen this case, as after making more progress on installing RST 5.0 on the Rocky Linux 9.2 OS, the install now aborts with the following error:

make.help
./doc/fitacfclientgui.doc.xml
/cm/shared/spack/opt/spack/linux-rocky9-x86_64_v3/gcc-11.3.1/gcc-12.3.0-yxgv2blf2cvrmgglf5c3kja4eye5hsbb/bin/gcc -fPIC -Wall -pedantic -O3 -D_GNU_SOURCE -D_LINUX -D_SVGLIB_ -I/home/y/ys378/SuperDARN-HOME_TEST_rst-5.0/include/base -I/home/y/ys378/SuperDARN-HOME_TEST_rst-5.0/include/general -I/home/y/ys378/SuperDARN-HOME_TEST_rst-5.0/include/superdarn -c fitacfclientgui.c
mkdir -p /home/y/ys378/SuperDARN-HOME_TEST_rst-5.0/bin
/cm/shared/spack/opt/spack/linux-rocky9-x86_64_v3/gcc-11.3.1/gcc-12.3.0-yxgv2blf2cvrmgglf5c3kja4eye5hsbb/bin/gcc -L/home/y/ys378/SuperDARN-HOME_TEST_rst-5.0/lib -o /home/y/ys378/SuperDARN-HOME_TEST_rst-5.0/bin/fitacfclientgui fitacfclientgui.o -Wl,-Bstatic
-lfitcnx.1 -lfit.1 -lcfit.1 -lrscan.1 -lradar.1 -lcnx.1 -ldmap.1 -lopt.1 -lrtime.1 -lrcnv.1 -lncurses -ltinfo -Wl,-Bdynamic
-lz
/usr/bin/ld: cannot find -lncurses
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status
make: *** [/home/y/ys378/SuperDARN-HOME_TEST_rst-5.0/build/make/makebin.linux:43: fitacfclientgui] Error 1

This is despite loading the latest version of ncurses and confirming the ncurses path (/cm/shared/spack/opt/spack/linux-rocky9-x86_64_v3/gcc-12.3.0/ncurses-6.4-se73dbchzjbh4qinlvrk233hol7z6ezu/bin) is included in the .profile.bash.

Please can I ask what you might advise to successfully complete the installation of RTS 5.0?

Thanks

RST_v5_make_code_terminal_output_v20230912.txt

@egthomas
Copy link
Member

@Yas979 Glad to hear you have made some progress with the RST installation. Have you tried installing ncurses-compat-libs ?

Ultimately the fitacfclientgui is not necessary for data analysis and is only used for viewing real-time data streams from certain radars, so if you don't need it you can zip / tar the directory and compilation with make.code should proceed.

@Yas979
Copy link
Author

Yas979 commented Sep 12, 2023

@egthomas Thanks so much. I have been able to complete make.code after zipping up fitacfclientgui and then deleting the directory.

ncurses-compat-libs has not been installed so far.

Thanks

@Yas979
Copy link
Author

Yas979 commented Sep 13, 2023

@egthomas I hope all is well.

I have been told we have ncurses-compat-libs (in /usr/lib64/) and that tinfo is contained as part of the package.

However, I am still getting the same compilation error as before even after adding the ncurses-compat-libs path "/usr/lib64/" to "export PATH" in .profile.bash.

Please can I ask if there is anything else I could try to complete the RST install inclusive of fitacfclientgui?

Best

@egthomas
Copy link
Member

@Yas979 unfortunately I don't can't offer any concrete suggestions since I don't have experience with that Linux distribution. You may try reading through the discussion about curses in this issue and see if any of those suggestions are relevant:

#134

Is there a particular radar for which you need to use the fitacfclientgui?

@JWiker
Copy link

JWiker commented Sep 29, 2023

@Yas979 I'm experiencing the same thing - even though I confirmed that ncurses and tinfo are in /usr/lib64/ and that that's part of my path, it still won't compile. Did you find a fix for this, or just end up deleting /codebase/superdarn/src.bin/tk/topip/fitacfclientgui.1.0?

Also @egthomas, what's the purpose of zipping / tarring the directory and then compiling rather than just deleting it?

@egthomas
Copy link
Member

@JWiker sorry to hear you're encountering issues compiling fitacfclientgui as well. Usually we recommend zipping / tarring a binary's directory (instead of deleting it) so the user can try recompiling it again sometime in the future if needed. If that's not a concern then deleting the directory entirely works just as well - either way, make.code will skip over the directory and continue with compiling the rest of the RST.

@JWiker
Copy link

JWiker commented Sep 29, 2023

@egthomas @Yas979 it ended up working after I added the 32-bit and static versions of both libraries, so I didn't end up having to zip it after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants