Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 3359

Summary: gnuplot failure on fresh gcc-3.1
Product: Gentoo Linux Reporter: Brandon Low (RETIRED) <lostlogic>
Component: [OLD] GCC PortingAssignee: Brandon Low (RETIRED) <lostlogic>
Status: RESOLVED FIXED    
Severity: normal CC: guj, lostlogic
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: adds an explicit typecast so gcc 3.1 will compile
_really_ makes gcc-3.1 compile plotutils

Description Brandon Low (RETIRED) gentoo-dev 2002-06-03 15:46:18 UTC
for some reason upgradees don't seem to see this necessarily... but here is what
I get when trying to merge plotutils (prereq for gnuplot)

c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I./../include -DLIBPLOT
-DLIBPLOTTER -march=athlon-xp -O3 -fgcse
-fomit-frame-pointer -Wno-deprecated -pipe -c g_write.cc  -fPIC -DPIC -o
.libs/g_write.lo
g_write.cc: In function `void _write_bytes(const plPlotterData*, int, const
unsigned char*)':
g_write.cc:43: invalid conversion from `const unsigned char*' to `const char*'
g_write.cc:43:   initializing argument 1 of `std::basic_ostream<_CharT,
_Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]'
make[2]: *** [g_write.lo] Error 1
make[2]: Leaving directory
`/var/tmp/portage/plotutils-2.4.1-r1/work/plotutils-2.4.1/libplotter'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/plotutils-2.4.1-r1/work/plotutils-2.4.1'
make: *** [all-recursive-am] Error 2
Comment 1 Johannes Günther 2002-06-15 19:26:00 UTC
Created attachment 1543 [details, diff]
adds an explicit typecast so gcc 3.1 will compile

I had the same problem but fixed with this patch (it does a typecast in
libplotter/g_write.cc).
Comment 2 Johannes Günther 2002-06-15 21:35:45 UTC
Created attachment 1544 [details, diff]
_really_ makes gcc-3.1 compile plotutils

Ohoh, I was too fast and optimistic. The former patch indeed solved that
particular problem, but there were some others (all suffered from typecasts in
write - I am not sure that this is the clean way, but at least you can merge
gnuplot)
So it obsoletes my "1543: adds an explicit typecast so gcc 3.1 will compile"

usage:
- copy "plotutils-2.4.1-gcc-3.1.patch" to
  "/usr/portage/media-libs/plotutils/files/"
- patch "plotutils-2.4.1-r1.ebuild"
  (e.g.: in "/usr/portage/" do
   "patch -p0 < path/to/plotutils-2.4.1-r1.ebuild.patch")
- emerge plotutils

I hope this also works for you.
Comment 3 Brandon Low (RETIRED) gentoo-dev 2002-06-16 12:41:36 UTC
Thanks I'm testing, if it compiles I"ll go ahead and commit it!
Comment 4 Brandon Low (RETIRED) gentoo-dev 2002-06-16 12:56:25 UTC
done.