pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: x11/motif fails to compile due to library not found for -lintl



On 8/21/14, 6:14 PM, J. Lewis Muir wrote:
> Hello.
>
> I'm trying to build x11/motif from -current on Mac OS X Mavericks
> (10.9.4), but it's failing to compile due to not finding a library for
> "-lintl" (provided by devel/gettext-lib):

Attached is a patch to devel/flex that fixes the problem.  Would a
pkgsrc developer be willing to consider this fix and commit it if it
seems correct?

I think the problem was that the wrapper phase of x11/motif was using
the dependency_libs variable from /pkg-current/lib/libfl.la to determine
which libraries to link against.  That variable looked like this:

===
dependency_libs='-L/pkg-current/lib -lintl -liconv -lc -lm'
===

And otool confirmed this for the library:

===
$ otool -L /pkg-current/lib/libfl.dylib
/pkg-current/lib/libfl.dylib:
        /pkg-current/lib/libfl.2.dylib (compatibility version 3.0.0, \
current version 3.0.0)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/\
CoreFoundation (compatibility version 150.0.0, current version 855.17.0)
        /pkg-current/lib/libintl.8.dylib (compatibility version \
10.0.0, current version 10.2.0)
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, \
current version 7.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, \
current version 1197.1.1)
===

But there's no include in devel/flex/buildlink3.mk for
devel/gettext-lib/buildlink3.mk, which is why the wrapper phase of
x11/motif did not create the symlinks in x11/motif/work/.buildlink/lib
for /pkg-current/lib/libintl*.

So, essentially devel/flex/buildlink3.mk was not consistent with
dependency_libs in /pkg-current/lib/libfl.la, and the wrapper phase of
x11/motif was using both of those, expecting them to be consistent.

The patch adds a build-dependency include in devel/flex/buildlink3.mk
for devel/gettext-lib/buildlink3.mk which causes the wrapper phase of
x11/motif to create the needed symlinks, and then x11/motif builds
successfully.

Does a pkgsrc developer agree with this analysis and fix, and if so,
would you be willing to commit it?

Thank you!

Lewis
Index: buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/flex/buildlink3.mk,v
retrieving revision 1.6
diff -b -u -r1.6 buildlink3.mk
--- buildlink3.mk       20 Mar 2009 19:24:13 -0000      1.6
+++ buildlink3.mk       23 Aug 2014 01:24:03 -0000
@@ -9,6 +9,9 @@
 BUILDLINK_API_DEPENDS.flex+=   flex>=2.5.4a
 BUILDLINK_PKGSRCDIR.flex?=     ../../devel/flex
 BUILDLINK_DEPMETHOD.flex?=     build
+
+BUILDLINK_DEPMETHOD.gettext?=  build
+.include "../../devel/gettext-lib/buildlink3.mk"
 .endif # FLEX_BUILDLINK3_MK
 
 BUILDLINK_TREE+=       -flex


Home | Main Index | Thread Index | Old Index