dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #01196
Re: make error with dolfin-0.5.10
On Wed, Oct 12, 2005 at 05:01:26PM -0500, Dave Feustel wrote:
> On Wednesday 12 October 2005 16:12, Anders Logg wrote:
> > The stuct timespec should be defined by time.h, which is included from
> > ctime, which in turn is included in utils.cpp in DOLFIN.
> >
> > For some reason, the definition of timespec seems to be missing on
> > your system. You could try adding it and see if it works.
>
> does this look familiar?
> ================
> /*
> * Structure defined by POSIX.1b to be like a timeval.
> */
> struct timespec {
> time_t tv_sec; /* seconds */
> long tv_nsec; /* and nanoseconds */
> };
> ===============
Looks like the correct structure.
> It's from the OpenBSD file /usr/include/sys/time.h.
> I have no idea why time.h is in /usr/include/sys instead of /usr/include,
> but this error comes up ocasionally when I port software to OpenBSD.
I also (on Debian GNU/Linux) have a /usr/include/sys/time.h but that
is different from /usr/include/time.h. Can you check in ctime (should
be in /usr/include/c++/<version>/ or something similar) which time.h
is included and if timespec is defined in that time.h?
> I inserted that code in utils.cpp.
> > Edit line 61 in src/kernel/common/utils.cpp, changing from
> >
> > struct timespec req;
> >
> > to
> > struct { __time_t tv_sec; long int tv_nsec; } req;
> >
> > Does that help?
> >
> > I haven't seen this problem before. Anyone else has a suggestion?
> >
> > /Anders
> Running gmake again, I get
> =============================
> g++ -DPACKAGE_NAME=\"dolfin\" -DPACKAGE_TARNAME=\"dolfin\" -DPACKAGE_VERSION=\"0.5.10\" -DPACKAGE_STRING=\"dolfin\ 0.5.10\" -DPACKAGE_BUGREPORT=\"dolfin@xxxxxxxxxx\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -I. -I. -I../../../src/kernel/common -I../../../src/kernel/fem -I../../../src/kernel/form -I../../../src/kernel/function -I../../../src/kernel/io -I../../../src/kernel/la -I../../../src/kernel/log -I../../../src/kernel/main -I../../../src/kernel/math -I../../../src/kernel/mesh -I../../../src/kernel/ode -I../../../src/kernel/quadrature -I../../../src/kernel/settings -I../../../src/kernel/common -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -DDEBUG=1 -g -O2 -Wall -Werror -ansi -std=c++98 -c CursesLogger.cpp
> CursesLogger.cpp: In member function `void dolfin::CursesLogger::drawBuffer()':
> CursesLogger.cpp:766: error: invalid conversion from `const char*' to `char*'
I've seen this before. It's a problem with a faulty printw() in the
curses lib on your system. It should accept a const char* and should
not need a char*. You can get around this by disabling curses:
./configure --disable-curses
/Anders
Follow ups
References