[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[McIDAS #PSX-470067]: mcidas-x 2009 compile on Ubuntu question

Hi Tom,

Sorry for the slow response.  I got involved in playing with a new feature
in the IDV...

> 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).

> 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.

> 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 
like a problem in the /usr/include/(bits|sys)/syslog.h include files.


- 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.


- 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:



    if (getenv (DDE_ACCOUNTING))
        openlog("mcserv", LOG_CONS, LOG_USER);
        syslog(LOG_WARNING | LOG_LOCAL1, "Unable to write ADDE log record: %m");
        closelog( );


#if 0

    if (getenv (DDE_ACCOUNTING))
        openlog("mcserv", LOG_CONS, LOG_USER);
        syslog(LOG_WARNING | LOG_LOCAL1, "Unable to write ADDE log record: %m");
        closelog( );


This should not be any problem especially given the comment just above this code

*| 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.

> Thanks for any ideas...

Again, the problem looks to be in include files included from 
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.


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

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.