Dear All,

I have been able to compile CWP-44.R26 with the changes in the Makefile.config

I have added as suggested:

POSTLFLAGS =  -ltirpc

OPTC = -g -std=c99 -m64 -Wall -ansi -Wno-long-long -D_ISOC99_SOURCE
CFLAGS = -I$I $(OPTC) $(CWP_FLAGS) $(shell pkg-config --cflags libtirpc)

THe compilation was successful, However an even more strange thing happens now. The generated executables have an segmentation  fault when they are called without arguments
eg:

Executing a2b (for example)

nmrc@BlueDawn /home/nmrc/ > a2b    
zsh: segmentation fault (core dumped)  a2b

Nevertheless,  with an input file the executable works correctly,
Has anybody by any chance encountered this issue before? Any ideas how to solve it?

This behaviour gets worse as grafics (xgraph, xwigb, ximage and their su equivalents don't work even with arguments). 


suximage perc=98 < tst.su

/home/nmrc/sys.r/sft.local/CWP/bin/ximage: error reading input file
zsh: segmentation fault (core dumped)  suximage perc=98 < tst.su

Thanks in advance.

Ramon

On Thu, Mar 16, 2023 at 12:43 AM Shuki Ronen <shuki.ronen@gmail.com> wrote:
Okay, this is the first time I hear that people want XDR.   So we can't back out of it.  --- Shuki

On Wed, Mar 15, 2023 at 3:15 PM Gunning, James (Energy, Clayton North) <James.Gunning@csiro.au> wrote:
Hi All,
  Thanks all for the reminder about the idiosyncracies of Ubuntu. But, just to add 2c to the discussion, like quite a number of other people and
companies (including work at CSM) , I've been using SU interactively mixed with java, which latter writes native bigendian floats. It was a joy to enable the XDR versions
of SU where I didn't have to worry about endianity all the time, and scripts didn't need to be littered with swapbytes stuff.
So I'd urge caution in removing functionality that many have appreciated immensely.
Thanks
      James.

James Gunning
CSIRO
Clayton, Vic., Australia

From: Shuki Ronen <shuki.ronen@gmail.com>
Sent: Thursday, 16 March 2023 5:31 AM
To: seisunix@mailman.seismic-unix.org <seisunix@mailman.seismic-unix.org>
Subject: [Seisunix] Re: Compilation probles wis dist CWP-44.26
 
Let's stop and think if we need XDR in SU.   At the beginning SU used native endian and floating point format.  Users knew that when moving from one computer to another, byte swap and floating point format might be needed.   SU was developed on a VAX at Stanford and when I took it to CSM on a compute Gould there there was a factor of 4 in the floating point numbers.  Later people lived with moving data between big and small endians, it was sometimes a nuisance but not nearly as much of a problem as XDR is now.    Because SU can be compiled with or without XDR, usually without the users being aware of it, there is often a situation that people on the same type of computer are incompatible.   Aegrescit medendo.  

What I suggest is

1.  Back out SU off XDR.  Go back to pre XDR gettr and puttr.  I may still have an old version of SU but it's simple.
2.  Provide diagnostic tools, based on magic (https://linux.die.net/man/5/magic) to identify narive format SU files
3.  Provide either data conversion tools and/or functionality in gettr to convert the data to native format--we don't need XDR to do that.
4.  The unsigned short ns header word limits the number of samples per trace to 65K.   This was plenty in 1975 when SEGY was new but not now.   If somebody simplifies SU taking it off XDR then they can easily designate a fall back 32 bit header word to be used if ns is set to zero.

--- Shuki


On Wed, Mar 15, 2023 at 10:10 AM Paul Fertser <fercerpav@gmail.com> wrote:
Hi,

On Tue, Mar 14, 2023 at 09:47:04PM +0100, Dominique Rousset wrote:
> This is an old problem with ubuntu. There is no xdr problem with debian and
> fedora.

There will be pretty soon:
https://packages.debian.org/search?suite=bookworm&searchon=contents&keywords=rpc%2Ftypes.h

Those RPC functions were removed from glibc, so on any modern
GNU/Linux system one just needs to use libtirpc or probably
libntirpc. And the current best way to find the right flags for
external libraries on modern *nix systems (including FreeBSD) is
pkg-config utility. If no library is needed then the calls I'm
proposing would return nothing, so my current understanding is that
they should be added to Makefile.config upstream. And _ISOC99_SOURCE
define is needed for isfinite().

--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@gmail.com
_______________________________________________
Seisunix mailing list -- seisunix@mailman.seismic-unix.org
To unsubscribe send an email to seisunix-leave@mailman.seismic-unix.org
_______________________________________________
Seisunix mailing list -- seisunix@mailman.seismic-unix.org
To unsubscribe send an email to seisunix-leave@mailman.seismic-unix.org


--
Ramon
--------------------------------------------------------------------------------------------
Ramon Carbonell                                     
CSIC-GEO3BCN GeoSciences Barcelona   (http://Geo3BCN.csic.es/)        https://orcid.org/0000-0003-2019-1214