Re: wrapit error

From: Micah Sklut <micahs2005_at_nyahnyahspammersnyahnyah>
Date: Fri, 2 Nov 2007 11:58:31 -0400

In reference to the following share library error I received after trying to
run an NCL script with a WRAPIT object file on Fedora Core 7.

warning:An error occurred loading the external file
/home/barells/swellinfo/ncl/namwind.so, file not loaded
/opt/intel/fce/9.1.040/lib/libirc.so: cannot restore segment prot after
reloc: Permission denied warning:error at line 7 in file write_namwind4.ncl

After doing a google search, I've learned that newer Linux distros include a
package called SELinux, which stands for Security Enabled Linux. The
default behavior of SELinux may cause problems accessing share libraries,
like the one I used with my Intel Fortran compiler that I used with WRAPIT.

To alleviate this problem I simply disabled SELinux by editing
/etc/sysconfig/selinux (for me on fedora core 7 this is a symbolic link to
/etc/sysconfig/selinux/config ).
When you edit this file, you'll have to do a system restart to make use of
the new settings.

It appears that you can also change the security settings of individual
files using the chcon command.
I imagine others may run into this problem down the line as well, and thus
the motivation for sending this to the email list.

Micah

On 10/29/07, Micah Sklut <micahs2005_at_gmail.com> wrote:
>
> Hi Mary,
>
> I'm back... I successfully installed the 64bit intel fortran. But, I'm
> now getting a share library error. So, i'm not sure if this is an NCL
> problem or rather a problem with my ifort install.
>
> Here is the output after trying to run my ncl script:
>
> warning:An error occurred loading the external file
> /home/barells/swellinfo/ncl/namwind.so, file not loaded
> /opt/intel/fce/9.1.040/lib/libirc.so: cannot restore segment prot after
> reloc: Permission denied
> warning:error at line 7 in file write_namwind4.ncl
>
> fatal:syntax error: line 97 in file write_namwind4.ncl before or near :
> WRITE:
> -----^
>
> fatal:error in statement
> fatal:Syntax Error in block, block not executed
> fatal:error at line 101 in file write_namwind4.ncl
>
> Anything come to mind on this error?
>
> Thank you.
>
> Micah
>
>
> On 10/26/07, Mary Haley <haley_at_ucar.edu> wrote:
> >
> >
> > Hi Micah,
> >
> > Thanks for the update. I'm cc-ing Rick Grubin so he knows as well.
> > Good luck getting the 64-bit compiler installed.
> >
> > --Mary
> >
> > On Fri, 26 Oct 2007, Micah Sklut wrote:
> >
> > > Hi Mary,
> > >
> > > Sorry for the delayed response.
> > >
> > > I have just realized that I installed the fortran compiler for 32 bit
> > > applications rather than 64.
> > > I am having troubles installing the 64bit compiler on fedora core 7,
> > but
> > > once I do get it installed I'm sure WRAPIT will work as it did on my
> > other
> > > 64bit system.
> > >
> > > Thanks as always for your quick and helpful response.
> > >
> > > Micah
> > >
> > >
> > >
> > > On 10/23/07, Mary Haley <haley_at_ucar.edu> wrote:
> > >>
> > >>
> > >> Hi Micah,
> > >>
> > >> [I'm taking this offline until we can resolve this.]
> > >>
> > >> You said you were able to do this on another 64-bit machine. Were
> > >> you using the "-in" option there as well? I'm wondering if maybe
> > >> your ifort compiler is configured to build 32-bit objects
> > >> by default, and maybe you need to add an option like "-m64" to
> > >> force a 64-bit object to be created? If so, you will need to
> > >> modify WRAPIT to do this (and I can help with this).
> > >>
> > >> Can you do a simple compilation of a Fortran file with your
> > >> ifort compiler, and then do a "file" on the resultant *.o
> > >> file to see if it gives any information about type of object
> > >> it is? And then, can you check if "ifort" has some kind of
> > >> -m64 option, and if it does, compile the same Fortran file
> > >> with this option, do a "file", and see if anything is different.
> > >>
> > >> For example:
> > >>
> > >> ifort test.f
> > >> file test.o
> > >> ifort -m64 test.f
> > >> file test.o
> > >>
> > >> --Mary
> > >>
> > >>
> > >>
> > >> On Mon, 22 Oct 2007, Micah Sklut wrote:
> > >>
> > >>> Hi Mary,
> > >>>
> > >>> I tried compiling without the -in option, but unsuccessfully. I used
> > the
> > >> gcc
> > >>> command (couldnt find g77), but received errors.
> > >>> The other important aspect I previously ignored was that I'm also
> > >> calling a
> > >>> module file - calendar.f90.
> > >>>
> > >>> So, i have been creating my calendar.mod file by: ifort calendar.f90
> > .
> > >>> Then, compiling with WRAPIT like: WRAPIT -in namwind.stub
> > namwind.f90
> > >>> calendar.f90
> > >>>
> > >>> On my previous 64 bit machine, I had no problem compiling with the
> > -in
> > >>> option.
> > >>>
> > >>> Not sure where the i386 output is coming in?
> > >>>
> > >>> Micah
> > >>>
> > >>> On 10/22/07, Mary Haley < haley_at_ucar.edu> wrote:
> > >>>>
> > >>>> Micah,
> > >>>>
> > >>>> The other issue here might be that the NCL you have was compiled
> > >>>> with the GNU compilers (g77, gcc), and you are using the Intel
> > >>>> compilers to build the shared object. There may be some kind
> > >>>> of incompatibility here.
> > >>>>
> > >>>> If you don't use the "-in" option, does it work?
> > >>>>
> > >>>> WRAPIT namwind.stub namwind4.f90
> > >>>>
> > >>>> --Mary
> > >>>>
> > >>>> On Thu, 18 Oct 2007, Micah Sklut wrote:
> > >>>>
> > >>>>> Hi Rick,
> > >>>>>
> > >>>>> The new host is a 64 bit system. It is running a Intel Core 2 Quad
> >
> > >> Core.
> > >>>>>
> > >>>>> I downloaded ncl-4.3.1.Linux_x86_64_gcc4.tar.gz and installed on
> > >> fedora
> > >>>> core
> > >>>>> 7.
> > >>>>>
> > >>>>> uname -A output:
> > >>>>> Linux Micah-PC 2.6.21-1.3194.fc7 #1 SMP Wed May 23 22:47:07 EDT
> > 2007
> > >>>> x86_64
> > >>>>> x86_64 x86_64 GNU/Linux
> > >>>>>
> > >>>>> I tried adding the -fPIC option, and am still receiving the same
> > >> error.
> > >>>>> NCARG_ROOT has been set correctly.
> > >>>>>
> > >>>>> Any other thoughts on this ?
> > >>>>>
> > >>>>> Thank you very much.
> > >>>>>
> > >>>>> Micah
> > >>>>>
> > >>>>> On 10/18/07, Rick Grubin < grubin_at_ucar.edu> wrote:
> > >>>>>>
> > >>>>>> Hi Micah
> > >>>>>>
> > >>>>>>> I just installed ncl on a new system.
> > >>>>>>
> > >>>>>> What type of system is this new host? 32bit or 64bit? Did you
> > >>>>>> download the proper binary for it?
> > >>>>>>
> > >>>>>> It would help to know this information; the output from 'uname
> > -a' is
> > >>>>>> also helpful.
> > >>>>>>
> > >>>>>>> I tried to recompile my fortran files with wrapit, but
> > encountered
> > >>>>>>> the following error message when I used this command:
> > >>>>>>>
> > >>>>>>> WRAPIT -in namwind.stub namwind4.f90
> > >>>>>>>
> > >>>>>>> Error:
> > >>>>>>> WRAPIT Version: 051007
> > >>>>>>> /opt/intel/fc/9.1.040/bin/ifort
> > >>>>>>> COMPILING namwind4.f90
> > >>>>>>> LINKING
> > >>>>>>> ld: warning: i386:x86-64 architecture of input file `WRAPIT.o'
> > is
> > >>>>>>> incompatible with i386 output
> > >>>>>>
> > >>>>>> The error here indicates you have a 64bit host -- true?
> > >>>>>>
> > >>>>>> The error is telling you that you're trying to link a 32bit
> > object
> > >>>>>> with 64bit objects, which you cannot do. I would
> > >>>>>> suggest using the option '-fPIC' on the command line ('WRAPIT -in
> > -
> > >>>>>> fPIC namwind.stub namwind4.f90') to make
> > >>>>>> sure you're using relocatable objects.
> > >>>>>>
> > >>>>>> Please also make sure you've downloaded the correct NCL
> > distribution
> > >>>>>> for your host.
> > >>>>>>
> > >>>>>> -Rick.
> > >>>>>> ----
> > >>>>>> Rick Grubin NCAR/TDD/CISL/VETS
> > >>>>>> Visualization + Enabling Technologies
> > >>>>>> grubin_at_ucar.edu 303.497.1832
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>
> > >>>>
> > >>>
> > >>
> > >
> >
>
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Nov 02 2007 - 09:58:31 MDT

This archive was generated by hypermail 2.2.0 : Fri Nov 02 2007 - 10:04:33 MDT