Build problem with 0.5.15lorg3.90
Panu Matilainen
pmatilai at laiskiainen.org
Sun Feb 18 02:50:05 PST 2007
On Sat, 17 Feb 2007, Gary L. Greene, Jr. wrote:
> Hi Panu,
>
> I'm in the process of building a new distribution's build root and decided to
> use apt-rpm 3.90 for it. However, I seem to be running into a rather nasty
> breakage with libtool complaining about an invalid conversion in
> rpm/rpmpm.cc. The build error follows:
>
> /bin/sh ../libtool --tag=CXX --mode=compile
> i586-altimatos-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../include -DLIBDIR=\"/usr/lib\" -DPKGDATADIR=\"/usr/share/apt\" -DLOCALEDIR=\"/usr/share/locale\" -DAPT_DOMAIN=\"apt\" -I../lua/include -I../lua/local -I/usr/include/rpm -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fomit-frame-pointer -march=i586 -mtune=pentiumpro -fasynchronous-unwind-tables -MT
> rpm/rpmpm.lo -MD -MP -MF $depbase.Tpo -c -o rpm/rpmpm.lo rpm/rpmpm.cc &&\
> mv -f $depbase.Tpo $depbase.Plo
> i586-altimatos-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../include -DLIBDIR=\"/usr/lib\" -DPKGDATADIR=\"/usr/share/apt\" -DLOCALEDIR=\"/usr/share/locale\" -DAPT_DOMAIN=\"apt\" -I../lua/include -I../lua/local -I/usr/include/rpm -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fomit-frame-pointer -march=i586 -mtune=pentiumpro -fasynchronous-unwind-tables -MT
> rpm/rpmpm.lo -MD -MP -MF rpm/.deps/rpmpm.Tpo -c rpm/rpmpm.cc -fPIC -DPIC -o
> rpm/.libs/rpmpm.o
> rpm/rpmpm.cc: In member function 'virtual bool
> pkgRPMLibPM::Process(std::vector<const char*, std::allocator<const char*> >&,
> std::vector<const char*, std::allocator<const char*> >&, std::vector<const
> char*, std::allocator<const char*> >&)':
> rpm/rpmpm.cc:896: error: invalid conversion from 'void* (*)(const void*,
> rpmCallbackType, long unsigned int, long unsigned int, const void*, void*)'
> to 'void* (*)(const void*, rpmCallbackType, long long unsigned int, long long
> unsigned int, const void*, void*)'
> rpm/rpmpm.cc:896: error: initializing argument 2 of 'int
> rpmtsSetNotifyCallback(rpmts_s*, void* (*)(const void*, rpmCallbackType, long
> long unsigned int, long long unsigned int, const void*, void*), void*)'
>
> The version of RPM on AltimatOS is version 4.4.5. If you have any ideas on how
> best to fix this, I'm all ears. Thanks.
It seems to be caused by amount and total parameters to rpmShowProgress
changing from long to long long. I can hardly imagine a transaction having
more elements that unsigned long can represent but then, 640KB is enough
for everybody :)
Attached ugly rpm version conditional patch should get you past that one
at least.
While on the subject: the whole showprogress stuff is nasty. I'm planning
on making install-progress a libapt-pkg level API (similarly to acquire
progress) that both cli and GUI clients can sanely use. The current way
Synaptic has to catch the progress by creating a new thread to run the
transaction and parse the output is just sick.
- Panu -
-------------- next part --------------
diff --git a/apt-pkg/rpm/rpmshowprogress.cc b/apt-pkg/rpm/rpmshowprogress.cc
index 7240a87..d3d61eb 100644
--- a/apt-pkg/rpm/rpmshowprogress.cc
+++ b/apt-pkg/rpm/rpmshowprogress.cc
@@ -61,9 +61,15 @@ void * rpmpmShowProgress(const Header h,
void * rpmpmShowProgress(const void * arg,
#endif
const rpmCallbackType what,
+#if RPM_VERSION >= 0x040405
+ const unsigned long long amount,
+ const unsigned long long total,
+#else
const unsigned long amount,
const unsigned long total,
+#endif
const void * pkgKey, void * data)
+
{
#if RPM_VERSION >= 0x040000
Header h = (Header) arg;
diff --git a/apt-pkg/rpm/rpmshowprogress.h b/apt-pkg/rpm/rpmshowprogress.h
index 3cf6526..9c33f96 100644
--- a/apt-pkg/rpm/rpmshowprogress.h
+++ b/apt-pkg/rpm/rpmshowprogress.h
@@ -7,6 +7,11 @@ void * rpmpmShowProgress(const Header h,
void * rpmpmShowProgress(const void * arg,
#endif
const rpmCallbackType what,
- const unsigned long amount,
- const unsigned long total,
+#if RPM_VERSION >= 0x040405
+ const unsigned long long amount,
+ const unsigned long long total,
+#else
+ const unsigned long amount,
+ const unsigned long total,
+#endif
const void * pkgKey, void * data);
More information about the Apt-Rpm
mailing list