This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Tom, Sorry for the slow response. I got involved in playing with a new feature in the IDV... re: > I have switched from fedora to ubuntu (for reasons not worth explaining > here) and am trying to compile mcidas-x 2009. I have an Ubuntu VMware virtual machine that I run on my Windows XP netbook, so I have a little experience with it (at least an older release). re: > It appears to be building > fine until I hit ddservc.c. Here is the error I am getting in the makelog: > > mcidas:~/mcidas2009/src$ gcc -c -O -I. -I../netcdf/libsrc > -I../hdf/hdf/src -I../hdf/mfhdf/libsrc -I../jpeg -I../libpng -I../zlib > -I../tiff/libtiff -I../libgeotiff -I../jasper/src/libjasper/include > -I../g2clib -I../bzip2 ddeservc.c > ddeservc.c: In function ‘procipfile’: > ddeservc.c:698: warning: format ‘%i’ expects type ‘int’, but argument 4 > has type ‘long unsigned int’ OK, this is a warning. It should not cause the build to stop. re: > In file included from /usr/include/sys/syslog.h:207, > from /usr/include/syslog.h:1, > from ddeservc.c:876: > /usr/include/bits/syslog.h: In function ‘logErrAction’: > /usr/include/bits/syslog.h:31: error: nested function ‘syslog’ declared > ‘extern’ > /usr/include/bits/syslog.h:30: error: static declaration of ‘syslog’ follows > non-static declaration > /usr/include/sys/syslog.h:190: note: previous declaration of ‘syslog’ was here > /usr/include/bits/syslog.h:47: error: nested function ‘vsyslog’ declared > ‘extern’ > /usr/include/bits/syslog.h:46: error: static declaration of ‘vsyslog’ follows > non-static declaration > /usr/include/sys/syslog.h:200: note: previous declaration of ‘vsyslog’ was > here > > I couldn't find anything like this in the archives. I was wondering > whether anyone else has had a similar problem. This is weird, AND it is the only time I have seen this problem. It really looks like a problem in the /usr/include/(bits|sys)/syslog.h include files. Questions: - which version of Ubuntu are you running? This is best determined by running 'uname -a' and looking for a description file in /etc (which for RedHat Linux is named something like /etc/redhat-release). - what version of GCC is installed on your machine? This is best determined by running 'gcc --version' - is this version of GCC up to date, or is there an newer version or updates for this version? - have you tried building the LDM on this machine? I ask about the LDM because it also includes the syslog.h include file (in the src/ulog/ulog.h and src/ulog/ulog.c files). From what I can see of ddeservc.c's simple use of syslog, if it is running into a compilation problem related to inclusion of syslog.h, then the LDM should also. Comment: - if updating GCC on your system is not possible/warranted or does not work, you can get past this problem by making the following code change in ddeservc.c: change: #include<syslog.h> if (getenv (DDE_ACCOUNTING)) { openlog("mcserv", LOG_CONS, LOG_USER); syslog(LOG_WARNING | LOG_LOCAL1, "Unable to write ADDE log record: %m"); closelog( ); } to: #if 0 #include<syslog.h> if (getenv (DDE_ACCOUNTING)) { openlog("mcserv", LOG_CONS, LOG_USER); syslog(LOG_WARNING | LOG_LOCAL1, "Unable to write ADDE log record: %m"); closelog( ); } #endif return; This should not be any problem especially given the comment just above this code snippit: *| Remarks: *| *| This is sortof a user definable function. The server calls this *| function if it fails to write a log record to the SERVER.LOG file. *| It will perform some action to notify the administrator that there *| is a problem. After making the editing change to ddeservc.c, you should be able to pick-up the build where you left off. re: > Thanks for any ideas... Again, the problem looks to be in include files included from /usr/include/syslog.h. This is outside of the McIDAS code which makes "light" use of syslog (this is the only routine where syslog.h is included). Please let me know if an update to your GCC installation solves the problem, or if you are forced to make a code modification in ddeservc.c. Cheers, Tom -- **************************************************************************** Unidata User Support UCAR Unidata Program (303) 497-8642 P.O. Box 3000 address@hidden Boulder, CO 80307 ---------------------------------------------------------------------------- Unidata HomePage http://www.unidata.ucar.edu **************************************************************************** Ticket Details =================== Ticket ID: PSX-470067 Department: Support McIDAS Priority: Normal Status: Closed