Bug 596132

Summary: funcnts reports wrong ELF class
Product: [Fedora] Fedora Reporter: Jeremy Sanders <jeremy>
Component: funtoolsAssignee: Sergio Pascual <sergio.pasra>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: sergio.pasra
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-26 12:13:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeremy Sanders 2010-05-26 11:40:25 UTC
I'm trying out the funtools command line tools. It appears funcnts doesn't work on this Fedora 12 x86_64 system:

xpc1:/data/jss/chandra/per3/northsouth:$ funcnts image.fits "circle(500,500,200)"
ERROR: /tmp/f817969: wrong ELF class: ELFCLASS32

stracing what is being run, it looks like funtools is trying to use a 32 bit compile for some reason. funtools appears to compile on the fly to make its filters.

[pid 21348] execve("/usr/libexec/gcc/x86_64-redhat-linux/4.4.3/cc1", ["/usr/libexec/gcc/x86_64-redhat-l"..., "-quiet", "-imultilib", "32", "/tmp/f143394.c", "-quiet", "-dumpbase", "f143394.c", "-m32", "-mtune=generic", "-march=i686", "-auxbase", "f143394", "-g", "-fPIC", "-o", ...], [/* 284 vars */] <unfinished ...>

This fails on this 64 bit system. I don't know why it wants to use -m32.

I tried to install funtools-devel to see whether that would help - funcnts tries to locate libfuntools.a which isn't in the funtools package. Yum finds a conflict between funtools and wcstools, as the funtools package duplicates the libwcs.so library:

Transaction Check Error:
  file /usr/lib64/libwcs.so from install of wcstools-devel-3.8.1-1.fc12.x86_64 conflicts with file from package wcslib-devel-4.3.1-3.fc12.x86_64

I suspect it doesn't make sense to separate the funtools and funtools-devel packages as funtools requires a compiler to work.

Comment 1 Sergio Pascual 2010-05-26 11:57:29 UTC
(In reply to comment #0)
> I'm trying out the funtools command line tools. It appears funcnts doesn't work
> on this Fedora 12 x86_64 system:
> 
> xpc1:/data/jss/chandra/per3/northsouth:$ funcnts image.fits
> "circle(500,500,200)"
> ERROR: /tmp/f817969: wrong ELF class: ELFCLASS32

It works for me 

$ rpm -q funtools
funtools-1.4.0-11.fc12.x86_64

$ funcnts ds9.fits "circle(500,500,200)"
 source
#   data_file:		ds9.fits
#   arcsec/pixel:	1.70006
# background
#   constant_value:	0.000000
...

So please, could you post the output of:

$ rpm -qa funtools*


> 
> stracing what is being run, it looks like funtools is trying to use a 32 bit
> compile for some reason. funtools appears to compile on the fly to make its
> filters.
> 
> [pid 21348] execve("/usr/libexec/gcc/x86_64-redhat-linux/4.4.3/cc1",
> ["/usr/libexec/gcc/x86_64-redhat-l"..., "-quiet", "-imultilib", "32",
> "/tmp/f143394.c", "-quiet", "-dumpbase", "f143394.c", "-m32", "-mtune=generic",
> "-march=i686", "-auxbase", "f143394", "-g", "-fPIC", "-o", ...], [/* 284 vars
> */] <unfinished ...>
> 
> This fails on this 64 bit system. I don't know why it wants to use -m32.
> 
> I tried to install funtools-devel to see whether that would help - funcnts
> tries to locate libfuntools.a which isn't in the funtools package. Yum finds a
> conflict between funtools and wcstools, as the funtools package duplicates the
> libwcs.so library:

This is known bug: bz #568160

> 
> Transaction Check Error:
>   file /usr/lib64/libwcs.so from install of wcstools-devel-3.8.1-1.fc12.x86_64
> conflicts with file from package wcslib-devel-4.3.1-3.fc12.x86_64
> 
> I suspect it doesn't make sense to separate the funtools and funtools-devel
> packages as funtools requires a compiler to work.

Comment 2 Jeremy Sanders 2010-05-26 12:10:12 UTC
$ rpm -qa funtools"*"
funtools-libs-1.4.0-11.fc12.x86_64
funtools-1.4.0-11.fc12.x86_64

It's possible there is something else on the system which is making it do this, as it has had the non-rpm version of funtools installed previously. I can't see from strace where this would be picked up however.

Comment 3 Jeremy Sanders 2010-05-26 12:13:00 UTC
Apologies - I've found the problem after looking through the filter source code. Our sysadmin left around an environment variable - FILTER_CC - which stuffed up the rpm version.