Bug 256734 - misc/libiio: Fix compilation with libxml2 >= 2.9.12
Summary: misc/libiio: Fix compilation with libxml2 >= 2.9.12
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
Depends on:
Blocks: 256436
  Show dependency treegraph
Reported: 2021-06-20 18:06 UTC by Daniel Engberg
Modified: 2021-06-21 21:57 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (yuri)

Patch for libiio (462 bytes, patch)
2021-06-20 18:06 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg 2021-06-20 18:06:30 UTC
Created attachment 225955 [details]
Patch for libiio

Fix compilation with libxml2 2.9.12 and add LDFLAGS to prevent overlinking with iconv (Q/A stage)

Poudriere testport OK 12.2-RELEASE (amd64)
Comment 1 Yuri Victorovich freebsd_committer 2021-06-20 18:50:19 UTC
Was there an error message?

What causes overlinking?
Comment 2 Daniel Engberg 2021-06-20 18:57:15 UTC
It fails to find header files for avahi and overlinks iconv which Poudriere detects (and complains since USES= iconv isn't defined). I didn't look too much into the header file issue, I'm guessing it works by accident as current version in tree of libxml adds a lot of additional include paths.
Comment 3 commit-hook freebsd_committer 2021-06-20 19:16:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c1d72ae2b185505f3b1c31c84e2655c04111b061

commit c1d72ae2b185505f3b1c31c84e2655c04111b061
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-06-20 19:14:12 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-06-20 19:15:48 +0000

    misc/libiio: Fix compilation with libxml2>=2.9.12 by adding USES=localbase

    PR:             256734
    Reported by:    Daniel Engberg <daniel.engberg.lists@pyret.net>

 misc/libiio/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 Yuri Victorovich freebsd_committer 2021-06-20 19:18:45 UTC
(In reply to Daniel Engberg from comment #2)

I added the first part: USES=localbase.

For the iconv part we need to understand the cause of overlinking.

The project itself doesn't add iconv. Does libxml2>=2.9.12 add -liconv redundantly?
Comment 5 Gleb Popov freebsd_committer 2021-06-21 18:45:05 UTC
(In reply to Yuri Victorovich from comment #4)
According to Uses/iconv.mk, I think libxml2 uses base iconv, so it shouldn't append -liconv.
Comment 6 Gleb Popov freebsd_committer 2021-06-21 21:48:08 UTC
The port seems to build fine with new libxml2. This can be closed.
Comment 7 Yuri Victorovich freebsd_committer 2021-06-21 21:57:12 UTC
Ok, thanks.