I am trying to install the software "Seismic Unix" for Cygwin on Windows.
Under normal circumstances the issue described below would probably be fixed with downloading Cygwin again and doing just a simple reinstallation of all packages - the problem is: I can't really do that, because I am on a research ship in the South Atlantic right now and am sharing a bandwidth of 190 kb/s with 50 people. Therefore the best I can do is to download or update single packages. In order to do this, however, I first need to know what causes my error messages.
The issue arises when I am trying to make install. The error message reads:
fcat.c: In function ‘main’:
fcat.c:35:14: error: storage size of ‘buf’ isn’t known
struct stat buf;
^~~
In file included from fcat.c:26:0:
/usr/local/su2/include/cwp.h:713:15: warning: implicit declaration of function open64’ [-Wimplicit-function-declaration]
#define open open64
^
fcat.c:43:8: note: in expansion of macro ‘open’
fd = open(av[ic], O_RDONLY);
^~~~
/usr/local/su2/include/cwp.h:720:15: warning: implicit declaration of function fstat64’ [-Wimplicit-function-declaration]
#define fstat fstat64
^
fcat.c:45:3: note: in expansion of macro ‘fstat’
fstat(fd, &buf);
^~~~~
fcat.c:35:14: warning: unused variable ‘buf’ [-Wunused-variable]
struct stat buf;
^~~
make[2]: *** [Makefile:24: /usr/local/su2/bin/fcat] Error 1
make[2]: Leaving directory '/usr/local/su2/src/cwp/main'
make[1]: *** [Makefile:8: INSTALL] Error 2
make[1]: Leaving directory '/usr/local/su2/src/cwp'
make: *** [Makefile:85: cwpstuff] Error 2
/usr/local/su2/ is the directory of Seismic Unix. I have a long range of packages installed that works for a similar software (called Madagascar), but apparently not for Seismic Unix. I found some posts that explained this error message arises sometimes, when gcc is not found/up to date. I checked this several times and it is up to date. Furthermore, I tried to use "rebaseall" in the Ash terminal of Cygwin, because this apparently fixes problems with single packages installed after the main installation, but so far nothing works.
Does anyone have some ideas that could help me?
Edit: thanks to steeldriver I am past the issue with make install
. The config for Cygwin file that Seismic Unix install on Windows is talking about is actually in the /config folder and called Makefile.config_Cygwin_32
(see comments). That gets me past most make xxxinstall
commands.
However, now there is another error message with the last step: make sfinstall
. I get the following error:
make[4]: Entering directory '/usr/local/su2/src/Sfio/src/lib/sfio/Stdio_s'
cc -c -I. -I.. -O -Dvt_threaded=0 stdfgetc.c
In file included from /usr/include/sys/errno.h:11:0,
from /usr/include/errno.h:9,
from ../vthread.h:14,
from ../sfhdr.h:58,
from stdio_s.h:11,
from stdfgetc.c:1:
/usr/include/sys/reent.h:285:26: error: conflicting types for ‘__FILE’
typedef struct __sFILE64 __FILE;
^~~~~~
In file included from stdfgetc.c:1:0:
stdio_s.h:8:25: note: previous declaration of ‘__FILE’ was here
typedef struct _sfio_s *__FILE;
^~~~~~
make[4]: *** [Makefile:25: stdfgetc.o] Error 1
make[4]: Leaving directory '/usr/local/su2/src/Sfio/src/lib/sfio/Stdio_s'
make[3]: *** [Makefile:146: mkstdio_s] Error 2
make[3]: Leaving directory '/usr/local/su2/src/Sfio/src/lib/sfio'
make[2]: *** [Makefile:79: install] Error 2
make[2]: Leaving directory '/usr/local/su2/src/Sfio/src/lib/sfio'
make[1]: *** [Makefile:7: INSTALL] Error 2
make[1]: Leaving directory '/usr/local/su2/src/Sfio'
make: *** [Makefile:129: sfinstall] Error 2
Does anybody know what to do here? After I didn't at first I tried every step again with a freshly untarred source tarball, but the error message still stands.
Makefile.config
plus one for Darwin). I was able to get rid of thestruct stat
error by adding a__CYGWIN__
variable to theCFLAGS
i.e.make "CFLAGS=-D __CYGWIN__" install
(you could achieve the same by editing theMakefile.config
file directly). – steeldriver Jan 18 '18 at 18:46configs/Makefile.config_Cygwin_32
file - on my cygwin64 system, that seemed to work for me (without the errors you are reporting) i.e. just bycp configs/Makefile.config_Cygwin_32 Makefile.config
thenmake install
. You may wish to backup your originalMakefile.config
first. – steeldriver Jan 18 '18 at 19:20configs
subdirectory of the mainsrc
dir - just copy it to thesrc
dir and runmake remake
(rather thanmake install
- that potentially will mix object files that were built with the wrong architecture flags). Or start over from a freshly untarred source tarball to be sure. – steeldriver Jan 18 '18 at 19:53