CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 Installation (https://www.cfd-online.com/Forums/su2-installation/)
-   -   Problem while Compiling and Installing SU2 3.2 using Cygwin (https://www.cfd-online.com/Forums/su2-installation/139253-problem-while-compiling-installing-su2-3-2-using-cygwin.html)

yona July 20, 2014 16:20

Problem while Compiling and Installing SU2 3.2 using Cygwin
 
Hi all,
I am trying to compile SU2 3.2 for parallel run in windows 7 using Cygwin with MPICH. I got the following error:

CXXLD ../bin/SU2_CFD.exe
../../externals/metis/libmetis.a(libmetis_a-error.o): In function `PrintBackTrace':
/cygdrive/c/Users/yonatant/Downloads/SU2-master/externals/metis/GKlib/error.c:221: undefined reference to `backtrace'
/cygdrive/c/Users/yonatant/Downloads/SU2-master/externals/metis/GKlib/error.c:221(.text+0x355): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `backtrace'
/cygdrive/c/Users/yonatant/Downloads/SU2-master/externals/metis/GKlib/error.c:222: undefined reference to `backtrace_symbols'
/cygdrive/c/Users/yonatant/Downloads/SU2-master/externals/metis/GKlib/error.c:222(.text+0x361): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `backtrace_symbols'
collect2: error: ld returned 1 exit status
Makefile:611: recipe for target '../bin/SU2_CFD.exe' failed
make[1]: *** [../bin/SU2_CFD.exe] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/yonatant/Downloads/SU2-master/SU2_CFD/obj'
Makefile:337: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

This is my configuration:
./configure --prefix=/home/yonatant/SU2V3 --with-MPI=/home/yonatant/mpich/bin/mpicxx CXXFLAGS="-O3" --with-CGNS-lib=/home/yonatant/cgns/lib --with-CGNS-include=/home/yonatant/cgns/include

Any solution for this error?

Thanks for the help.

v8areu July 25, 2015 00:20

I want to bump this since I'm getting the same issue with cygwin in Windows 8.1. anyone has an answer for this?

the parallel build keep failing with this kind of error.

Code:


../../externals/parmetis/include/parmetis.h:21:0: warning: "__cdecl" redefined
#define __cdecl
^
<built-in>: note: this is the location of the previous definition
CXX ../src/___bin_SU2_CFD-transport_model.o
CXX ../src/___bin_SU2_CFD-variable_adjoint_levelset.o
CXX ../src/___bin_SU2_CFD-variable_adjoint_mean.o
CXX ../src/___bin_SU2_CFD-variable_adjoint_tne2.o
CXX ../src/___bin_SU2_CFD-variable_adjoint_turbulent.o
CXX ../src/___bin_SU2_CFD-variable_direct_poisson.o
CXX ../src/___bin_SU2_CFD-variable_direct_elasticity.o
CXX ../src/___bin_SU2_CFD-variable_direct_heat.o
CXX ../src/___bin_SU2_CFD-variable_direct_mean.o
CXX ../src/___bin_SU2_CFD-variable_direct_tne2.o
CXX ../src/___bin_SU2_CFD-variable_direct_transition.o
CXX ../src/___bin_SU2_CFD-variable_direct_turbulent.o
CXX ../src/___bin_SU2_CFD-variable_direct_wave.o
CXX ../src/___bin_SU2_CFD-variable_linearized_mean.o
CXX ../src/___bin_SU2_CFD-variable_linearized_turbulent.o
CXX ../src/___bin_SU2_CFD-variable_structure.o
CXX ../src/___bin_SU2_CFD-variable_template.o
CXXLD ../bin/SU2_CFD.exe
../../externals/metis/libmetis.a(libmetis_a-error.o): In function `PrintBackTrace':
/home/fakhrusy/SU2-4.0.0/externals/metis/GKlib/error.c:221: undefined reference to `backtrace'
/home/fakhrusy/SU2-4.0.0/externals/metis/GKlib/error.c:221:(.text+0x355): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `backtrace'
/home/fakhrusy/SU2-4.0.0/externals/metis/GKlib/error.c:222: undefined reference to `backtrace_symbols'
/home/fakhrusy/SU2-4.0.0/externals/metis/GKlib/error.c:222:(.text+0x361): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `backtrace_symbols'
collect2: error: ld returned 1 exit status
Makefile:673: recipe for target '../bin/SU2_CFD.exe' failed
make[1]: *** [../bin/SU2_CFD.exe] Error 1
make[1]: Leaving directory '/home/fakhrusy/SU2-4.0.0/SU2_CFD/obj'
Makefile:366: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1


I've succeeded compiled it in serial.

my configure:
Code:


$ ./configure --prefix=/home/fakhrusy/SU2 --enable-mpi --with-cc=/cygdrive/c/cygwin64/bin/mpicc --with-cxx=/cygdrive/c/cygwin64/bin/mpicxx --disable-tecio

I got another error if I include the CXXFLAGS="-03" in both of the serial/parallel build, so I don't include it in my ./configure.

any help will be appreciated :)

v8areu July 25, 2015 10:23

I've succeeded building it from source for paralel, finally.
if someone has the same problem with cygwin let me share how I fix the problem.

apparently we need to edit 2 files named gk_arch.h and error.c under the directory /externals/metis/GKlib.

gk_arch.h:

delete or make these lines as a comment:
Code:

#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif

error.c:

delete or make these lines as a comment:

Code:

void PrintBackTrace()
{
#ifdef HAVE_EXECINFO_H
  void *array[10];
  int i, size;
  char **strings;
  size = backtrace(array, 10);
  strings = backtrace_symbols(array, size);
  printf("Obtained %d stack frames.\n", size);
  for (i=0; i<size; i++) {
    printf("%s\n", strings[i]);
  }
  free(strings);
#endif
}

those code seem to be gave me the problem when doing 'make' in cygwin.
now I am capable of running SU2 in parallel with the python script(I've ran it with cygwin terminal, not with the common command prompt on Windows).

my configure:
Code:

$ ./configure --prefix=/home/fakhrusy/SU2 --enable-mpi --with-cc=/cygdrive/c/cygwin64/bin/mpicc --with-cxx=/cygdrive/c/cygwin64/bin/mpicxx --disable-tecio
no tecio, no cxxflags.

I am very exited :D


All times are GMT -4. The time now is 23:10.