Error compilation
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Error compilation
- This topic has 1 reply, 2 voices, and was last updated 6 years, 7 months ago by Markus Mohrhard.
-
AuthorPosts
-
March 11, 2018 at 1:44 pm #1968MedOumzaParticipant
Dear All researchers;
I am beginner in OpenLBM. I try to compile the OpenLB code for simple cavity2D. Someone can help me to understand the following message of error:[img]Mohamed HSSIKOU@MohamedHSSIKOU /cygdrive/d/LatticeBoltzmann/testOpenLB/examples/cavity2d/sequential
$ make
makefile:109: /cygdrive/d/LatticeBoltzmann/testOpenLB/examples/cavity2d/sequential/cavity2d.d: No such file or directory
Create dependencies for cavity2d.cpp
Compile cavity2d.cpp
g++ -O3 -Wall -march=native -mtune=native -std=c++0x -I../../../src -I../../../src/ -I../../../src/external -I../../../src/external/zlib -c cavity2d.cpp -o /cygdrive/d/LatticeBoltzmann/testOpenLB/examples/cavity2d/sequential/cavity2d.o
In file included from c:\program files\gfortran\include\direct.h:34:0,
from ../../../src/core/singleton.h:35,
from ../../../src/core/units.h:38,
from ../../../src/functors/indicator/indicatorF2D.h:32,
from ../../../src/geometry/blockGeometryStructure2D.h:33,
from ../../../src/core/blockLatticeStructure2D.h:36,
from ../../../src/boundary/boundaryCondition2D.h:29,
from ../../../src/boundary/boundary2D.h:28,
from ../../../src/olb2D.h:1,
from cavity2d.cpp:34:
c:\program files\gfortran\include\io.h:301:14: error: ‘off64_t’ does not name a type
__CRT_INLINE off64_t lseek64 (int, off64_t, int);
^
c:\program files\gfortran\include\io.h:302:14: error: ‘off64_t’ does not name a type
__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) {
^
In file included from ../../../src/core/units.h:38:0,
from ../../../src/functors/indicator/indicatorF2D.h:32,
from ../../../src/geometry/blockGeometryStructure2D.h:33,
from ../../../src/core/blockLatticeStructure2D.h:36,
from ../../../src/boundary/boundaryCondition2D.h:29,
from ../../../src/boundary/boundary2D.h:28,
from ../../../src/olb2D.h:1,
from cavity2d.cpp:34:
../../../src/core/singleton.h: In member function ‘void olb::singleton::Directories::createDirectory(std::string)’:
../../../src/core/singleton.h:118:19: error: aggregate ‘olb::singleton::Directories::createDirectory(std::string)::stat statbuf’ has incomplete type and cannot be defined
struct stat statbuf;
^
../../../src/core/singleton.h:119:38: error: invalid use of incomplete type ‘struct olb::singleton::Directories::createDirectory(std::string)::stat’
if (stat(path.c_str(), &statbuf) != 0) {
^
../../../src/core/singleton.h:118:14: note: forward declaration of ‘struct olb::singleton::Directories::createDirectory(std::string)::stat’
struct stat statbuf;
^
In file included from ../../../src/io/gnuplotWriter.hh:29:0,
from ../../../src/io/io2D.hh:31,
from ../../../src/olb2D.hh:8,
from cavity2d.cpp:36:
c:\program files\gfortran\include\unistd.h: At global scope:
c:\program files\gfortran\include\unistd.h:65:20: error: ‘off_t’ has not been declared
int ftruncate(int, off_t);
^
c:\program files\gfortran\include\unistd.h:67:38: error: ‘off_t’ has not been declared
__CRT_INLINE int ftruncate(int __fd, off_t __length)
^
make: *** [/cygdrive/d/LatticeBoltzmann/testOpenLB/examples/cavity2d/sequential/cavity2d.o] Error 1[/img]Thank you in advance
March 12, 2018 at 10:47 am #2805Markus MohrhardParticipantHello Mohamed,
it looks quite suspicious that your build tries to include “c:\program files\gfortran\include\unistd.h”. Do you by chance have an older MinGW installation on your build machine that is in the PATH?
Searching for your error message points to a MinGW bug that was fixed 3 years ago.
Regards,
Markus -
AuthorPosts
- You must be logged in to reply to this topic.