Bug 21280

Summary: gcc 2.96-54 won't link cups-1.1.4/pdftops
Product: [Retired] Red Hat Linux Reporter: Klaus Muth <muth>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: http://www.cups.org
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-10 11:17:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Klaus Muth 2000-11-23 13:43:18 UTC
I tried to compile CUPS on 7.0 but it chokes on linking pdftops:
echo Linking pdftops...
Linking pdftops...
g++ -Wall -fPIC -O2 -g3 -o pdftops pdftops.o libxpdf.a -L../cups -lcups
-lnsl -lpam -ldl -lcrypt  -lm
libxpdf.a(PSOutputDev.o): In function `PSOutputDev::PSOutputDev(char *,
Catalog *, int, int, int, int)':
/usr/src/redhat/BUILD/cups-1.1.4/pdftops/OutputDev.h:32: undefined
reference to `OutputDev virtual table'
libxpdf.a(PSOutputDev.o): In function `PSOutputDev::PSOutputDev(char *,
Catalog *, int, int, int, int)':
/usr/src/redhat/BUILD/cups-1.1.4/pdftops/PSOutputDev.cxx:235: undefined
reference to `PSOutputDev virtual table'
libxpdf.a(PSOutputDev.o): In function `PSOutputDev::PSOutputDev(char *,
Catalog *, int, int, int, int)':
/usr/src/redhat/BUILD/cups-1.1.4/pdftops/OutputDev.h:35: undefined
reference to `OutputDev virtual table'

And so on for some other 100 lines. Same links on 6.2 with the old 
2.95 without complaining. Hey I _NEED_ CUPS here.

Comment 1 Klaus Muth 2000-11-24 06:35:05 UTC
I tried it again yesterday with gcc[-c++]-2.96-63 from rawhide and the
glibc update. Same with the newer gcc: does not link.

Comment 2 Jakub Jelinek 2000-12-21 11:49:08 UTC
Verified as preprocessor bug, will be fixed in cpp-2.96-70.
In the mean time, if you change OPTIM in toplevel Makedefs from -g3 to -g,
everything should work fine.
The issue was that with -g3, preprocessor outputs all #defines into the
preprocessed file so that dwarf2 can use them, but defines set through
cpp0 command line were output before first #line command (and cc1plus requires
the name of the input file for #pragma implementation to be on the first line
in the file).

Comment 3 Jakub Jelinek 2001-01-10 11:17:30 UTC
*** Bug 23700 has been marked as a duplicate of this bug. ***