Skip to content

Error compilation

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1968
    MedOumza
    Participant

    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

    #2805
    Markus Mohrhard
    Participant

    Hello 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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.