Bug 596132 - funcnts reports wrong ELF class
funcnts reports wrong ELF class
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: funtools (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: Sergio Pascual
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-26 07:40 EDT by Jeremy Sanders
Modified: 2010-05-26 08:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-26 08:13:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeremy Sanders 2010-05-26 07:40:25 EDT
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 07:57:29 EDT
(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 08:10:12 EDT
$ 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 08:13:00 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.