Posted: Thu Sep 15, 2005 3:04 pm Post subject: FORTRAN compilation issues using IRAF libraries
Hi;
I am in the process of re-compiling some fortran programs that use the IRAF
libraries, and on one I am constantly getting these
/usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0xb5): In function
`zopnks_':
: undefined reference to `__ctype_b'
errors in one program. Now I have seen errata reports about this issue for IRAF
v2.12.1, but since I am using V2.12.2 I did not think that applied.
I am compiling with g77 on a 64-bit Linux machine running Fedora Core 2
(compiling in 32-bit more with -m32) , and the preamble that goes with it is at
the bottom of this message. Do I need to get a new library, or make some
changes to circumvent the problem above? Sorry for the long readout, and I
apologize if this is something I should be changing in my code, or if some of
the links I am using are outdated.
Best Regards
Pat Durrell
*******************************************
prdurrell@WB1055 [459] make
g77 -m32 -v -c -O2 classify.f
Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --disable-libunwind-exceptions --with-system-zlib
--enable-__cxa_atexit --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
/usr/lib/gcc-lib/x86_64-redhat-linux/3.3.3/f771 classify.f -quiet -dumpbase
classify.f -m32 -auxbase classify -O2 -version -o /tmp/cceaLIDh.s
GNU F77 version 3.3.3 20040412 (Red Hat Linux 3.3.3-7) (x86_64-redhat-linux)
compiled by GNU C version 3.3.3 20040412 (Red Hat Linux 3.3.3-7).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
classify.f: In program `classify':
classify.f:155: warning:
2000 continue
1
classify.f:550: (continued):
goto 2000
2
Reference to label at (2) is outside block containing definition at (1)
classify.f:150: warning:
2040 write(*,*)'Maximum radius for aperture magnitude:'
1
classify.f:552: (continued):
goto 2040
2
Reference to label at (2) is outside block containing definition at (1)
as -V -Qy --32 -o classify.o /tmp/cceaLIDh.s
GNU assembler version 2.15.90.0.3 (x86_64-redhat-linux) using BFD version
2.15.90.0.3 20040415
g77 -m32 -O2 -o class classify.o /usr/local/iraf/iraf/bin.redhat/libimfort.a
/usr/local/iraf/iraf/bin.redhat/libsys.a
/usr/local/iraf/iraf/bin.redhat/libvops.a
/usr/local/iraf/iraf/unix/bin.redhat/libos.a -lm -lnsl -ldl -lg2c
/usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0x28): In function
`zopnks_':
: undefined reference to `__ctype_b'
/usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0xb5): In function
`zopnks_':
: undefined reference to `__ctype_b'
/usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0xee): In function
`zopnks_':
: undefined reference to `__ctype_b'
/usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0x121): In function
`zopnks_':
: undefined reference to `__ctype_b'
/usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0x133): In function
`zopnks_':
: undefined reference to `__ctype_b'
/usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0x280): more
undefined references to `__ctype_b' follow
/usr/local/iraf/iraf/unix/bin.redhat/libos.a(zgcmdl.o)(.text+0xb): In function
`zgcmdl_':
: undefined reference to `xargv'
/usr/local/iraf/iraf/unix/bin.redhat/libos.a(zgtenv.o)(.text+0x2b0): In function
`_ev_streq':
: undefined reference to `__ctype_b'
collect2: ld returned 1 exit status
make: *** [classify] Error 1
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Post generated using Mail2Forum (http://www.mail2forum.com)
Posted: Thu Sep 15, 2005 5:15 pm Post subject: FORTRAN compilation issues using IRAF libraries
Hello;
Here is a answer for a similar problem. I think the solution is to=20
add '-lcompat' to your xc line:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Support for Redhat 9 compilation was added to V2.12.2, however
when building fortran/imfort programs you must now also link in the
$iraf/unix/bin.redhat/libcompa t.a library to resolve the '__ctype_b'
symbols. This is described in more detail in section 3.2.2 of the
README file in ftp://iraf.noao.edu/iraf/v212/PCIX/README. Try adding
'-lcompat' (or the full path to libcompat.a, in the same dir as libos.a)
and let us know if you still have problems.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Cheers
Nelson Zarate
On 9/15/05, prdurrell@ysu.edu <prdurrell@ysu.edu> wrote:
>=20
> Hi;
> I am in the process of re-compiling some fortran programs that use the=20
> IRAF
> libraries, and on one I am constantly getting these
>=20
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0xb5): In=20
> function
> `zopnks_':
> : undefined reference to `__ctype_b'
>=20
> errors in one program. Now I have seen errata reports about this issue fo=
r=20
> IRAF
> v2.12.1, but since I am using V2.12.2 I did not think that applied.
>=20
> I am compiling with g77 on a 64-bit Linux machine running Fedora Core 2
> (compiling in 32-bit more with -m32) , and the preamble that goes with it=
=20
> is at
> the bottom of this message. Do I need to get a new library, or make some
> changes to circumvent the problem above? Sorry for the long readout, and =
I
> apologize if this is something I should be changing in my code, or if som=
e=20
> of
> the links I am using are outdated.
>=20
> Best Regards
>=20
> Pat Durrell
>=20
> *******************************************
>=20
>=20
> prdurrell@WB1055 [459] make
>=20
> g77 -m32 -v -c -O2 classify.f
> Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.3.3/specs
> Configured with: ../configure --prefix=3D/usr --mandir=3D/usr/share/man
> --infodir=3D/usr/share/info --enable-shared --enable-threads=3Dposix
> --disable-checking --disable-libunwind-exceptions --with-system-zlib
> --enable-__cxa_atexit --host=3Dx86_64-redhat-linux
> Thread model: posix
> gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
> /usr/lib/gcc-lib/x86_64-redhat-linux/3.3.3/f771 classify.f -quiet=20
> -dumpbase
> classify.f -m32 -auxbase classify -O2 -version -o /tmp/cceaLIDh.s
> GNU F77 version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)=20
> (x86_64-redhat-linux)
> compiled by GNU C version 3.3.3 20040412 (Red Hat Linux 3.3.3-7).
> GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D1=
31072
> classify.f: In program `classify':
> classify.f:155: warning:
> 2000 continue
> 1
> classify.f:550: (continued):
> goto 2000
> 2
> Reference to label at (2) is outside block containing definition at (1)
> classify.f:150: warning:
> 2040 write(*,*)'Maximum radius for aperture magnitude:'
> 1
> classify.f:552: (continued):
> goto 2040
> 2
> Reference to label at (2) is outside block containing definition at (1)
> as -V -Qy --32 -o classify.o /tmp/cceaLIDh.s
> GNU assembler version 2.15.90.0.3 (x86_64-redhat-linux) using BFD version
> 2.15.90.0.3 20040415
> g77 -m32 -O2 -o class classify.o/usr/local/iraf/iraf/bin.redhat/libimfort=
.a
> /usr/local/iraf/iraf/bin.redhat/libsys.a
> /usr/local/iraf/iraf/bin.redhat/libvops.a
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a -lm -lnsl -ldl -lg2c
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0x28): In=20
> function
> `zopnks_':
> : undefined reference to `__ctype_b'
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0xb5): In=20
> function
> `zopnks_':
> : undefined reference to `__ctype_b'
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0xee): In=20
> function
> `zopnks_':
> : undefined reference to `__ctype_b'
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0x121): In=
=20
> function
> `zopnks_':
> : undefined reference to `__ctype_b'
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0x133): In=
=20
> function
> `zopnks_':
> : undefined reference to `__ctype_b'
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a(zfioks.o)(.text+0x280): more
> undefined references to `__ctype_b' follow
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a(zgcmdl.o)(.text+0xb): In=20
> function
> `zgcmdl_':
> : undefined reference to `xargv'
> /usr/local/iraf/iraf/unix/bin.redhat/libos.a(zgtenv.o)(.text+0x2b0): In=
=20
> function
> `_ev_streq':
> : undefined reference to `__ctype_b'
> collect2: ld returned 1 exit status
> make: *** [classify] Error 1
>=20
>=20
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
Post generated using Mail2Forum (http://www.mail2forum.com)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum