Bug 254315 - textproc/luceneplusplus: error in pkgconfig file
Summary: textproc/luceneplusplus: error in pkgconfig file
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: Tilman Keskinoz
URL:
Keywords:
Depends on:
Blocks: 252799
  Show dependency treegraph
 
Reported: 2021-03-15 18:05 UTC by Olga Smirnova
Modified: 2021-04-19 17:00 UTC (History)
1 user (show)

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


Attachments
Patch for luceneplusplus pkgconf files (739 bytes, patch)
2021-04-08 21:48 UTC, Rodrigo Osorio
no flags Details | Diff
Patch for luceneplusplus pkgconf files, fix sed strings (739 bytes, patch)
2021-04-08 22:06 UTC, Rodrigo Osorio
no flags Details | Diff
Final fix (2.08 KB, patch)
2021-04-09 15:05 UTC, Rodrigo Osorio
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olga Smirnova 2021-03-15 18:05:16 UTC
The .pc file provided by lucene++ package has invalid library path "-L", which causes linkage errors.
Comment 1 Rodrigo Osorio freebsd_committer freebsd_triage 2021-04-08 21:48:47 UTC
Created attachment 223932 [details]
Patch for luceneplusplus pkgconf files

Hi,

Since last upgrade textproc/luceneplusplus generates a broken pkgconf file
who breaks compilations for ports like editors/poedit.

In short, liblucene++.pc is generated from liblucene++.pc.in template using cmake
configure_file command. The link path (-L) is followed by @LIB_DESTINATION@ variable who has to be replaced by the real value, but in this case, it's replaces by an empty string, giving this unusual string who confuses the compiler
'-L -llucene++'

This issue ca,n be fixe in many ways, I chose the simplest and replaces @LIB_DESTINATION@ by "${libdir}' string, which looks pretty standard and works as expected without touching luceneplusplus build files.

In my researches I found that the issue was caused by an early declaration of LIB_DESTINATION in the cache, before GNUInstallDirs inclusion in the root CMakeFile.txt. Doing the inclusion before the cache declaration also works.

Cheers,
-- rodrigo
Comment 2 Rodrigo Osorio freebsd_committer freebsd_triage 2021-04-08 22:06:51 UTC
Created attachment 223934 [details]
Patch for luceneplusplus pkgconf files, fix sed strings
Comment 3 Rodrigo Osorio freebsd_committer freebsd_triage 2021-04-09 11:18:23 UTC
Sorry I was wrong this patch is not enough, libpath is also broken :/
in fact, my patch juts unbreaks the compilers line.
Comment 4 Rodrigo Osorio freebsd_committer freebsd_triage 2021-04-09 15:05:42 UTC
Created attachment 223948 [details]
Final fix

This patch integrates the changes done by the lucene++ project
https://github.com/luceneplusplus/LucenePlusPlus/commit/39cd44bd54e918d25ee464477992ad0dc234dcba
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-04-12 07:53:05 UTC
A commit in branch main references this bug:

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

commit efaa198b606e6f38c34d5b3f2acd12686f6ad455
Author:     Tilman Keskinoz <arved@FreeBSD.org>
AuthorDate: 2021-04-12 07:51:30 +0000
Commit:     Tilman Keskinoz <arved@FreeBSD.org>
CommitDate: 2021-04-12 07:51:30 +0000

    Fix pkgconfig files.

    PR:             254315
    Reported by:    Olga Smirnova
    Submitted by:   rodrigo

 textproc/luceneplusplus/Makefile                       |  1 +
 ...-src_config_contrib_liblucene++-contrib.pc.in (new) | 18 ++++++++++++++++++
 .../patch-src_config_core_liblucene++.pc.in (new)      | 17 +++++++++++++++++
 3 files changed, 36 insertions(+)
Comment 6 Rodrigo Osorio freebsd_committer freebsd_triage 2021-04-15 07:08:24 UTC
Don't forget to backport this fix in 2021Q2 branch to make it available in quarterly packages.
Comment 7 Tilman Keskinoz freebsd_committer freebsd_triage 2021-04-15 12:51:23 UTC
I don't have resources to backport fixes. Feel free to do the necessary process yourself.
Comment 8 Rodrigo Osorio freebsd_committer freebsd_triage 2021-04-16 05:35:16 UTC
(In reply to Tilman Keskinoz from comment #7)
Sure, thanks.
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-04-19 16:57:35 UTC
A commit in branch 2021Q2 references this bug:

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

commit 05109f51920eb6951b5204708c8f3f0f1bad29d8
Author:     Tilman Keskinoz <arved@FreeBSD.org>
AuthorDate: 2021-04-12 07:51:30 +0000
Commit:     Rodrigo Osorio <rodrigo@FreeBSD.org>
CommitDate: 2021-04-19 18:56:13 +0000

    Fix pkgconfig files.

    PR:             254315
    Reported by:    Olga Smirnova
    Submitted by:   rodrigo

    (cherry picked from commit efaa198b606e6f38c34d5b3f2acd12686f6ad455)

 textproc/luceneplusplus/Makefile                       |  1 +
 ...-src_config_contrib_liblucene++-contrib.pc.in (new) | 18 ++++++++++++++++++
 .../patch-src_config_core_liblucene++.pc.in (new)      | 17 +++++++++++++++++
 3 files changed, 36 insertions(+)
Comment 10 Rodrigo Osorio freebsd_committer freebsd_triage 2021-04-19 17:00:44 UTC
Since a fix was committed in main and 2021Q2 branched, we can close this PR now.

@Olga: Feel free to reopen the PR if you think the issue was not addressed properly

arved@: thanks for your help solving the poedit issue :)