Bug 769435 - Cross compilation can't find libproj
Summary: Cross compilation can't find libproj
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: proj
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Devrim Gündüz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-20 20:03 UTC by Mike Grant
Modified: 2011-12-20 20:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-20 20:27:42 UTC
Type: ---


Attachments (Terms of Use)

Description Mike Grant 2011-12-20 20:03:19 UTC
Description of problem:
When cross-compiling a 32bit program against libproj, it fails to link

Version-Release number of selected component (if applicable):
Present in F14 x86_64 (proj-4.7.0-3.fc14.i686) and several Fedora versions before.  No F16 install to test on, but have inspected the F16 RPM package and see the same issue is probably there.

How reproducible:
100%

Steps to Reproduce:
1. Create C code (e.g. test.c containing "int main(int argc, char *argv[]) { return 0;}")
2. Compile in 32 bit mode on a 64bit platform: gcc -m32 test.c -lproj
  
Actual results:

/usr/bin/ld: skipping incompatible /usr/lib64/libproj.so when searching for -lproj
/usr/bin/ld: cannot find -lproj
collect2: ld returned 1 exit status

Expected results:
Successful compilation of an i386 program.

Additional info:
Tracing through the compilation, it appears the problem is that /usr/lib/libproj.so doesn't exist.  While /usr/lib/libproj.so.0 exists, it is not searched for.  By specifying the full path of the library, compilation succeeds (gcc -m32 test.c /usr/lib/libproj.so.0)

Suggest adding a symlink to the package that links /usr/lib/libproj.so to /usr/lib/libproj.so.0.

Comment 1 Mike Grant 2011-12-20 20:04:30 UTC
I should add that doing:
 ln -s /usr/lib/libproj.so.0 /usr/lib/libproj.so

Gives successful compilation with -m32 -lproj

Comment 2 Mike Grant 2011-12-20 20:27:42 UTC
Never mind, I'm an idiot :)  Just realised I was missing proj-devel.i686..


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