Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 49736 - hpijs-1.5 doesn't compile with gcc3.4 without patching
Summary: hpijs-1.5 doesn't compile with gcc3.4 without patching
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
: 49925 (view as bug list)
Depends on:
Blocks: 48528
  Show dependency tree
 
Reported: 2004-05-02 11:21 UTC by ecco
Modified: 2004-05-31 21:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Small, simple patch to make hpijs compile with gcc3.4 (hpijs-gcc3.4.patch,1.45 KB, patch)
2004-05-02 11:22 UTC, ecco
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ecco 2004-05-02 11:21:54 UTC
Compiling hpijs with gcc3.4 will fail. I figured out this was due to the following change in gcc:
(http://gcc.gnu.org/gcc-3.4/changes.html)
----------
When binding an rvalue of class type to a reference, the copy constructor of the class must be accessible. For instance, consider the following code:

	class A 
	{
	public:
	  A();
	  
	private:
	  A(const A&);   // private copy ctor
	};
	
	A makeA(void);
	void foo(const A&);
	
	void bar(void)
	{
	  foo(A());       // error, copy ctor is not accessible
	  foo(makeA());   // error, copy ctor is not accessible
	  
	  A a1;
	  foo(a1);        // OK, a1 is a lvalue
	}

This might be surprising at first sight, especially since most popular compilers do not correctly implement this rule.
----------

Based on this info I wrote a simple patch, which works for me. I hope this info was useful, it's my first bug-report :)

Reproducible: Always
Steps to Reproduce:
1. emerge hpijs
2.
3.

Actual Results:  
hpijs.cpp: In function `int hpijs_set_context(UXServices*)':
hpijs.cpp:82: error: no matching function for call to
`apdk::PrintContext::GetPrintModeSettings(apdk::QUALITY_MODE, apdk::MEDIATYPE,
apdk::COLORMODE, BOOL&)'
context.h:128: note: candidates are: apdk::DRIVER_ERROR
apdk::PrintContext::GetPrintModeSettings(apdk::QUALITY_MODE&, apdk::MEDIATYPE&,
apdk::COLORMODE&, BOOL&)
hpijs.cpp: In function `int hpijs_set_cb(void*, IjsServerCtx*, IjsJobId, const
char*, const char*, int)':
hpijs.cpp:214: error: no matching function for call to
`apdk::PrintContext::GetPrintModeSettings(apdk::QUALITY_MODE, apdk::MEDIATYPE,
apdk::COLORMODE, BOOL&)'
context.h:128: note: candidates are: apdk::DRIVER_ERROR
apdk::PrintContext::GetPrintModeSettings(apdk::QUALITY_MODE&, apdk::MEDIATYPE&,
apdk::COLORMODE&, BOOL&)
make: *** [hpijs.o] Error 1


Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.4.0, glibc-2.3.3_pre20040420-r0,
2.6.6-rc2-mm1)
=================================================================
System uname: 2.6.6-rc2-mm1 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.4.10
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -mmmx -msse -pipe -fomit-frame-pointer -funroll-loops"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -mmmx -msse -pipe -fomit-frame-pointer
-funroll-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo
ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo
http://ftp.easynet.nl/mirror/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/
http://gentoo.tiscali.nl/gentoo/ ftp://ftp.tiscali.nl/pub/mirror/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X alsa apache1 apache2 apm arts avi berkdb cdr crypt cups directfb
dvd dvdr encode esd fbcon foomaticdb freetype gdbm gif gpm gtk gtk2 imlib ipv6
java javascript jpeg kde libg++ libwww mad md5sum mikmod mldonkeypango mmx mpeg
ncurses nls nptl oggvorbis opengl oss pam pdflib perl png ppds python qt
quicktime radeon readline samba sdl slang spell sse ssl svga tcpd threads tiff
truetype vim-with-x wmf x86 xinerama xml2 xmms xv zlib"
Comment 1 ecco 2004-05-02 11:22:53 UTC
Created attachment 30541 [details, diff]
Small, simple patch to make hpijs compile with gcc3.4
Comment 2 SpanKY gentoo-dev 2004-05-16 12:24:50 UTC
*** Bug 49925 has been marked as a duplicate of this bug. ***
Comment 3 Nicolas Laplante 2004-05-22 10:50:30 UTC
The patch worked for me.
Comment 4 SpanKY gentoo-dev 2004-05-31 21:07:39 UTC
added patch to portage, thanks :)