[MacPorts] #18181: openmotif apps (xpdf, grace) fail to run in Leopard
MacPorts
noreply at macports.org
Thu Mar 5 18:56:00 PST 2009
#18181: openmotif apps (xpdf, grace) fail to run in Leopard
------------------------------------+---------------------------------------
Reporter: macosx12345@… | Owner: ricci@…
Type: defect | Status: assigned
Priority: Normal | Milestone: Port Bugs
Component: ports | Version: 1.7.0
Keywords: motif non-widget child | Port: openmotif
------------------------------------+---------------------------------------
Comment(by cjdeloye@…):
Replying to [ticket:18181 macosx12345@…]:
I experienced the same problem on OS X 10.4.11 (both PPC and i386) trying
to use xmgrace (port: grace) AFTER upgrading to macports v. 1.70 and doing
a "port upgrade outdated".
The problem seems to come in from two name conflicts
(_vendorShellWidgetClass, _vendorShellClassRec ) between libXm and the
/opt/local/lib/libXt. My setup default is to use /usr/X11R6 not the
/opt/local Xorg version of X11, so the linking against the Xorg libraries
was unexpected. The linking error I get when doing a 'port -v build
openmotif' is
{{{
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning multiple
definitions of symbol _vendorShellWidgetClass
/opt/local/lib/libXm.dylib(VendorS.o) definition of
_vendorShellWidgetClass
/opt/local/lib/libXt.dylib(Vendor.o) definition of _vendorShellWidgetClass
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning multiple
definitions of symbol _vendorShellClassRec
/opt/local/lib/libXm.dylib(VendorS.o) definition of _vendorShellClassRec
/opt/local/lib/libXt.dylib(Vendor.o) definition of _vendorShellClassRec
}}}
After experimenting, I could get openmotif to compile and successfully ran
its demo binaries in /opt/local/share/Xm when forcing linking openmotif
against the OS X system version of X11. The problem I was running into was
that the default linker flag order appears to be '-L/opt/local/lib
-L/usr/X11R6/lib', which drags in the macports Xorg libraries instead of
the system X11 libs.
Thus, a temporary solution to this problem (albeit temporary and inelegant
and which may not work on OS X 10.5 since the system X11 implementation is
different) is to modify the openmotif Portfile to ensure that the
/usr/X11R6/ branch is looked at before /opt/local by the compiler and
linker. Applying the following patch to the Portfile (which also removes
the Xorg dependencies from the openmotif port) accomplishes this and
produced a working openmotif package for me.
To get xmgrace to work, similar changes to the configure.ldflags and
configure.cppflags in the grace Portfile were made.
{{{
--- Portfile.org 2009-03-05 17:00:33.000000000 -0600
+++ Portfile 2009-03-05 17:06:29.000000000 -0600
@@ -33,12 +33,6 @@
port:jpeg \
port:libpng \
port:libiconv \
- port:xorg-libsm \
- port:xorg-libXext \
- port:Xft2 \
- port:xorg-libXmu \
- port:xorg-libXp \
- port:xorg-libXt
patchfiles patch-demos-programs-peridoc-Makefile.in.diff \
patch-lib-Mrm-Makefile.in.diff
@@ -50,14 +44,14 @@
# This block helps us link correctly and setup our pc files correctly
when we are
# +system_x11 and x11prefix is somewhere non-standard
-if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] && ![file exists
${x11prefix}/lib/pkgconfig/x11.pc] } {
+#if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] && ![file exists
${x11prefix}/lib/pkgconfig/x11.pc] } {
# AC_X_PATH blindly asks xmkmf where X11 is, and it always uses
/usr/X11R6.
# These next three lines should cause AC_X_PATH to let us setup our
CPPFLAGS
# and LDFLAGS without interference
configure.args-append --x-include=${prefix}/include
--x-lib=${prefix}/lib
- configure.cppflags-append -I${x11prefix}/include
- configure.ldflags-append -L${x11prefix}/lib
-}
+ configure.cppflags -I${x11prefix}/include -I${prefix}/include
+ configure.ldflags -L${x11prefix}/lib -L${prefix}/lib
+#}
configure.args --mandir=${prefix}/share/man \
--enable-xft \
}}}
--
Ticket URL: <http://trac.macports.org/ticket/18181#comment:21>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list