Bug 5065 - *.pc.in files incorrectly specify Cflags/Libs
Summary: *.pc.in files incorrectly specify Cflags/Libs
Status: RESOLVED DUPLICATE of bug 4037
Alias: None
Product: xorg
Classification: Unclassified
Component: * Other (show other bugs)
Version: 6.99.99.902 (7.0 RC2)
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1690
  Show dependency treegraph
 
Reported: 2005-11-16 12:42 UTC by Mike A. Harris
Modified: 2005-11-18 09:48 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Mike A. Harris 2005-11-16 12:42:43 UTC
Modular twm fails to build if libXau isn't installed, but does not specify
a dependency on it with ./configure:

gcc  -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386
-mtune=pentium4 -fasynchronous-unwind-tables -fno-strict-aliasing   -o twm 
twm-add_window.o twm-curso
r.o twm-deftwmrc.o twm-events.o twm-gc.o twm-iconmgr.o twm-icons.o twm-list.o
twm-menus.o twm-parse.o twm-resize.o twm-session.o twm-twm.o twm-util.o
twm-version.o twm-gram.o
 twm-lex.o -lXmu -lXt -lSM -lICE -lXext -lX11 -ldl -lXau
/usr/bin/ld: cannot find -lXau
collect2: ld returned 1 exit status
make[3]: *** [twm] Error 1
make[3]: Leaving directory
`/home/mharris/rpmbuild/BUILD/xorg-x11-twm-0.99.1/twm-0.99.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/mharris/rpmbuild/BUILD/xorg-x11-twm-0.99.1/twm-0.99.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/mharris/rpmbuild/BUILD/xorg-x11-twm-0.99.1/twm-0.99.1'
make: *** [all] Error 2
error: Bad exit status from /home/mharris/rpmbuild/tmp/rpm-tmp.25541 (%build)
Comment 1 Alan Coopersmith 2005-11-16 12:47:20 UTC
twm doesn't need Xau - it needs libXmu, which is specifying -lXau in it's
x11.pc file (probably incorrectly).
Comment 2 Alan Coopersmith 2005-11-16 12:56:26 UTC
Bleah.  I meant "in it's xmu.pc file" of course.
Comment 3 Mike A. Harris 2005-11-16 16:28:25 UTC
(In reply to comment #1)
> twm doesn't need Xau - it needs libXmu, which is specifying -lXau in it's
> x11.pc file (probably incorrectly).


Right, we spent some time investigating this tonight and came up with the
same conclusion.  The current modular *.pc.in files seem to be specifying
Cflags/Libs lines that are the build dependencies of the library itself,
rather than the Cflags/Libs flags than the runtime deps of the library.

Here is x11.pc.in

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

xthreadlib=@XTHREADLIB@

Name: X11
Description: X Library
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lX11 @XPROTO_LIBS@ @LIBS@
Cflags: -I${includedir} @XPROTO_CFLAGS@ @XTHREAD_CFLAGS@


The last two lines should be:

Libs: -L${libdir} -lX11
Cflags: -I${includedir}


Every library, etc should be similar to this.
Comment 4 Mike A. Harris 2005-11-16 18:55:55 UTC
This is just severely wrong..  anything that links to libXmu, automatically
gets linked to a tonne of libraries due to the broken .pc file:


[root@fc4i386 RPMS]# cat /usr/lib/pkgconfig/xmu.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include

Name: Xmu
Description: Xmu Library
Version: 0.99.1
Libs: -L${libdir} -lXmu -lXt -lSM -lICE -lXext -lX11 -ldl -lXau
Cflags: -I${includedir}
Comment 5 Adam Jackson 2005-11-19 04:48:40 UTC

*** This bug has been marked as a duplicate of 4037 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.