bugGNU libunistring - Bugs: bug #53717, Workflows that rely on pkgconfig...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #53717: Workflows that rely on pkgconfig are unhappy with libunistring's lack of .pc file

Submitter:  Dan Kegel <dankegel>
Submitted:  Sun 22 Apr 2018 02:33:20 PM UTC
   
 
Category:  Interface Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  haible
Open/Closed:  Open

Jump to the original submission

Sun 01 Sep 2019 10:41:45 PM UTC, comment #6: 


> I hate to break it to you, but the world no longer revolves around autoconf, and not supporting pkgconfig makes downstream users' lifes a bit more difficult.  It might be time to consider that patch again.


I think this is very well said. It costs libunistring nothing to install a pc file. Please just do it.

Matt Turner <mattst88>
Sun 22 Apr 2018 09:07:18 PM UTC, comment #5: 

Thanks! This is helpful.

Bruno Haible <haible>
Group administrator
Sun 22 Apr 2018 07:07:09 PM UTC, comment #4: 

I think to be truly cmake native, one would not use find_library, as that gets in the way of a truly reusable CMakeLists.txt in which one can use it standalone or in a supertree build.  It's old school and slightly deprecated.

Instead, one uses FindPackage().  See page 38 et seq of
https://de.slideshare.net/DanielPfeifer1/effective-cmake

Dan Kegel <dankegel>
Sun 22 Apr 2018 06:55:49 PM UTC, comment #3: 

Then, can anyone else please answer the question:

If you try to search for an installed libunistring using the CMake command 'find_library', what does the CMake script look like, and what issues do you encounter?

Bruno Haible <haible>
Group administrator
Sun 22 Apr 2018 06:16:37 PM UTC, comment #2: 

Two notes:

- try searching for pkg-config instead, it's usually spelled that way.  Still a small number of hits, but not as small.

- Don't forget gnome/gstreamer's meson.  It's just getting started, but I recently submitted a patch to add cmake support for building an open source project, but they said "Wait, aren't all the cool kids going to meson instead of cmake?"  and merged a meson build configuration instead.

And fwiw it appears that meson likes pkgconfig, see
http://mesonbuild.com/Pkg-config-files.html

For the people who do rely on pkg-config, supporting it would be a blessing.  I understand you want to avoid that because pkg-config is less than perfect, but I assure you it's still very useful.

My cmake projects use pkg-config exclusively to find dependencies; it's far easier for me than using cmake's native stuff.  (cmake suffers from "magical alien software syndrome"; a lot of their documentation is completely unintelligible to me because it is so, so different from standard unix/linux practice.)

Dan Kegel <dankegel>
Sun 22 Apr 2018 05:36:21 PM UTC, comment #1: 


> the world no longer revolves around autoconf


Indeed, when I do a trends.google.com comparison between autoconf, cmake, scons, gradle, pkgconfig,
https://trends.google.com/trends/explore?cat=5&date=all&q=autoconf,cmake,scons,gradle,pkgconfig
I can see the following trends:
- Gradle has "taken off" in 2013.
- CMake has "taken off" in 2006 and seen increasing use since 2016.
- Interest in autoconf has strongly declined.
- Interest in SCons was as its maximum in 2006 and has since declined, like autoconf.
- Interest in pkg-config has dropped as well.

Gradle is mostly used for JavaScript and Java, I understand. So let's ignore it here.

Then, what we need is good support for locating libunistring in CMake.

But CMake has built-in support for finding libraries. See
https://cmake.org/Wiki/CMake/Tutorials/Exporting_and_Importing_Targets
https://cmake.org/cmake/help/v3.3/command/find_library.html
https://cmake.org/cmake/help/v3.3/command/target_link_libraries.html
https://cmake.org/cmake/help/v3.3/variable/CMAKE_LIBRARY_PATH.html
https://cmake.org/cmake/help/v3.3/prop_gbl/FIND_LIBRARY_USE_LIB64_PATHS.html

pkg-config has known severe problems:
1) It makes it hard to use libraries built by a developer with a custom --prefix. (Need to set and customize PKG_CONFIG_PATH. Lack of support for -Wl,-rpath option of the compiler.)
2) It does not work when the compiler that uses the library is different from the compiler that built the library, e.g. on Solaris.
In summary, use of pkg-config takes away freedoms from the developer.
Therefore, I'm looking for a solution that involves CMake but does not involve pkg-config.

If you try to search for an installed libunistring using the CMake command 'find_library', what does the CMake script look like, and what issues do you encounter?

Bruno Haible <haible>
Group administrator
Sun 22 Apr 2018 02:33:20 PM UTC, original submission:  

Hi all.
I maintain a fairly large application stack that moved from
automake to cmake some time ago, and uses pkgconfig
extensively.

Evidently a patch to support pkgconfig was proposed three years ago,
https://lists.gnu.org/archive/html/bug-libunistring/2015-01/msg00006.html
but the response was essentially "use autoconf, don't use pkgconfig".

I hate to break it to you, but the world no longer revolves around
autoconf, and not supporting pkgconfig makes downstream users'
lifes a bit more difficult.  It might be time to consider that patch again.

Dan Kegel <dankegel>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mattst88 (Posted a comment)
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by dankegel (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-22 haible CategoryBuild Interface
        StatusNone Need Info
        Assigned toNone haible

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code