Bug 7821 - Library search path wrong
: Library search path wrong
Status: RESOLVED FIXED
Product: Development platform
Madde
: 5.0-final
: All Maemo
: Low normal with 1 vote (vote)
: ---
Assigned To: unassigned
: sdk-madde-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2010-01-11 21:58 UTC by Harald Fernengel
Modified: 2010-02-03 13:23 UTC (History)
3 users (show)

See Also:


Attachments
gcc specs file (427 bytes, text/plain)
2010-01-22 12:45 UTC, Rontti
Details


Note

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


Description Harald Fernengel (reporter) nokia 2010-01-11 21:58:08 UTC
SOFTWARE VERSION: MADDE 0.5 (target fremantle-qt-0942)

EXACT STEPS LEADING TO PROBLEM: 
Specifying "-L/foo -lfoo" will always pick libfoo.so from the sysroot's
/usr/lib, ignoring the -L parameter.

EXPECTED OUTCOME:
-L/foo -lfoo should link to the sysroot's /foo/libfoo.so, not to the sysroot's
/usr/lib/libfoo.so

ACTUAL OUTCOME:
Lots of undefined symbols since the wrong library is chosen by the linker

REPRODUCIBILITY:
always. Use the "-Wl,--dll-verbose" switch to figure out which library the
linker chooses.

In my case:

g++ -Wl,--dll-verbose -L/opt/qt4-maemo5/lib -lQtCore ... :

attempt to open
/Users/harald/.madde/0.5/sysroots/fremantle-qt-arm-sysroot-0942//usr/lib/libQtCore.so
succeeded

EXTRA SOFTWARE INSTALLED:
Qt 4.6

OTHER COMMENTS:
This makes it impossible to link a Qt 4.6 application (which is installed to
/opt/qt4-maemo5/lib), because the outdated Qt 4.5 in /usr/lib always gets the
preference.

The workaround is to remove /usr/lib/libQt[Core,Gui].so


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us)
AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
Comment 1 Rontti 2010-01-22 12:45:40 UTC
Created an attachment (id=2092) [details]
gcc specs file
Comment 2 Rontti 2010-01-22 12:50:30 UTC
(In reply to comment #1)
> Created an attachment (id=2092) [details] [details]
> gcc specs file
> 
In some reason my comment were dropped when I added attachment.
Anyhow. Fixed in internal repo.

Workaround:
You have to have created target fremantle-qt-0942
Replace file {madde_install_path}/0.5/target/fremantle-qt-0942/specs
by attachment.
Comment 3 Tomi Ollila 2010-02-03 13:23:03 UTC
Fixed in the internal version 0.6.11