Bug 208797 - graphics/devil: linking with static libs does not work
Summary: graphics/devil: linking with static libs does not work
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 12:20 UTC by fcsk.aim
Modified: 2016-04-17 14:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fcsk.aim 2016-04-14 12:20:45 UTC
Hi, static linking with devil don't work.

;)
Comment 1 fcsk.aim 2016-04-15 09:15:12 UTC
I installl devil with pkg install devil,  when i  want to like static devil amd64 libs i get undefined references.

With i386 works well, no problems... just amd64 libs.
Comment 2 Dmitry Marakasov freebsd_committer 2016-04-15 12:33:08 UTC
Please attach relevant logs and steps to reproduce the problem.
Comment 3 fcsk.aim 2016-04-15 14:47:38 UTC
https://mega.nz/#!h1lRAS4S!HR9ri-_da0N5idsqFAOMFmCwmyU8xgvvfAxK3-PED3g

Here is a video.
Comment 4 Dmitry Marakasov freebsd_committer 2016-04-15 17:07:30 UTC
This is expected behavior. Static libs do not track dependencies, so while with shared linking all dependent libs are linked automatically, with static linking that's not the case, and you need to specify all indirectly required libraries (e.g. ones used by libIL itself) manually. From what I see from the video, you have undefined references to symbols from libjasper, libnvtt, libjbig, and you don't have these in your LIBS.

One solution is to stick to shared linking, another is to use `pkg-config --libs --static IL` output instead of hardcoded library list, that's also much more portable, as the lib list may vary across different OS/distros (and even on FreeBSD, if you rebuild devil port with non-default options).

One thing not clear to me is that you've written that the behavior is different on i386 compared to amd64. That can't be the case.
Comment 5 fcsk.aim 2016-04-17 14:33:05 UTC
Seems you are right.
But i can't find libnvtt.a