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

IFC and Redhat 9

jl_wu
Einsteiger
9.678Aufrufe
Hi,

I just upgrade to RedHat 9 and try to compile my fortran stuff with Intel Fortran Compiler 7.1. But I got some error message as:

my_intel_location/compiler70/ia32/lib/libIEPCF90.a(f90fioerr.o)(.text+0x4d3): In function `f_f77ioerr':
: undefined reference to `__ctype_b'

What's the problem?

jl_wu
0 Kudos
61 Antworten
mcelrath
Einsteiger
2.834Aufrufe
I really recommend my fix #2 (downgrade glibc). I compiled with that fix (grab the srpm, unpack, add patch and modify .spec file, make new srpm, then rpm --rebuild). I made an srpm but it was before I found the patch I posted. I think I did it wrong because in some circumstances I still get __ctype_b errors.
mcelrath
Einsteiger
2.834Aufrufe
> Well my ifc have this switch :
> -tpp7 -mp -save -Bstatic -132 -vms -zero -v
> -lIEPCF90 -lpthread

You must specify -lIEPCF90 -lpthread *last*. You want those two to be linked after all your source files, object files, and other libraries. (remember that order matters when linking)
ivica_jan
Einsteiger
2.834Aufrufe
I tried to rebuild glibc-2.3.2-4.80.6 but I have problem:
Here are THE STEPS I made:
download
glibc-2.3.2-4.80.6.src.rpm
after that
rpm -Uvh glibc-2.3.2-4.80.6.src.rpm
then in /usr/src/redhat/ i put patch you suggest
and changed .spec file in order to include that patch ..
rpmbuild -bs ../SPECS/glibc-8.0.spec
it created new .src and than rebuild
rpmbuild --rebuild glibc-2.3.2-4.80.6.src.rpm
and then there is ERROR (after some time of compilation, many were ok)

