Skip to content

Cannot compile the examples using “make” with Cygwin (no object file)

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Cannot compile the examples using “make” with Cygwin (no object file)

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #1814
    John
    Member

    Hi,rnI am new on OpenLB. I downloaded OpenLB V0.9 first and then V1.0 yesterday. I installed and updated Cygwin to add the files required such as “make”, “openmpi” and “gcc”. I tried a couple of examples using make but failed to compile any one. The errors for V0.9 examples are the same, “Fatal error … no *.o file”. Below is the output of compiling example “cylinder2d” of V1.0: Any clue? Thanks,rnrnJohnrnrn$ makernCreate dependencies for cylinder2d.cpprnCompile cylinder2d.cpprng++ -O3 -Wall -std=c++0x -I../../src -I../../src/ -I../../src/external -c cylinder2d.cpp -o /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.ornIn file included from ../../src/core/units.h:38:0,rn from ../../src/functors/blockBaseF3D.h:31,rn from ../../src/functors/superBaseF3D.h:30,rn from ../../src/functors/indicator/indicatorBaseF3D.h:33,rn from ../../src/functors/indicator/indicatorF3D.h:28,rn from ../../src/functors/analyticalF.h:31,rn from ../../src/core/blockLatticeStructure2D.h:38,rn from ../../src/boundary/boundaryCondition2D.h:29,rn from ../../src/boundary/boundary2D.h:28,rn from ../../src/olb2D.h:1,rn from cylinder2d.cpp:41:rn../../src/core/singleton.h: In member function ‘void olb::singleton::Directories::createDirectory(std::__cxx11::string)’:rn../../src/core/singleton.h:96:38: error: no matching function for call to ‘stat::stat(const char*, stat*)’rn if (stat(path.c_str(), &statbuf) != 0) {rn ^rnIn file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/wchar.h:384:0,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/cwchar:44,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/postypes.h:40,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/iosfwd:40,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ios:38,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ostream:38,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/iostream:39,rn from ../../src/core/olbDebug.h:28,rn from ../../src/core/cell.h:30,rn from ../../src/core/blockLatticeStructure2D.h:31,rn from ../../src/boundary/boundaryCondition2D.h:29,rn from ../../src/boundary/boundary2D.h:28,rn from ../../src/olb2D.h:1,rn from cylinder2d.cpp:41:rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate: stat::stat()rn struct stat {rn ^rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate expects 0 arguments, 2 providedrnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate: constexpr stat::stat(const stat&)rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate expects 1 argument, 2 providedrnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate: constexpr stat::stat(stat&&)rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate expects 1 argument, 2 providedrnmake: *** [/cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o] Error 1rn

    #2282
    mathias
    Keymaster

    Hi WopenLB,rnrnThanks for reporting. We tried to reproduce your case in two different systems using cgywin, gcc and openmpi. However, in both cases it was working fine. rnrnI found this https://github.com/simhacker/micropolis/issues/10 which points in the direction that there might be a problem with the includes.rnrnYou can try changing this part in the file singleton.h: rnrn#ifdef _WIN32rn#include <direct.h>rn#else //f defined __linux__rn#include <sys/stat.h>rn#endifrnrnremoving all line with “”#”” or maybe change #ifdef _WIN32 to a 64-bit version since it looks like you are working on a 64-bit machine.rnrnPlease, let us know what you find because it might be of interest for others as well.rnrnBestrnMathias

    #2283
    John
    Member

    Hi Mathias,rnI commented the 5 lines shown below. The errors are similar (Also attached below). Where can I get a 64 bit singleton.h file? Thank you for your help,rn/*rn#ifdef _WIN32rn#include <direct.h>rn#else //f defined __linux__rn#include <sys/stat.h>rn#endifrn*/rnrnError outputs:rnrn$ makernCreate dependencies for cylinder2d.cpprnCompile cylinder2d.cpprng++ -DOLB_PRECOMPILED -O3 -Wall -std=c++0x -I../../src -I../../src/ -I../../src/external -c cylinder2d.cpp -o /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.ornIn file included from ../../src/core/units.h:38:0,rn from ../../src/functors/blockBaseF3D.h:31,rn from ../../src/functors/superBaseF3D.h:30,rn from ../../src/functors/indicator/indicatorBaseF3D.h:33,rn from ../../src/functors/indicator/indicatorF3D.h:28,rn from ../../src/functors/analyticalF.h:31,rn from ../../src/core/blockLatticeStructure2D.h:38,rn from ../../src/boundary/boundaryCondition2D.h:29,rn from ../../src/boundary/boundary2D.h:28,rn from ../../src/olb2D.h:1,rn from cylinder2d.cpp:41:rn../../src/core/singleton.h: In member function ‘void olb::singleton::Directories::createDirectory(std::__cxx11::string)’:rn../../src/core/singleton.h:97:38: error: no matching function for call to ‘stat::stat(const char*, stat*)’rn if (stat(path.c_str(), &statbuf) != 0) {rn ^rnIn file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/wchar.h:384:0,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/cwchar:44,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/postypes.h:40,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/iosfwd:40,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ios:38,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ostream:38,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/iostream:39,rn from ../../src/core/olbDebug.h:28,rn from ../../src/core/cell.h:30,rn from ../../src/core/blockLatticeStructure2D.h:31,rn from ../../src/boundary/boundaryCondition2D.h:29,rn from ../../src/boundary/boundary2D.h:28,rn from ../../src/olb2D.h:1,rn from cylinder2d.cpp:41:rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate: stat::stat()rn struct stat {rn ^rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate expects 0 arguments, 2 providedrnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate: constexpr stat::stat(const stat&)rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate expects 1 argument, 2 providedrnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate: constexpr stat::stat(stat&&)rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate expects 1 argument, 2 providedrnIn file included from ../../src/core/units.h:38:0,rn from ../../src/functors/blockBaseF3D.h:31,rn from ../../src/functors/superBaseF3D.h:30,rn from ../../src/functors/indicator/indicatorBaseF3D.h:33,rn from ../../src/functors/indicator/indicatorF3D.h:28,rn from ../../src/functors/analyticalF.h:31,rn from ../../src/core/blockLatticeStructure2D.h:38,rn from ../../src/boundary/boundaryCondition2D.h:29,rn from ../../src/boundary/boundary2D.h:28,rn from ../../src/olb2D.h:1,rn from cylinder2d.cpp:41:rn../../src/core/singleton.h:99:27: error: ‘mkdir’ was not declared in this scopern mkdir(path.c_str());rn ^rnmake: *** [/cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o] Error 1

    #2284
    mathias
    Keymaster

    Please try rn1/ rn#include <direct.h>rn#include <sys/stat.h>rnrnand rnrn2/rn#ifdef _WIN62rn#include <direct.h>rn#else //f defined __linux__rn#include <sys/stat.h>rn#endifrn

    #2286
    John
    Member

    Hi Mathias,rnBelow are the errors outputs of solution 1/ and 2/: Thanks,rnrnSolution 1/ Outputs:rnrn$ makernCreate dependencies for cylinder2d.cpprnCompile cylinder2d.cpprng++ -DOLB_PRECOMPILED -O3 -Wall -std=c++0x -I../../src -I../../src/ -I../../src/external -c cylinder2d.cpp -o /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.ornAssembler messages:rnFatal error: can’t create /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o: No such file or directoryrnmake: *** [/cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o] Error 1rnrnrnSolution 2/ Outputs:rnrn$ makernCreate dependencies for cylinder2d.cpprnCompile cylinder2d.cpprng++ -DOLB_PRECOMPILED -O3 -Wall -std=c++0x -I../../src -I../../src/ -I../../src/external -c cylinder2d.cpp -o /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.ornIn file included from ../../src/core/units.h:38:0,rn from ../../src/functors/blockBaseF3D.h:31,rn from ../../src/functors/superBaseF3D.h:30,rn from ../../src/functors/indicator/indicatorBaseF3D.h:33,rn from ../../src/functors/indicator/indicatorF3D.h:28,rn from ../../src/functors/analyticalF.h:31,rn from ../../src/core/blockLatticeStructure2D.h:38,rn from ../../src/boundary/boundaryCondition2D.h:29,rn from ../../src/boundary/boundary2D.h:28,rn from ../../src/olb2D.h:1,rn from cylinder2d.cpp:41:rn../../src/core/singleton.h: In member function ‘void olb::singleton::Directories::createDirectory(std::__cxx11::string)’:rn../../src/core/singleton.h:104:38: error: no matching function for call to ‘stat::stat(const char*, stat*)’rn if (stat(path.c_str(), &statbuf) != 0) {rn ^rnIn file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/wchar.h:384:0,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/cwchar:44,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/postypes.h:40,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/iosfwd:40,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ios:38,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ostream:38,rn from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/iostream:39,rn from ../../src/core/olbDebug.h:28,rn from ../../src/core/cell.h:30,rn from ../../src/core/blockLatticeStructure2D.h:31,rn from ../../src/boundary/boundaryCondition2D.h:29,rn from ../../src/boundary/boundary2D.h:28,rn from ../../src/olb2D.h:1,rn from cylinder2d.cpp:41:rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate: stat::stat()rn struct stat {rn ^rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate expects 0 arguments, 2 providedrnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate: constexpr stat::stat(const stat&)rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate expects 1 argument, 2 providedrnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate: constexpr stat::stat(stat&&)rnC:/TDM-GCC-64/x86_64-w64-mingw32/include/_mingw_stat64.h:34:10: note: candidate expects 1 argument, 2 providedrnmake: *** [/cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o] Error 1

    #2287
    mathias
    Keymaster

    Please compile version 1 again after cleaning the build, i.e.rnrnmake cleanbuildrnmake cleanrnmake

    #2288
    John
    Member

    Hi Mathias,rnThe errors are similar for solution 1/ shown below . Thank you.rnrn$ make cleanbuildrnClean olb mainrnmake[1]: Entering directory `/cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0’rn


    rn– Clean object, dependencies and library files in ´precompiled’rn


    rn


    rn– Entering src/boundary (clean)rnmake[2]: Entering directory `/cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/src/boundary’rnClean rubbish filesrnClean object filesrnClean dependencies filesrn…….rn…….rnrn$ make cleanrnClean rubbish filesrnClean object filesrnClean dependencies filesrnrn$ makernCreate dependencies for cylinder2d.cpprnCompile cylinder2d.cpprng++ -DOLB_PRECOMPILED -O3 -Wall -std=c++0x -I../../src -I../../src/ -I../../src/external -c cylinder2d.cpp -o /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.ornAssembler messages:rnFatal error: can’t create /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o: No such file or directoryrnmake: *** [/cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o] Error 1rn

    #2289
    henn
    Member

    Hi WopenLB,rnrnI’ve tried to reproduce your error, but failed. (Un)fortunately everything’s compiling without errors on my side. So I have to guess. From your last error :rn””Fatal error: can’t create /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o: No such file or directory””,rni guess that for some reason the file cylinder2d.o can not be created. Possible reasons are:rnrn- The folder /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d does not exist.rn- You do not have permission to write in that folder.rn- You do not have enough free disk space.rnrnFrom one of the earlier posts I see that you’re using mingw as compiler. OpenLB is not tested with mingw. So execute the cygwin setup again and when you get to “”select packages”” enter “”g++”” and uninstall mingw64* and everything else and install gcc-g++. When you’re at it also install wget.rnrnAfter that remove the entire OpenLB folder to make sure you get a clean setup and follow my lead:rn$ wget http://www.optilb.com/openlb/wp-content/uploads/2016/03/olb-1.0r0.tgzrnrn%5BEdit%5D I just saw that the forum is adding an http:// after the wget. Don’t type that it leads to an error. Start with www. [/Edit]rnrn$ tar -xf olb-1.0r0.tgzrnrn$ cd olb-1.0r0rnrn$ makernrnHope that everything works.rnrnCheersrnThomasrnrn

    #2290
    John
    Member

    Hi Thomas,rnI removed minw64, Cygwin and OpenLB, reinstalled Cygwin and OpenLB. There are extraction errors (Unable to extract /usr/bin/ — corrrupt package?””) during the installation of “make” and “gcc”. Click “OK” the installation will continue and the installation was finished.rnrnRunning make produces permission error, see the outputs below. The folder “Temp” has all the rwx permissions. I also changed the permission of folder “Local” using “chmod –R 777”. But it does not fix the problem. Thanks,rnrnFolder “Temp” permission:rndrwxrwxrwx 1 0 Mar 17 14:54 TemprnrnOutputs error:rnrn$ makernCreate dependencies for cylinder2d.cpprnCompile cylinder2d.cpprng++ -DOLB_PRECOMPILED -O3 -Wall -std=c++0x -I../../src -I../../src/ -I../../src/external -c cylinder2d.cpp -o /cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.orncc1plus: fatal error: can’t open ‘/cygdrive/d/Users/204052~1/AppData/Local/Temp/ccVp8J3H.s’ for writing: Permission deniedrncompilation terminated.rnMakefile:63: recipe for target ‘/cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o’ failedrnmake: *** [/cygdrive/d/Research01/SRV_resonance/LBcode/OpenLB/olb-1.0r0/examples/cylinder2d/cylinder2d.o] Error 1rnrn

    #2291
    John
    Member

    Hi Thomas,rnI reinstalled “make” and “gcc” without errors. Then run “make” again. It is working. Thanks a lot for the help from you and Mathias.rnJohnrn

    #2374
    sam
    Member

    Hello, I am a newbie to OpenLb and to this forum. I even don’t know how to post my problem, can’t find any option! I am having similar error compiling the code. See below:rnrn


    rn– Entering src/particles/boundaries (compile)rnmake[2]: Entering directory ‘/home/ShafiulMintu/olb-1.0r0/src/particles/boundaries’rnmake[2]: Nothing to be done for ‘compile’.rnmake[2]: Leaving directory ‘/home/ShafiulMintu/olb-1.0r0/src/particles/boundaries’rn– Leaving src/particles/boundaries (compile)rn


    rn


    rn– Entering src/utilities (compile)rnmake[2]: Entering directory ‘/home/ShafiulMintu/olb-1.0r0/src/utilities’rnCompile timer.cpprng++ -DOLB_PRECOMPILED -O3 -Wall -std=c++0x -I../../src -I../../src/ -I../../src/external -c timer.cpp -o ../../build/precompiled/obj/timer.ornIn file included from timer.cpp:25:0:rntimer.hh: In member function ‘void olb::util::Timer<T>::start()’:rntimer.hh:101:31: error: there are no arguments to ‘gettimeofday’ that depend on a template parameter, so a declaration of ‘gettimeofday’ must be available [-fpermissive]rn gettimeofday(&msTimeStart, 0); // time in msrn ^rntimer.hh:101:31: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)rntimer.hh:102:29: error: there are no arguments to ‘gettimeofday’ that depend on a template parameter, so a declaration of ‘gettimeofday’ must be available [-fpermissive]rn gettimeofday(&msTimeCur, 0); // time in ms, here only necessary for MLUP-calculationsrn ^rntimer.hh: In member function ‘void olb::util::Timer<T>::update(int)’:rntimer.hh:113:29: error: there are no arguments to ‘gettimeofday’ that depend on a template parameter, so a declaration of ‘gettimeofday’ must be available [-fpermissive]rn gettimeofday(&msTimeCur, 0); // time in msrn ^rntimer.hh: In member function ‘void olb::util::Timer<T>::stop()’:rntimer.hh:138:29: error: there are no arguments to ‘gettimeofday’ that depend on a template parameter, so a declaration of ‘gettimeofday’ must be available [-fpermissive]rn gettimeofday(&msTimeEnd, 0); // time in msrn ^rntimer.hh: In instantiation of ‘void olb::util::Timer<T>::start() [with T = double]’:rntimer.cpp:31:16: required from hererntimer.hh:101:15: error: ‘gettimeofday’ was not declared in this scopern gettimeofday(&msTimeStart, 0); // time in msrn ^rntimer.hh:102:15: error: ‘gettimeofday’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]rn gettimeofday(&msTimeCur, 0); // time in ms, here only necessary for MLUP-calculationsrn ^rntimer.hh:101:15: note: ‘gettimeofday’ declared here, later in the translation unitrn gettimeofday(&msTimeStart, 0); // time in msrn ^rntimer.hh: In instantiation of ‘void olb::util::Timer<T>::update(int) [with T = double]’:rntimer.cpp:31:16: required from hererntimer.hh:113:15: error: ‘gettimeofday’ was not declared in this scopern gettimeofday(&msTimeCur, 0); // time in msrn ^rntimer.hh: In instantiation of ‘void olb::util::Timer<T>::stop() [with T = double]’:rntimer.cpp:31:16: required from hererntimer.hh:138:15: error: ‘gettimeofday’ was not declared in this scopern gettimeofday(&msTimeEnd, 0); // time in msrn ^rnmake[2]: *** [Makefile:62: ../../build/precompiled/obj/timer.o] Error 1rnmake[2]: Leaving directory ‘/home/ShafiulMintu/olb-1.0r0/src/utilities’rn– Leaving src/utilities (compile)rn


    rnmake[1]: Leaving directory ‘/home/ShafiulMintu/olb-1.0r0’rnLink aorta3drng++ aorta3d.o -L../../build/precompiled/lib -lolb -o aorta3drnaorta3d.o:aorta3d.cpp:(.text+0x147b): undefined reference to `olb::util::Timer<double>::update(int)’rnaorta3d.o:aorta3d.cpp:(.text+0x147b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::update(int)’rnaorta3d.o:aorta3d.cpp:(.text+0x148a): undefined reference to `olb::util::Timer<double>::printStep(int)’rnaorta3d.o:aorta3d.cpp:(.text+0x148a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::printStep(int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x54e): undefined reference to `olb::util::Timer<double>::Timer(int, int, bool*, int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x54e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::Timer(int, int, bool*, int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x556): undefined reference to `olb::util::Timer<double>::start()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x556): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::start()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x57e): undefined reference to `olb::util::Timer<double>::stop()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x57e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::stop()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x586): undefined reference to `olb::util::Timer<double>::printSummary()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x586): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::printSummary()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x616): undefined reference to `olb::util::Timer<double>::Timer(int, int, bool*, int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x616): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::Timer(int, int, bool*, int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x61e): undefined reference to `olb::util::Timer<double>::start()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x61e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::start()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x6fd): undefined reference to `olb::util::Timer<double>::stop()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x6fd): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::stop()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x705): undefined reference to `olb::util::Timer<double>::printSummary()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x705): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::printSummary()’rncollect2: error: ld returned 1 exit statusrnmake: *** [Makefile:103: aorta3d] Error 1rnrnAny idea what I am missing? Would highly appreicaite any help.rnrnThanks.

    #2375
    mathias
    Keymaster

    Hi,rnrnplease try to replace “”gettimeofday”” by “”::gettimeofday”” in “”timer.hh”” and let us please know if it works. In our cygwin/gcc version everything is fine. Please, also state the cygwin adn gcc version you are using.rnrnBestrnMathias

    #2376
    sam
    Member

    Hi Mathias,rnrnIt did not work. Got the following error:rnrntimer.hh:101:3: error: ‘::gettimeofday’ has not been declaredrn ::gettimeofday(&msTimeStart, 0); // time in msrnrnI reinstalled cygwin and gcc version 5.3.0-5 and did the following:rnrnmake cleanbuildrnmake cleanrnmakernrnAnd still got the same error. rn

    #2377
    mathias
    Keymaster

    Googeling I found that someone solved it by putting “”#include <sys/time.h>”” also in the “”timer.hh”” file. Best Mathiasrn

    #2378
    sam
    Member

    Hi Mathias,rnrnUnfortunately, it still did not work for me. I got the same error message in slightly different texts:rnrntimer.hh:103:15: error: ‘gettimeofday’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation. rnrnThanks.

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