| Summary: | Build issue: Fix hard-coded location for pkgconfig files | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Darrell <darrella> |
| Component: | other (any) | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | albator78, bugwatch, darrella, slavek.banko |
| Priority: | P5 | ||
| Version: | R14.0.0 [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Attachments: |
Patch to fix arts.pc hard-coding
Patch to fix tqt.pc hard-coding |
||
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
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.
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
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?
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.
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. I would say: Do not hesitate and push patches to git! >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.
|
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.