Menu

#167 autogen should use guile's pkg config files rather than guile-config

autogen
closed
nobody
None
1
2015-03-03
2014-11-03
No

the pkg-config files take care of cross-compiling much better than guile-config. the latter is often only for the build system and not any of the cross-compile targets.

Discussion

  • Bruce Korb

    Bruce Korb - 2014-11-22

    A suggested patch would be helpful.

    $ pkg-config --cflags --libs guile  
    Package guile was not found in the pkg-config search path.
    Perhaps you should add the directory containing `guile.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'guile' found
    $ type guile
    guile is /usr/local/bin/guile
    $ guile-config
    Usage: 
      guile-config --version   - show installed script and Guile version
      guile-config --help      - show usage info (this message)
      guile-config --help SUBCOMMAND - show help for SUBCOMMAND
      guile-config link        - print libraries to link with
      guile-config compile     - print C compiler flags to compile with
      guile-config info VAR    - print Guile build directories
    
     
  • Mike Frysinger

    Mike Frysinger - 2014-11-23

    the pkg-config module is named "guile-1.8"

     
  • Bruce Korb

    Bruce Korb - 2014-11-23

    In other words, you have to know the configured version before you can get the configuration?

    $ pkg-config --libs --cflags guile-1.8                                           
    Package guile-1.8 was not found in the pkg-config search path.                   
    Perhaps you should add the directory containing `guile-1.8.pc'                   
    to the PKG_CONFIG_PATH environment variable                                      
    No package 'guile-1.8' found
    
    $ pkg-config --libs --cflags guile-2.0                                           
    -pthread -I/u/ROOT/usr/local/include/guile/2.0 -L/u/ROOT/usr/local/lib64 -lguile-2.0 -lgc
    

    OK, I'm convinced. guile-config is easier.

     
  • Bruce Korb

    Bruce Korb - 2014-11-23
    • status: open --> wont-fix
     
  • Mike Frysinger

    Mike Frysinger - 2014-11-23

    that's because you can have multiple versions of guile installed at a time. as i mentioned, relying on guile-config breaks cross-compiling because that is the version on the build system and not the target.

     
  • Bruce Korb

    Bruce Korb - 2014-11-23

    Guile sucks. The new "guile.m4" they distribute chokes:

     ./configure: line 14051: PKG_PROG_PKG_CONFIG: command not found
     >cfg> _guile_versions_to_search='2.0 1.8'
     >cfg> test -n ''
     >cfg> GUILE_EFFECTIVE_VERSION=
     >cfg> _guile_errors=
     ./configure: line 14074: syntax error near unexpected token `guile-$v,'
     ./configure: line 14074: `PKG_CHECK_EXISTS(guile-$v, GUILE_EFFECTIVE_VERSION=$v, )'
     >cfg> exit_status=2
    

    I suppose that means I have to go hunt down the dev version of pkg-config and get it installed, but it is really, really wearisome to deal with endless lists of dependencies that get detected only with stubbing your toe. Detestable.

     
  • Mike Frysinger

    Mike Frysinger - 2014-11-24

    yes, in order to run autotools, you'll need the dev version of pkg-config for the m4 file. if autogen is just pulling in the guile.m4, i guess the real bug is in guile ? once that gets updated to use pkg-config, then downstream (like autogen) will be fixed automatically ?

     
  • Bruce Korb

    Bruce Korb - 2014-11-26
    • status: wont-fix --> pending
     
  • Bruce Korb

    Bruce Korb - 2014-11-26

    I apt-got the dev version of pkg-config and stripped out my guile related config cruft, but I still have to guard against broken micro-versions of Guile. viz 2.0.0 through 2.0.3 are broken with respect to AutoGen and the guile.m4 has no mechanism to detect micro versions.

     
  • Mike Frysinger

    Mike Frysinger - 2014-11-26

    pkg-config might help here. the m4 macro lets you specify a version like:

    PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.4], ...)
    

    so if you have guile-2.0.[0123], it'll reject it.

     
  • Bruce Korb

    Bruce Korb - 2014-11-26
    $ pkg-config --modversion guile-2.0                                              
    2.0.11
    

    Ya just have to learn the ins and outs of pkg config, instead of just using the guile-defined config check.

     
  • Bruce Korb

    Bruce Korb - 2015-03-03
    • status: pending --> closed
     

Log in to post a comment.