here is error:
gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld-linux.so.2 -B/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/csu/ -Wl,--version-script=/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/libc.map -Wl,-soname=libc.so.6 -Wl,-z,combreloc -nostdlib -nostartfiles -e __libc_main -u __register_frame -L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux -L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/math -L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/elf -L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/dlfcn -L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/nss -L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/nis -L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/rt -L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/resolv
-L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/crypt -L/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/linuxthreads -Wl,-rpath-link=/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux:/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/math:/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/elf:/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/dlfcn:/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/nss:/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/nis:/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/rt:/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/resolv:/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/crypt:/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/linuxthreads -o /usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/libc.so -T /usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/libc.so.lds /usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/csu/abi-note.o /usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/elf/soinit.os /usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/libc_pic.os /usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/elf/sofini.os /usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/elf/interp.os /usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/elf/ld.so -lgcc
/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/libc_pic.os(.debug_info+0x2935db): undefined reference to `I'
/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/libc_pic.os(.debug_info+0x2935e6): undefined reference to `I'
/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/libc_pic.os(.debug_info+0x293619): undefined reference to `I'
collect2: ld returned 1 exit status
make[1]: *** [/usr/src/redhat/BUILD/glibc-2.3.2-20030312/build-i386-linux/libc.so] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/glibc-2.3.2-20030312'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.40716 (%build)


RPM buil d errors:
Bad exit status from /var/tmp/rpm-tmp.40716 (%build)


SO AT THE END I AM NOT ABLE TO install this glibc .. any hint?
mcelrath
Einsteiger
2.834Aufrufe
Either do fix #1 or fix #2, you tried to do both. Just install the binary rpm's from rh8...
ivica_jan
Einsteiger
2.834Aufrufe
oky I'll downgrade glibc to RH8.0 updated glibc-2.3.2-4.80.6
what packages I have to rpm -U --oldpackage?
1) glibc-2.3.2-4.80.6.i386.rpm
2) glibc-common-2.3.2-4.80.6.i386.rpm
3) glibc-devel-2-2.3.2-4.80.6.i386.rpm
4) glibc-utils-2.3.2-4.80.6.i386.rpm
5) nscd-2.3.2-4.80.6.i386.rpm


Is that all?
Thnks, Ivica
shawng
Einsteiger
2.834Aufrufe
I tried method #2, downloaded: (put them all in the same directory)
1) glibc-2.3.2-4.80.6.i386.rpm
2) glibc-common-2.3.2-4.80.6.i386.rpm
3) glibc-devel-2-2.3.2-4.80.6.i386.rpm
4) glibc-utils-2.3.2-4.80.6.i386.rpm
5) glibc-debug-2.3.2-4.80.6.i386.rpm
6) nscd-2.3.2-4.80.6.i386.rpm

then issued the command:
rpm -U --oldpackage *.rpm

However after this completed, every program seg faulted there after and I had to re-upgrade those files defore anything would work again. Any Suggestions on my this happened or how to get around this problem? Thanks!
shawng
Einsteiger
2.834Aufrufe
I first tried to "rpm -U --oldpackage" the files individulaly but I ran into dependency errors. Is there a certain order or a trick I am missing? Thanks again.
Deleted_U_Intel
Mitarbeiter
2.834Aufrufe

In consultation w/ Intel developer services I think I've solved the problem more or less completely.

First, get the files
libc-2.2.93.so
libpthread.so

from a RedHat 8.0 distribution (in my setup, these exist in both /lib and /lib/i686; I seem to need the files from the latter directory. I've then put them in /opt/intel/old_libs

Then, change the file /opt/intel/compiler70/ia32/bin/ifc.cfg to contain

-Xlinker -rpath -Xlinker /opt/intel/compiler70/ia32/lib -I/opt/intel/compiler70/ia32/include
-L/opt/intel/old_libs -lc-2.2.93

Now, everything should work as before. In addition to the old libc, this should pick out the old pthread library if you use -lpthread from the ifc command line.

Steven_L_Intel1
Mitarbeiter
2.834Aufrufe
I wanted to let people here know that Intel engineering is currently evaluating RedHat 9 to see what it breaks and what can be done about it. When we know more, we'll post an update.

Steve
Intel_C_Intel
Mitarbeiter
2.834Aufrufe
> I wanted to let people here know that Intel
> engineering is currently evaluating RedHat 9 to see
> what it breaks and what can be done about it. When
> we know more, we'll post an update.

I wanted to let Intel engineering know that we are looking
forward to have RH9 support.
Thank you for considering it.

Intel_C_Intel
Mitarbeiter
2.834Aufrufe
> Hi,
>
> I just upgrade to RedHat 9 and try to compile my
> fortran stuff with Intel Fortran Compiler 7.1. But I
> got some error message as:
>
> my_intel_location/compiler70/ia32/lib/libIEPCF90.a(f90
> ioerr.o)(.text+0x4d3): In function `f_f77ioerr':
> : undefined reference to `__ctype_b'
>
> What's the problem?
>
> jl_wu





















Hi

I met the same problem. I solved it this way:
at the link step i added : -i_dynamic, in order to use shared libraries instead of archives ones (.a)

I hope it will work

Christian

geoff_leach
Einsteiger
2.834Aufrufe
Well that was simple, wasnt it :-)

Confirming, works for me, RH9. Thanks.

> ifc -V
Intel Fortran Compiler for 32-bit applications, Version 7.1 Build 20030402Z


dfumento
Einsteiger
2.834Aufrufe
Would someone please e-mail me the proper RedHat 8 libc binary to fumento (at symbol) optonline.net?

There seems to be no way to extract the lib-xxx.so file from the RPM file without overwriting your Redhat 9 version.

Thank you
kyuho_lee
Einsteiger
2.834Aufrufe
You can extract libc-2.2.93.so from glibc-2.2.93-5.i386.rpm;

> rpm2cpio glibc-2.2.93-5.i386.rpm | cpio -idv ./lib/libc-2.2.93.so

NOTE:
"./lib" can not be omitted!!
You can figure out the full path name:

> rpm2cpio glibc-2.2.93-5.i386.rpm | cpio -t | grep libc-2.2.93.so


- Kyuho
tccarney
Einsteiger
2.834Aufrufe
I'm using RH9 and am linking with libc-2.2.93.so with ifc Version 7, build 20021028Z. Compilation and link is fine. I get runtime error: "Incorrectly built binary which accesses errno, h_errno or _res directly. Needs to be fixed."

Program seems to run and gives correct answers. Since I have one of the last free, non-commercial versions, I guess I'll live with it unless someone can tell me how to fix it. Thanks.
cbadke
Einsteiger
2.834Aufrufe
Hi,

My lab just upgraded to RH9 and ifc 6.0 and 7.0 both seem to be able to operate on their own without much of a problem. I am however having trouble linking objects generated with ifc into C/C++ programs I am developing. It would appear that the name mangling standards used by gcc for object files has changed from 2.2x to 3.x.

I was wondering if there is a patch (I can only hope) that will changed the way ifc mangles the function names in the objects in order to be compatible with the standard used by gcc 3.x. If not, is there any discussion among developers for releasing a solution any time in the near future?

Thanks
CB
TimP
Geehrter Beitragender III
2.834Aufrufe
gcc doesn't have a standard for the name mangling used by Fortran compilers other than g77. ifc, and other commercial Fortrans, don't use the g77 default convention. It's not clear to me what you are asking for. ifc uses the lower case name, single appended underscore convention, as you'll see if you try out nm.
menscher
Einsteiger
2.834Aufrufe
> I wanted to let people here know that Intel
> engineering is currently evaluating RedHat 9 to see
> what it breaks and what can be done about it. When
> we know more, we'll post an update.

A month has passed, and we're very eager to hear: any word on when this will be available?

Damian
joekrahn
Einsteiger
2.834Aufrufe
Description and work-around for IFC 7.1 on RH9:

The missing ctype_b__ problem comes from the newer GLIBC.
This is a table of flags for C functions isupper() etc.
The newer GLIBC makes these functions locale-dependent, where data is obtained via a libc function call rather than a static data structure. The data actually still exists in glibc, but it is no longer exported. As usual, RedHat favors forward advancement over backward compatibility.

The work-around: All you need is your own copy of the ctype data. I'll attach the source for my ctype.c workaround, with instructions at the top of the file.

The real fix: Intel simply needs to compile it's libraries against the newer glibc, and it should work as is. Or, if that creates backward compatibility problems, just incorporate it's own static ctype table.

Hope this helps aeveryone. (Actually, I've been using it for a while, I just never noticed the Linux/IFC forum.)

Joe Krahn
klancek
Einsteiger
2.808Aufrufe
Thanks Joe; can anyone use this fix with -static? -Lance
klancek
Einsteiger
2.808Aufrufe
PS just curious, any special steps to use a ~/.ifcrc ? Just creating one didn't seem to work. I'll stick with an alias line in my .bashrc for now
Antworten