This release does contain a fix for the “types.h” (tirpc) installation problem seen by users on Ubuntu 22.04. I have also started adding platform specific installation instructions on https://wiki.seismic-unix.org <https://wiki.seismic-unix.org/> under Documentation. Right now this includes a list of all the packages that you need to install under Ubuntu 22.04 before you can install SU.
Dear All,
Has anybody struggled with compiling version 44.26 and having trouble when
compiling with the xdr
I am getting messages like
src/su/lib/fgettr.c:148: undefined reference to `xdr_float'
src/su/lib/fputtr.c:123: undefined reference to `xdr_vector'
I am running Ubuntu 22.04 and somehow, although xdr.h is installed at
rpc/xdr.h
I am not sure why the compiler does not locate it.
Anu suggestions.
--
Ramon
--------------------------------------------------------------------------------------------
Ramon Carbonell
CSIC-GEO3BCN GeoSciences Barcelona (http://Geo3BCN.csic.es/)
https://orcid.org/0000-0003-2019-1214
-------- Courriel d’origine --------
De : Paul Fertser <fercerpav(a)gmail.com>
Envoyé : 14 mars 2023 21:09:01 GMT+01:00
À : Ramon Carbonell <ramon.carbonell(a)csic.es>
Cc : seisunix(a)seismic-unix.org
Objet : Re: [Seisunix] Compilation probles wis dist CWP-44.26
Hello,
On Tue, Mar 14, 2023 at 06:16:14PM +0100, Ramon Carbonell wrote:
> compiling with the xdr
> I am getting messages like
> src/su/lib/fgettr.c:148: undefined reference to `xdr_float'
> src/su/lib/fputtr.c:123: undefined reference to `xdr_vector'
> I am running Ubuntu 22.04 and somehow, although xdr.h is installed at rpc/xdr.h
> I am not sure why the compiler does not locate it.
That's because it's a linking error, the compiler found your include
but the linker doesn't know it needs to use an additional library.
This change makes it buildable on current Ubuntu LTS:
diff --git a/src/Makefile.config b/src/Makefile.config
index a1b8699c11e2..f7cdd4feab08 100644
--- a/src/Makefile.config
+++ b/src/Makefile.config
@@ -68,7 +68,7 @@ RANFLAGS =
ICHMODLINE = chmod 644 $@
MCHMODLINE = chmod 755 $@
-POSTLFLAGS =
+POSTLFLAGS = $(shell pkg-config --libs libtirpc)
#-----------------------------------------------------------------------
# use both X11 path conventions
@@ -92,8 +92,8 @@ CPP = /usr/bin/cpp
CC = /usr/bin/gcc
#OPTC = -g -c90 -m64 -Wall -ansi -Wno-long-long
#OPTC = -g -std=c90 -m64 -Wall -ansi -Wno-long-long
-OPTC = -g -std=c99 -m64 -Wall -ansi -Wno-long-long
-CFLAGS = -I$I $(OPTC) $(CWP_FLAGS)
+OPTC = -g -std=c99 -m64 -Wall -ansi -Wno-long-long -D_ISOC99_SOURCE
+CFLAGS = -I$I $(OPTC) $(CWP_FLAGS) $(shell pkg-config --cflags libtirpc)
# if gfortran is made using Homebrew
FC = gfortran
--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@gmail.com
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.