Undefined reference to xdr_float,…,etc

Having trouble linking to the ‘rpc’ library. My system is OpenSUSE Leap 15.5. Here is the output from the shell (Bash):

gcc -o build/user/gee/Mautocorr.o -c -O2 -x c -std=gnu11 -Wall -pedantic -fopenmp -Ibuild/include -I/usr/include/cblas build/user/gee/Mautocorr.c
gcc -o build/user/gee/autocorr.o -c -O2 -x c -std=gnu11 -Wall -pedantic -fopenmp -Ibuild/include -I/usr/include/cblas build/user/gee/autocorr.c
gcc -o build/user/gee/compress.o -c -O2 -x c -std=gnu11 -Wall -pedantic -fopenmp -Ibuild/include -I/usr/include/cblas build/user/gee/compress.c
gcc -o build/user/gee/sfautocorr -pthread -fopenmp build/user/gee/Mautocorr.o build/user/gee/autocorr.o build/user/gee/compress.o -Lbuild/lib -lrsf -lm -lblas -lcblas -llapack -lcblas -lgomp -lfftw3f -lfftw3 -lfftw3f_threads -lfftw3_threads
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_complexwrite':
file.c:(.text+0x1a54): undefined reference to `xdr_float'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.c:(.text+0x1a6b): undefined reference to `xdr_vector'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_complexread':
file.c:(.text+0x1bf2): undefined reference to `xdr_float'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.c:(.text+0x1c09): undefined reference to `xdr_vector'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_charwrite':
file.c:(.text+0x1dc1): undefined reference to `xdr_opaque'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_ucharwrite':
file.c:(.text+0x1f71): undefined reference to `xdr_opaque'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_charread':
file.c:(.text+0x20ca): undefined reference to `xdr_opaque'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_ucharread':
file.c:(.text+0x22ca): undefined reference to `xdr_opaque'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_intwrite':
file.c:(.text+0x250c): undefined reference to `xdr_int'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.c:(.text+0x2523): undefined reference to `xdr_vector'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_intread':
file.c:(.text+0x2684): undefined reference to `xdr_int'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.c:(.text+0x269b): undefined reference to `xdr_vector'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_shortread':
file.c:(.text+0x2804): undefined reference to `xdr_int'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.c:(.text+0x281a): undefined reference to `xdr_vector'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_longread':
file.c:(.text+0x2984): undefined reference to `xdr_int'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.c:(.text+0x299b): undefined reference to `xdr_vector'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_shortwrite':
file.c:(.text+0x2bdc): undefined reference to `xdr_int'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.c:(.text+0x2bf2): undefined reference to `xdr_vector'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_floatwrite':
file.c:(.text+0x2e3c): undefined reference to `xdr_float'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.c:(.text+0x2e53): undefined reference to `xdr_vector'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_floatread':
file.c:(.text+0x2fb4): undefined reference to `xdr_float'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.c:(.text+0x2fcb): undefined reference to `xdr_vector'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: build/lib/librsf.a(file.o): in function `sf_setform':
file.c:(.text+0x81a): undefined reference to `xdrmem_create'
collect2: error: ld returned 1 exit status
scons: *** [build/user/gee/sfautocorr] Error 1
scons: building terminated because of errors.
make: *** [Makefile:7: install] Error 2

I am compiling Madagascar software from reproducibility.org. Done with configuration, installed dependencies, started compiling process. But there seems to be a problem with the configuration file in “build/user/gee”. The configuration file is as below:

import os, sys, re, string
sys.path.append('../../framework')
import bldutil

progs = '''
autocorr burstnoise cconv conflict conv convf cpef1 cube deburst decon despike despike2 factorm factorn frame hconv heat3 helicon hole hpef idempatch imospray invbin invbin1 invrec1 kolmog levint light lopef losignoi lpef make maskinv misif miss miss1 msmiss mspef nhelicon npef parcel pefdeburst pfactor2 qdome randline sigmoid signoi splinebank splineplane streamissh synmarine syntop tentwt tspline ungrad velcon3 wavemovie wilson
'''

try:  # distributed version
    Import('env root pkgdir bindir libdir incdir')
    env = env.Clone()
except: # local version
    env = bldutil.Debug()
    root = None
    SConscript('../pwd/SConstruct')

src = Glob('[a-z]*.c')

dynpre = env.get('DYNLIB','') 

libs = [dynpre+'rsf']+env.get('LIBS',[])
dlibs = ['drsf']+env.get('LIBS',[])

env.Prepend(CPPPATH=['../../include'],
            LIBPATH=['../../lib'],
            LIBS=['libtirpc'])

dynlib = ('-static-intel' not in env.get('LINKFLAGS',''))

objects = []
dobjects = []
includes = []
for source in src:
    inc = env.RSF_Include(source,prefix='')
    obj = env.StaticObject(source)
    env.Ignore(inc,inc)
    env.Depends(obj,inc)

    objects.append(obj)
    includes.append(inc)

    if dynlib:
        obj = env.SharedObject(source)
        env.Depends(obj,inc)
        dobjects.append(obj)
        
lib = env.StaticLibrary('rsfgee',objects)
inc = env.Command('rsfgee.h',includes,Action(bldutil.__merge))

env.Install('../../lib',lib)
env.Install('../../include',inc)

if root:
    env.Install(libdir,lib)
    env.Install(incdir,inc)

if dynlib:
    dlib = env.SharedLibrary('rsfgee',dobjects,SHLIBPREFIX='libd',LIBS=dlibs)
    env.Install('../../lib',dlib)
    if root:
        install = env.Install(libdir,dlib)

        if dynpre and env['PLATFORM'] == 'darwin':
            env.AddPostAction(install,
            '%s -change build/api/c/libdrsf.dylib '
            '%s/libdrsf.dylib %s' % 
            (WhereIs('install_name_tool'),libdir,install[0]))


mains = Split(progs)
for prog in mains:
    sources = ['M' + prog]
    bldutil.depends(env,sources,'M'+prog)
    env.StaticObject('M'+prog+'.c')
    prog = env.Program(prog,[x + '.o' for x in sources],LIBS=libs)
    if root:
        env.Install(bindir,prog)

        if dynpre and env['PLATFORM'] == 'darwin':
            env.AddPostAction(install,
            '%s -change build/api/c/libdrsf.dylib '
            '%s/libdrsf.dylib %s' % 
            (WhereIs('install_name_tool'),libdir,install[0]))

######################################################################
# SELF-DOCUMENTATION
######################################################################
if root:
    user = os.path.basename(os.getcwd())
    main = 'sf%s.py' % user
    
    docs = [env.Doc(prog,'M' + prog) for prog in mains]
    env.Depends(docs,'#/framework/rsf/doc.py')  
    doc = env.RSF_Docmerge(main,docs)
    env.Install(pkgdir,doc)

The problem was present with other configuration files in other directories as well. By just adding ‘libtirpc’ to ‘LIBS=[]’ in ‘env.Prepend’ line, has solved the problem so far.

Please ask for any necessary info in a simple way!

Don’t note my incompetence, I’m not a programmer! Thank You!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật