LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Cygwin: error compiling shared LAMMPS lib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Cygwin: error compiling shared LAMMPS lib


From: Jing Feng <jfeng33@...8...>
Date: Sat, 31 Jan 2015 12:14:27 -0500

Hi, everyone:

      I am trying to build a shared LAMMPS lib in Cygwin x86_64 environment (setup version 2.859). The mpicxx info is listed below:

$ mpicxx -v
Using built-in specs.
COLLECT_GCC=/usr/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-4.9.2-1.x86_64/src/gcc-4.9.2/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-4.9.2-1.x86_64/src/gcc-4.9.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id
Thread model: posix
gcc version 4.9.2 (GCC)

    The error I got is listed below. It looks like the g++ does not like the declaration "void init(int _N, double _deriv0, double _derivN){" in pair_meam_spline.h

mpicxx -O2 -fopenmp  -fPIC -DLAMMPS_GZIP -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_XDR -DLAMMPS_SMALLSMALL -DLMP_USER_OMP -I../../lib/atc -I../../src -I../../lib/poems -DLMP_MPIIO   -DFFT_FFTW3 -I/cygdrive/c/cygwin/usr/local/include   -I/usr/local/include/voro++  -c ../force.cpp
../force.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)
 /* ----------------------------------------------------------------------
 ^
In file included from ../force.cpp:16:0:
../pair_meam_spline.h:77:31: error: expected ‘,’ or ‘...’ before numeric constant
                 void init(int _N, double _deriv0, double _derivN) {
                               ^
In file included from ../style_pair.h:180:0,
                 from ../force.cpp:22:
../pair_meam_spline.h: In member function ‘void LAMMPS_NS::PairMEAMSpline::SplineFunction::init(int)’:
../pair_meam_spline.h:79:34: error: ‘_deriv0’ was not declared in this scope
                         deriv0 = _deriv0;
                                  ^
../pair_meam_spline.h:80:34: error: ‘_derivN’ was not declared in this scope
                         derivN = _derivN;
                                  ^
In file included from ../force.cpp:16:0:
../pair_meam_sw_spline.h: At global scope:
../pair_meam_sw_spline.h:77:31: error: expected ‘,’ or ‘...’ before numeric constant
                 void init(int _N, double _deriv0, double _derivN) {
                               ^
In file included from ../style_pair.h:182:0,
                 from ../force.cpp:22:
../pair_meam_sw_spline.h: In member function ‘void LAMMPS_NS::PairMEAMSWSpline::SplineFunction::init(int)’:
../pair_meam_sw_spline.h:79:34: error: ‘_deriv0’ was not declared in this scope
                         deriv0 = _deriv0;
                                  ^
../pair_meam_sw_spline.h:80:34: error: ‘_derivN’ was not declared in this scope
                         derivN = _derivN;
                                  ^
Makefile:103: recipe for target 'force.o' failed
make[1]: *** [force.o] Error 1
make[1]: Leaving directory '/home/jing/lammps/src/Obj_shlib_jing'
Makefile.shlib:42: recipe for target 'jing' failed
make: *** [jing] Error 2


Do I miss something? Searched the google and found one similar case back to Oct. 2012 in the thread "Cygwin: error compiling USERS-MISC???" without resolution posted. Any suggestion is greatly appreciated.


Best,


jing