#!/usr/bin/perl -w use strict; use ExtUtils::PkgConfig; my %pango = ExtUtils::PkgConfig->find('pango'); my %pangocairo = ExtUtils::PkgConfig->find ('pangocairo'); my $libs = $pango{libs} ; printf("libs = $libs|\n"); my $pclibs = $pangocairo{libs}; printf("pclibs = $pclibs|\n"); $libs .= $pclibs; printf("libs = $libs|\n");

Background: I'm a longtime gentoo linux user with two different systems both using testing (as opposed to stable). On one system I had an issue compiling Pango, on the other I didn't. I can't figure out why so I turn to the monks for help.

The problem was a missing space. On the system without problems the above code (adapted from the Makefile.PL from Pango for illustration) outputs this (the vertical bars are there to show the spaces)

libs = -lpango-1.0 -lgobject-2.0 -lglib-2.0 | pclibs = -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo + | libs = -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lpangocairo-1.0 -lpango-1 +.0 -lgobject-2.0 -lglib-2.0 -lcairo |
but on the other system, using the same version of ExtUtils::PkgConfig and anything else relevant I could think of (perl-5.20 for instance) the output was missing the spaces at the end causing the last line to smash together the "-lglib-2.0 -lpangocairo-1.0" bit into one piece and causing a compile error.

libs = -lpango-1.0 -lgobject-2.0 -lglib-2.0| pclibs = -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo +| libs = -lpango-1.0 -lgobject-2.0 -lglib-2.0-lpangocairo-1.0 -lpango-1. +0 -lgobject-2.0 -lglib-2.0 -lcairo|

Can anyone tell me what the heck is going on? I am at a complete loss as to where to look for the problem, which started around 2-3 months ago. Before that the same code worked as expected.


In reply to ExtUtils:PkgConfig adds proper spaces on one system, not on another, why? by mwalimu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.