https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082007-11-27T21:34:01ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #863: Gnome won't compile: cannot find -lpcrehttps://bugs.dragonflybsd.org/issues/863?journal_id=38612007-11-27T21:34:01Zjustin
<ul></ul><p>I don't have an answer for why that isn't compiling for you, but for an<br />immediate fix:</p>
<p>pkg_add<br /><a class="external" href="http://pkgbox.dragonflybsd.org/packages/DragonFly-1.10.1/i386/x11/gtk2+-2.12.0nb1.tgz">http://pkgbox.dragonflybsd.org/packages/DragonFly-1.10.1/i386/x11/gtk2+-2.12.0nb1.tgz</a></p> DragonFlyBSD - Bug #863: Gnome won't compile: cannot find -lpcrehttps://bugs.dragonflybsd.org/issues/863?journal_id=38632007-11-28T01:04:00Zwa1ter
<ul></ul><p>On Tue, 27 Nov 2007, Stephane Russell wrote:</p>
<pre><code>^<sup>^^</sup>^^^^^^^^^^^^^^</code></pre>
<p>The pkgsource build system does not look in /usr/pkg/lib during the<br />compile. It looks in the .buildlink/lib directory instead, as I<br />marked above. Now, the real question is whether libpcre appears<br />in your .buildlink/lib directory.</p>
<p>Here is mine, for example:</p>
<p>~# ls -l /usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libpcre.*<br />/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libpcre.a -> /usr/pkg/lib/libpcre.a<br />/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libpcre.la<br />/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libpcre.so -> /usr/pkg/lib/libpcre.so<br />/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libpcre.so.0 -> /usr/pkg/lib/libpcre.so.0<br />/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libpcre.so.0.0.1 -> /usr/pkg/lib/libpcre.so.0.0.1</p>
<p>If those links are not created properly during the buildlink phase,<br />the compile will fail later on.</p> DragonFlyBSD - Bug #863: Gnome won't compile: cannot find -lpcrehttps://bugs.dragonflybsd.org/issues/863?journal_id=38712007-11-29T10:58:00Zstephane.russell
<ul></ul><p>You were right, pcre was not a dependency, so it wasn't added in the<br />buildlink process. pcre was included in the gtk2 link with a "-lpcre" <br />statement, for a reason I still don't understand. I could'nt find why<br />that flag is added, since nothing in gtk2 requires it, not even in the<br />gtk2 pkgsrc build files.</p>
<p>Anyway, I solved the problem by adding pcre as a dependency in gtk2, and<br />everything is fine since. If somebody ever finds why this flag was<br />added, please advise me.</p>
<p>Thanks for the help.</p>
<p>SR</p> DragonFlyBSD - Bug #863: Gnome won't compile: cannot find -lpcrehttps://bugs.dragonflybsd.org/issues/863?journal_id=38742007-11-30T21:27:01Zwa1ter
<ul></ul><p>On Wed, 28 Nov 2007, Stephane Russell wrote:</p>
<p>The 'magic' is in the buildlink3 files, which are a fundamental part of<br />the pkgsrc build system.</p>
<p>Look at x11/gtk2/buildlink3.mk, for example, and you will see<br />.include "../../devel/glib2/buildlink3.mk", which make sense because<br />glib2 is an important part of gtk2.</p>
<p>Between the buildlink3 system and the universally beloved libtool, you<br />eventually pull in /usr/pkg/lib/libglib-2.0.la, which contains this:</p>
<ol>
<li>Libraries that this one depends upon.<br />dependency_libs='-L/usr/pkg/lib -lpcre -lintl'</li>
</ol>
<p>Trivial, really, once you've spent a decade bashing your head against<br />the inevitability of it all :o)</p>
<p>A quick and dirty way to investigate these dependencies is to do a<br />'bmake patch' for gtk2, which takes only a minute, and then poke<br />around in the work/.buildlink directory to see if libpcre shows up.<br />If not, you can try to work backwards from there. The work/.work.log<br />can also be very helpful.</p> DragonFlyBSD - Bug #863: Gnome won't compile: cannot find -lpcrehttps://bugs.dragonflybsd.org/issues/863?journal_id=39492007-12-08T13:19:02Zstephane.russell
<ul></ul><p>I looked at glib2 after your post, and I could see that pcre is not a<br />dependecy of glib2 because glib2 provides it's own. But it's not<br />intalling it (it's not in it's PLIST), so it's not in it's buildlink<br />either. Mystery solved. ;-)</p>
<p>Thanks for the help.</p>
<p>SR</p>