Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Undefined reference

Roberta_G_
Beginner
478 Views

Hi,
I have a user who is trying to compile a Fortran Code using the Intel Fortran Compiler for Linux 10.1.018 (32-bit version) on SLES10.

He is getting a lot of undefined reference errors:

mcnpc.a(mcnpc.o): In function `xscfont':
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0xb4): undefined reference to `XLoadQueryFont'
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0xd4): undefined reference to `XSetFont'
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0x195): undefined reference to `XLoadQueryFont'
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0x1b5): undefined reference to `XSetFont'
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0x1d7): undefined reference to `XSetFont'
ETC

This is his compile statment:

ifort -Qoption,link,-R/opt/intel/fc/10.1.018/lib -Qoption,link,-R/usr/lib64/gcc/x86_64-suse-linux/4.1.2/32 -Qoption,link,-R/usr/lib64/gcc/x86_64-suse-linux/4.1.2/32/.. -Qoption,link,-R/usr/lib -lifport -lifcore -limf -lm -lipgo -lirc -lgcc_s_32 -lirc_s -ldl -L/opt/intel/cc/10.1.018/lib -o mcnpx f77main/f77main.o mcnpf.a mcnpf/GLOBAL1_zc.o mcnpf/GLOBAL2_vv.o mcnpf/GLOBAL3_st.o mcnpf/GLOBAL4_cg.o mcnpf/GLOBAL4_mb.o mcnpf/GLOBAL4_lk.o mcnpf/GLOBAL5_cm.o mcnpf/GLOBAL6_ht.o mcnpf/IMCN_jc.o mcnpf/GKSSIM_gs.o mcnpf/LAMBDA_lm.o mcnpf/LAMBDA_lt.o mcnpf/MCPLOT_mp.o mcnpf/PLOT_pc.o mcnpf/GLOBAL6_mc.o mcnpf/cemmod.o mcnpf/laqmod31.o mcnpc.a utils.a gvaviv.a lcs.a lcs/btbd.o lcs/cabd.o lcs/e0bd.o lcs/elbd.o lcs/h1bd.o lcs/hebd.o lcs/inbd.o lcs/isbd.o lcs/phbd.o lcs/pqbd.o dedx.a dedx/atmdat.o meshtal.a histp.a spabi.a spabi/bdincl1.o spabi/bdincl2.o fluka89.a fluka89/bdnopt.o fluka89/blkdt1.o fluka89/blkdt2.o fluka89/blkdt3.o fluka89/blkdt4.o fluka89/blkdt5.o fluka89/blkdt6.o fluka89/blkdt7.o fluka89/f2bd.o hexs.a hexs/nebd.o hexs/xsbd.o -Qoption,link,-R/usr/X11R6/lib -lX11

Any thoughts on why he is getting these errors would be greatly appreciated.

Many thanks in advance,
Roberta

0 Kudos
2 Replies
Ron_Green
Moderator
478 Views
Quoting - rgigon@slb.com

Hi,
I have a user who is trying to compile a Fortran Code using the Intel Fortran Compiler for Linux 10.1.018 (32-bit version) on SLES10.

He is getting a lot of undefined reference errors:

mcnpc.a(mcnpc.o): In function `xscfont':
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0xb4): undefined reference to `XLoadQueryFont'
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0xd4): undefined reference to `XSetFont'
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0x195): undefined reference to `XLoadQueryFont'
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0x1b5): undefined reference to `XSetFont'
../../../../bear/mcnpx_build/v26f/src/mcnpx/mcnpc/mcnpc.c:(.text+0x1d7): undefined reference to `XSetFont'
ETC

This is his compile statment:

ifort -Qoption,link,-R/opt/intel/fc/10.1.018/lib -Qoption,link,-R/usr/lib64/gcc/x86_64-suse-linux/4.1.2/32 -Qoption,link,-R/usr/lib64/gcc/x86_64-suse-linux/4.1.2/32/.. -Qoption,link,-R/usr/lib -lifport -lifcore -limf -lm -lipgo -lirc -lgcc_s_32 -lirc_s -ldl -L/opt/intel/cc/10.1.018/lib -o mcnpx f77main/f77main.o mcnpf.a mcnpf/GLOBAL1_zc.o mcnpf/GLOBAL2_vv.o mcnpf/GLOBAL3_st.o mcnpf/GLOBAL4_cg.o mcnpf/GLOBAL4_mb.o mcnpf/GLOBAL4_lk.o mcnpf/GLOBAL5_cm.o mcnpf/GLOBAL6_ht.o mcnpf/IMCN_jc.o mcnpf/GKSSIM_gs.o mcnpf/LAMBDA_lm.o mcnpf/LAMBDA_lt.o mcnpf/MCPLOT_mp.o mcnpf/PLOT_pc.o mcnpf/GLOBAL6_mc.o mcnpf/cemmod.o mcnpf/laqmod31.o mcnpc.a utils.a gvaviv.a lcs.a lcs/btbd.o lcs/cabd.o lcs/e0bd.o lcs/elbd.o lcs/h1bd.o lcs/hebd.o lcs/inbd.o lcs/isbd.o lcs/phbd.o lcs/pqbd.o dedx.a dedx/atmdat.o meshtal.a histp.a spabi.a spabi/bdincl1.o spabi/bdincl2.o fluka89.a fluka89/bdnopt.o fluka89/blkdt1.o fluka89/blkdt2.o fluka89/blkdt3.o fluka89/blkdt4.o fluka89/blkdt5.o fluka89/blkdt6.o fluka89/blkdt7.o fluka89/f2bd.o hexs.a hexs/nebd.o hexs/xsbd.o -Qoption,link,-R/usr/X11R6/lib -lX11

Any thoughts on why he is getting these errors would be greatly appreciated.

Many thanks in advance,
Roberta

As you know, these are symbols from X11 libs. On my Redhat system, what is above is correct - libX11.a has XSetFont for example. I tried my SLES 10 system and this lib does not exist on it. Perhaps SLES doesn't install all the X11 libs by default?? Unknown. I used 'nm' on the SLES system and couldn't find XSetFont anywhere.

Any SLES advocates know where to find XSetFont in the X11 libs (32bit) on SLES 10?

0 Kudos
TimP
Honored Contributor III
478 Views

As you know, these are symbols from X11 libs. On my Redhat system, what is above is correct - libX11.a has XSetFont for example. I tried my SLES 10 system and this lib does not exist on it. Perhaps SLES doesn't install all the X11 libs by default?? Unknown. I used 'nm' on the SLES system and couldn't find XSetFont anywhere.

Any SLES advocates know where to find XSetFont in the X11 libs (32bit) on SLES 10?

My SLES10 installation has /usr/X11R6/libX11.so, I think by default, but no 32-bit libX11.a

The firewall blocks me from running YaST to look for X11 installation options.

0 Kudos
Reply