JohnWStockwellJr / SeisUnix

The CWP/SU: Seismic Un*x Package - a free open seismic processing, research, and educational software package. Please seek distribution gzipped tar files at https://wiki.Seismic-Unix.org not the Github version.
https://wiki.Seismic-Unix.org
Other
262 stars 123 forks source link

Installation Issues #51

Open felipeguedessilva opened 4 years ago

felipeguedessilva commented 4 years ago

Good Afternoon,

When I tried to install SU I had a problem below. Someone had the same problem and knows how to solve it?

Thanks for help!

============================================ In file included from /usr/include/wchar.h:43:0, from ../sfhdr.h:304, from stdio_s.h:11, from stdfgetc.c:1: /usr/include/x86_64-linux-gnu/bits/types/FILE.h:5:25: error: conflicting types for ‘FILE’ typedef struct _IO_FILE __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; ^~ Makefile:25: recipe for target 'stdfgetc.o' failed make[4]: [stdfgetc.o] Error 1 make[4]: Leaving directory '/home/paopc/Downloads/src/Sfio/src/lib/sfio/Stdio_s' Makefile:146: recipe for target 'mkstdio_s' failed make[3]: [mkstdio_s] Error 2 make[3]: Leaving directory '/home/paopc/Downloads/src/Sfio/src/lib/sfio' Makefile:77: recipe for target 'install' failed make[2]: [install] Error 2 make[2]: Leaving directory '/home/paopc/Downloads/src/Sfio/src/lib/sfio' Makefile:6: recipe for target 'INSTALL' failed make[1]: [INSTALL] Error 2 make[1]: Leaving directory '/home/paopc/Downloads/src/Sfio' Makefile:129: recipe for target 'sfinstall' failed make: *** [sfinstall] Error 2

JohnWStockwellJr commented 4 years ago

What operating system?

John Stockwell Visit: https://wiki.Seismic-Unix.org The new home of Seismic Un*x

On Dec 4, 2019, at 1:47 PM, felipeaugustogudes notifications@github.com wrote:

 Good Afternoon,

When I tried to install SU I had a problem below. Someone had the same problem and knows how to solve it?

Thanks for help!

============================================ In file included from /usr/include/wchar.h:43:0, from ../sfhdr.h:304, from stdio_s.h:11, from stdfgetc.c:1: /usr/include/x86_64-linux-gnu/bits/types/FILE.h:5:25: error: conflicting types for ‘FILE’ typedef struct _IO_FILE __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; ^~ Makefile:25: recipe for target 'stdfgetc.o' failed make[4]: [stdfgetc.o] Error 1 make[4]: Leaving directory '/home/paopc/Downloads/src/Sfio/src/lib/sfio/Stdio_s' Makefile:146: recipe for target 'mkstdio_s' failed make[3]: [mkstdio_s] Error 2 make[3]: Leaving directory '/home/paopc/Downloads/src/Sfio/src/lib/sfio' Makefile:77: recipe for target 'install' failed make[2]: [install] Error 2 make[2]: Leaving directory '/home/paopc/Downloads/src/Sfio/src/lib/sfio' Makefile:6: recipe for target 'INSTALL' failed make[1]: [INSTALL] Error 2 make[1]: Leaving directory '/home/paopc/Downloads/src/Sfio' Makefile:129: recipe for target 'sfinstall' failed make: *** [sfinstall] Error 2

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

felipeguedessilva commented 4 years ago

Good Morning Sr. John,

I am using Linux Mint 19.1.

Thanks.

Alejah98 commented 4 years ago

Hi. I have the same issue, I am using Ubuntu 18.04 LTS

felipeguedessilva commented 4 years ago

Hi! I solved this problem following some steps that I attached here. These steps are in Portuguese.

install_su.txt

Alejah98 commented 4 years ago

Hi! I solved this problem following some steps that I attached here. These steps are in Portuguese.

install_su.txt

Hi Felipe! Thanks for sharing that information. I tried everything in the txt file but it doesn't work. I continue having the same issue when I run the command "make sfinstall". Also, the package "libgl1-mesa" is unable to install, when I try it returns "Unable to locate package libgl1-mesa" :(

felipeguedessilva commented 4 years ago

Hi! You can try this sequence of commands:

sudo apt-get update; sudo apt-get upgrade; sudo apt-get autoremove; sudo apt-get clean; sudo apt-get install libgl1-mesa-dev;

Alejah98 commented 4 years ago

Hi! You can try this sequence of commands:

sudo apt-get update; sudo apt-get upgrade; sudo apt-get autoremove; sudo apt-get clean; sudo apt-get install libgl1-mesa-dev;

Nope, It doesn't work.

felipeguedessilva commented 4 years ago

Maybe your Linux version isn't compatible with current version of libgl1-mesa-dev.

bluespider42 commented 4 years ago

@Alejah98 did you ever solve this? I'm having the same issue in Ubuntu18.04 (but also happens on Centos,Fedora etc.)

Alejah98 commented 4 years ago

@Alejah98 did you ever solve this? I'm having the same issue in Ubuntu18.04 (but also happens on Centos,Fedora etc.)

Hi. I couldn't solve the problem yet :(. If you find something related, please tell me.

andyclegg commented 4 years ago

The problem appears to be within src/Sfio. Specifically, https://github.com/JohnWStockwellJr/SeisUnix/blob/e3a5ac57814fb60dd8d5b32e70bbd971fe5a7b54/src/Sfio/src/lib/sfio/Stdio_b/Sfstdio.c#L399-L403 These lines redefine __FILE for compatibility reasons. Removing them seems to get past this compilation error. The true fix may be to fix the system that detects the need for these lines.

https://github.com/JohnWStockwellJr/SeisUnix/compare/master...andyclegg:master This patch gets it compiling on Fedora 31 (also includes fixes for the libtirpc split)

kadok commented 3 years ago

For non-Red Hat systems you'll need to comment in these typedefs:

File: SeisUnix/src/Sfio/src/lib/sfio/Stdio_s/stdio_s.h

#if _typ___FILE /* Redhat7.3 requires __FILE in wchar.h */
//typedef struct _sfio_s        *__FILE;
#endif

File: SeisUnix/src/Sfio/src/lib/sfio/Stdio_b/sfstdio.h

/* Linux7.2 requires __FILE in wchar.h - we fake it here */
#include        "FEATURE/sfio"
#if _typ___FILE
//typedef FILE  *__FILE;
#endif

This solution worked on WSL2 (Windows + Ubuntu 20.04) also.