SuperDARN / rst

Radar Software Toolkit (RST)
https://superdarn.github.io/rst/
GNU General Public License v3.0
22 stars 17 forks source link

superdarn rst make.code problem #200

Closed hsien-ming closed 5 years ago

hsien-ming commented 5 years ago

Good day, I execute "make.code",
Compiling Library:/home/mike/Public/idl3rd/rst/codebase/superdarn/src.lib/tk/idl/cnvmapidl.1.3 it display error message like that: make clean rm -f *.o make make.version /home/mike/Public/idl3rd/rst/codebase/superdarn/src.lib/tk/idl/cnvmapidl.1.3/src/.. make.hdr /home/mike/Public/idl3rd/rst/codebase/superdarn/src.lib/tk/idl/cnvmapidl.1.3/src/../include /home/mike/Public/idl3rd/rst/include/superdarn /home/mike/Public/idl3rd/rst/codebase/superdarn/src.lib/tk/idl/cnvmapidl.1.3/src/../include/cnvmapidl.h /home/mike/Public/idl3rd/rst/codebase/superdarn/src.lib/tk/idl/cnvmapidl.1.3/src/../include/cnvmapidl.h' ->/home/mike/Public/idl3rd/rst/include/superdarn/cnvmapidl.h' cc -fPIC -Wall -O3 -ansi -D_GNU_SOURCE -D_LINUX -I/home/mike/Public/idl3rd/rst/include/base -I/home/mike/Public/idl3rd/rst/include/general -I/home/mike/Public/idl3rd/rst/include/superdarn -I/usr/local/harris/idl87/external/include -c cnvmapidl.c In file included from cnvmapidl.c:20: /usr/local/harris/idl87/external/include/idl_export.h:992: error: expected identifier or ‘(’ before ‘/’ token /usr/local/harris/idl87/external/include/idl_export.h:1028: warning: data definition has no type or storage class /usr/local/harris/idl87/external/include/idl_export.h:1028: warning: type defaults to ‘int’ in declaration of ‘IDL_CPU_STRUCT’ /usr/local/harris/idl87/external/include/idl_export.h:1085: error: expected identifier or ‘(’ before ‘/’ token /usr/local/harris/idl87/external/include/idl_export.h:1085: error: stray ‘#’ in program In file included from cnvmapidl.c:20: /usr/local/harris/idl87/external/include/idl_export.h:3058: error: expected ‘)’ before ‘proc’ /usr/local/harris/idl87/external/include/idl_export.h:3059: error: expected ‘)’ before ‘proc’ /usr/local/harris/idl87/external/include/idl_export.h:3116: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘IDL_SysvCpu’ make: *** [cnvmapidl.o] Error 1 Compilation Aborted. So, What should I do next?

pasha-ponomarenko commented 5 years ago

Dear @hsien-ming, would you please provide a bit more background information on your institution, position and goal of the project? This would help us to assist you more efficiently.

hsien-ming commented 5 years ago

I am a PhD student from Graduate Institute of Space Science, National Central University,Taiwan. My current research subject is to find the correlation between dayside auroral morphology and ionospheric plasma velocity.

ksterne commented 5 years ago

@hsien-ming, little bit more info here will be helpful for our devs to test this out:

egthomas commented 5 years ago

@hsien-ming it looks like there may be an error in your idl_export.h file. For example, in previous versions of IDL (version ~8.4) there was a typo in one of the comment lines: https://naif.jpl.nasa.gov/naif/bugs.html

Since it looks like you are using IDL 8.7, it may be possible there are other errors in the idl_export.h file at lines 992, 1085, 3058, 3059, and 3116. We're still using IDL 8.5.1 at Dartmouth so I can't tell what may have changed in newer versions of IDL.

hsien-ming commented 5 years ago

@hsien-ming, little bit more info here will be helpful for our devs to test this out:

  • What operating system are you using?
  • Are you using a branch other than the master branch in this repo? If you're not sure, then maybe passing along how you acquired the code will help.
  • Additionally, it looks like the compilation is breaking on code related to IDL. Do you have IDL installed and if so, what version of IDL are you using?

My OS is CENTOS 6.9. I do not know the master branch in this repo. I am first install RST software. IDL version is 8.7.

hsien-ming commented 5 years ago

@hsien-ming it looks like there may be an error in your idl_export.h file. For example, in previous versions of IDL (version ~8.4) there was a typo in one of the comment lines: https://naif.jpl.nasa.gov/naif/bugs.html

Since it looks like you are using IDL 8.7, it may be possible there are other errors in the idl_export.h file at lines 992, 1085, 3058, 3059, and 3116. We're still using IDL 8.5.1 at Dartmouth so I can't tell what may have changed in newer versions of IDL.

My IDL is 8.7. The error may be a C format problem. But I am not sure.

hsien-ming commented 5 years ago

These errors were caused by typo of C and C++ comment symbol. I change C++ comment symbol to C comment symbol. The error never appeared.

egthomas commented 5 years ago

@hsien-ming glad to hear those changes to idl_export.h fixed your issue!

For reference if anyone else tries compiling with IDL 8.7, there are now 3 lines with an incorrect comment format in idl_export.h that need to be changed from C++ to C-style:

992   // BOOLEAN: Check if var is a BOOLEAN
...
1085  // Use double-macros to convert a #define number into a string.
1086  // This should work fine with any alphanumeric characters.