By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 1777 - Build issue: Fix hard-coded location for pkgconfig files
Summary: Build issue: Fix hard-coded location for pkgconfig files
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: other (any) (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: Other Linux
: P5 normal
Assignee: Timothy Pearson
URL:
Depends on:
Blocks:
 
Reported: 2013-12-21 20:57 CST by Darrell
Modified: 2014-01-09 19:18 CST (History)
4 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
Patch to fix arts.pc hard-coding (689 bytes, patch)
2013-12-21 20:57 CST, Darrell
Details | Diff
Patch to fix tqt.pc hard-coding (703 bytes, patch)
2013-12-22 16:17 CST, Darrell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darrell 2013-12-21 20:57:46 CST
Created attachment 1737 [details]
Patch to fix arts.pc hard-coding

Currently arts is hard-coded to install arts.pc to /usr/lib${LIB_SUFFIX}/pkgconfig.

The attached (tested) patch changes that location to ${LIB_INSTALL_DIR}/pkgconfig.
Comment 1 Francois Andriot 2013-12-22 02:25:16 CST
Hello, I do not have this problem.
Currently in my Git Tree, I have the following line in CMakeList.txt:

install( FILES ${CMAKE_CURRENT_BINARY_DIR}/arts.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )

See: http://git.trinitydesktop.org/cgit/arts/tree/CMakeLists.txt
Comment 2 Darrell 2013-12-22 13:41:30 CST
Thank you. Yes I see that in my sources too. I cannot explain why arts.pc always is installed in /usr/lib/pkgconfig rather than /opt/trinity/lib/pkgconfig until I created the patch.

Somehow ${PKGCONFIG_INSTALL_DIR} must not be configuring correctly when I build arts. arts is the only package I have this problem, which went unnoticed for a long time.

Even if others are not experiencing the problem, seems the patch is still correct to remove the hard-coding.
Comment 3 Francois Andriot 2013-12-22 14:07:33 CST
I do not understand your explanation.

If the current CMakeLists.txt use a variable named ${PKGCONFIG_INSTALL_DIR}, it means that the path is NOT hardoded: it's precisely the purpose of using a variable, to avoid hardcoding things ...

On the contrary, your patch adds an undesirable hardcoding: how would I install arts if my distribution has "pkgconfig" directory NOT located under ${LIB_INSTALL_DIR} ?

The correct way to specify the "pkgconfig" directory location is to just add a parameter to the cmake command in your build script, e.g.:
  cmake -DPKGCONFIG_INSTALL_DIR=/opt/trinity/lib/pkgconfig ..


Francois
Comment 4 Darrell 2013-12-22 14:59:10 CST
Thank you for helping.

At CMakeLists.txt:48, do you see the following?

tde_setup_install_path( PKGCONFIG_INSTALL_DIR "/usr/lib${LIB_SUFFIX}/pkgconfig" )

That reference to /usr/lib is to what I am referring as hard-coded. Why is that there?

Why do all other cmake packages have no problem installing the pc file to /opt/trinity/lib/pkgconfig but arts does not?
Comment 5 Francois Andriot 2013-12-22 15:22:51 CST
OK I understand, the hardcoding is line 48, not line 261. Sorry for missing that.

I confirm this needs to be fixed.

BTW I believe that "/usr/lib${LIB_SUFFIX}/pkgconfig" is the default value in cmake, so it was useless to redefine it with the same value.
Setting it to another value such as ${LIB_INSTALL_DIR}/pkgconfig is a better idea.

I see that tqtinterface has the same mistake.

I did not mention that problem because I always use -DPKCONFIG_INSTALL_DIR in the build script.
Comment 6 Darrell 2013-12-22 16:17:47 CST
Created attachment 1742 [details]
Patch to fix tqt.pc hard-coding

>I see that tqtinterface has the same mistake.
Okay. I checked the source tree and those are the only two instances I found. I am attaching a patch and updating the bug report summary.

>I did not mention that problem because I always use -DPKCONFIG_INSTALL_DIR in
>the build script.
I did not know that. Thank you.
Comment 7 Slávek Banko 2014-01-09 18:57:53 CST
I would say: Do not hesitate and push patches to git!
Comment 8 Darrell 2014-01-09 19:18:34 CST
>I would say: Do not hesitate and push patches to git!
arts patch pushed to git in commit 96d04559.
tqtinterface patch pushed to git in commit 4b1e77c3.