dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #01197
Re: make error with dolfin-0.5.10
On Wednesday 12 October 2005 17:25, Anders Logg wrote:
> 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?
there *is* a time.h in /usr/include, it just doesn't have the timespec struct
defined. This caused me a lot of confusion until I figured it out.
> > 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
This fix took care of the problem above. I reconfigured and ran gmake again.
I got another error:
===========================
gmake[4]: Entering directory `/home/daf/Dolfin/dolfin-0.5.10/src/kernel/io'
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 -DNO_CURSES=1 -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -DDEBUG=1 -g -O2 -Wall -Werror -ansi -std=c++98 -c MatlabFile.cpp
In file included from MatlabFile.cpp:12:
../../../src/kernel/la/dolfin/Matrix.h:12:22: petscmat.h: No such file or directory
In file included from MatlabFile.cpp:12:
../../../src/kernel/la/dolfin/Matrix.h:37: error: syntax error before `A'
../../../src/kernel/la/dolfin/Matrix.h:95: error: syntax error before `)' token
../../../src/kernel/la/dolfin/Matrix.h:98: error: syntax error before `(' token
../../../src/kernel/la/dolfin/Matrix.h:127: error: 'Mat' is used as a type, but
is not defined as a type.
gmake[4]: *** [MatlabFile.o] Error 1
gmake[4]: Leaving directory `/home/daf/Dolfin/dolfin-0.5.10/src/kernel/io'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/home/daf/Dolfin/dolfin-0.5.10/src/kernel/io'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/home/daf/Dolfin/dolfin-0.5.10/src/kernel'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/daf/Dolfin/dolfin-0.5.10/src'
gmake: *** [all-recursive] Error 1
/home/daf/Dolfin/dolfin-0.5.10}
===========================
--
Tired of having to defend against Malware?
You know: trojans, viruses, SPYWARE, ADWARE,
KEYLOGGERS, rootkits, worms and popups.
Then Switch to OpenBSD with a KDE desktop!!!
Follow ups
References