orocos-toolchain / utilrb

A small set of useful Ruby classes and extensions
Other
2 stars 13 forks source link

pkgconfig syntax #37

Open joaobrittoneto opened 6 years ago

joaobrittoneto commented 6 years ago

Hi,

I'm trying to move to Gazebo9 in rock-gazebo but got the follow error:

2 in directory /home/joao/rock-gazebo/simulation/orogen/rock_gazebo
113 ===== Internal error =======
114 Please report the following error to the orogen developers
115 /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:115:in `find_matching_version': undefined method `split' for nil:NilClass (NoMethodError)
116     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:115:in `find_matching_version'
117     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:76:in `get'
118     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:214:in `block in parse_dependencies'
119     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:211:in `map'
120     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:211:in `parse_dependencies'
121     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:348:in `load_fields'
122     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:83:in `get'
123     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:216:in `block in parse_dependencies'
124     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:211:in `map'
125     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:211:in `parse_dependencies'
126     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:347:in `load_fields'
127     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:83:in `get'
128     from /home/joao/rock-gazebo/tools/utilrb/lib/utilrb/pkgconfig.rb:97:in `new'
129     from /home/joao/rock-gazebo/tools/orogen/lib/orogen/gen/project.rb:854:in `using_library'
130     from rock_gazebo.orogen:6
131     from /home/joao/rock-gazebo/tools/orogen/lib/orogen/gen/project.rb:1371:in `load'
132     from /home/joao/rock-gazebo/tools/orogen/bin/orogen:170:in `block in <main>'
133     from /home/joao/rock-gazebo/tools/orogen/lib/orogen/base.rb:67:in `beautify_loading_errors'
134     from /home/joao/rock-gazebo/tools/orogen/bin/orogen:160:in `<main>'
135 Exit: pid 12686 exit 1

I could track the error to a pkgconfig of a Gazebo9's dependency (libcurl >= jsoncpp)

~/rock-gazebo $ cat /usr/lib/x86_64-linux-gnu/pkgconfig/ignition-fuel_tools1.pc
prefix=/usr
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include/ignition/fuel_tools1

Name: Ignition fuel_tools
Description: A set of fuel_tools classes for robot applications
Version: 1.0.0
Requires:
Requires.private: libcurl >=  jsoncpp yaml-0.1 libzip ignition-common1
Libs: -L${libdir} -lignition-fuel_tools1 
Libs.private:
CFlags: -I${includedir}  -std=c++11

The understanding of ignition's team is to check for a number after the >= operator. Should it be the case here?

doudou commented 6 years ago

The understanding of ignition's team is to check for a number after the >= operator.

There understanding is plain wrong, as both published documentation and freedesktop's reference implementation of pkg-config show. See my answer on bitbucket.

For what it's worth, though, Utilrb's pkg-config implementation does not parse versions properly either.