[Apt-Rpm] Compilation issues with 0.5.15lorg3.94a (rpmpm.cc)

Vincent Danen vdanen at annvix.org
Thu Mar 6 10:55:41 PST 2008


* [2008-03-06 18:42:40 +0100] Per ?yvind Karlsen wrote:

>På Torsdag 06 mars 2008 , 16:59:37 skrev Vincent Danen:
>>   g++ -DHAVE_CONFIG_H -I. -I../include -I../include/apt-pkg
>> -DLIBDIR=\"/usr/lib\" -DPKGDATADIR=\"/usr/share/apt\"
>> -DLOCALEDIR=\"/usr/share/locale\" -DAPT_DOMAIN=\"apt\" -I../lua/include
>> -I../lua/local -I/usr/include/libxml2 -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2
>> -fstack-protector --param=ssp-buffer-size=4 -fexceptions
>> -fomit-frame-pointer -march=i586 -mtune=generic
>> -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:907: error: invalid conversion from 'void* (*)(const void*,
>> rpmCallbackType, rpmCallbackSize_t, rpmCallbackSize_t, const void*, void*)'
>> to 'void* (*)(const void*, rpmCallbackType, long long unsigned int, long
>> long unsigned int, const void*, void*)' rpm/rpmpm.cc:907: 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*)' make[1]: *** [rpm/rpmpm.lo]
>> Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> make[1]: Leaving directory
>> `/home/vdanen/svn/3.1-CURRENT/apt/BUILD/apt-0.5.15lorg3.94a/apt-pkg' make:
>> *** [all-recursive] Error 1
>> error: Bad exit status from /home/vdanen/tmp/rpm-tmp.67969 (%build)
>
>Wild guess without knowing what rpm version you have or how code for apt 
>0.5.15lorg3.94a(neat versioning!) looks like, but I would think that you'll 
>find something like 'typedef unsigned long rpmCallbackSize_t' in 
>aptcallback.h or wherever it might reside, make it 'typedef unsigned long 
>long rpmCallbackSize_t'.

Ok, I see it in apt-pkg/rpm/aptcallback.h:

#if HAVE_RPM_RPMCB_H
typedef unsigned long long rpmCallbackSize_t;
#else
typedef unsigned long rpmCallbackSize_t;
#endif

and in include/config.h:

/* Define to 1 if you have the <rpm/rpmcb.h> header file. */
/* #undef HAVE_RPM_RPMCB_H */

Just looked, and I don't have rpm/rpmcb.h (using rpm 4.4.5).

The following patch fixes the compilation for me, but not sure if this
would be the correct way to do it:

--- apt-pkg/rpm/aptcallback.h~  2008-03-06 11:51:09.113968991 -0700
+++ apt-pkg/rpm/aptcallback.h   2008-03-06 11:51:09.113968991 -0700
@@ -4,11 +4,7 @@
  #include <apt-pkg/progress.h>
  #include <rpm/rpmcli.h>
  
-#if HAVE_RPM_RPMCB_H
  typedef unsigned long long rpmCallbackSize_t;
-#else
-typedef unsigned long rpmCallbackSize_t;
-#endif
  
  #if RPM_VERSION < 0x040000
  void * rpmCallback(const Header h,

Thanks for the hints, Per!  =)

-- 
Vincent Danen @ http://linsec.ca/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.laiskiainen.org/pipermail/apt-rpm-laiskiainen.org/attachments/20080306/7403b6c5/attachment-0003.pgp>


More information about the Apt-Rpm mailing list