Compilation Errors: Arch Linux: v1.14
I'm the dpkg PKGBUILD maintainer for interested Arch Linux users. FYI, here's the webpage: http://aur.archlinux.org/packages.php?ID=16974
As you can see, dpkg v1.13 compiles without any fuss, using the following standard method:
build() {
cd ${startdir}/src/${pkgname}-${pkgver}
# Build
./configure --prefix=/usr || return 1
make || return 1
make DESTDIR=${startdir}/pkg/ install || return 1
}
However, dpkg v1.14 doesn't compile so smoothly on Arch Linux, perhaps due to the following changes:
2008-03-30 Guillem Jover
* dselect/main.cc: Use <ncursesw/term.h> instead of <term.h>.
* dselect/dselect.h: Use <ncursesw/curses.h> instead of <curses.h>.
* dselect/Makefile.am (curkeys.h): Likewise.
As noted below, Arch places the 'cursesw.h' file in a different location to where dpkg is looking for it:
`--> ls -l /usr/include/*cursesw*
-rw-r--r-- 1 root root 49K 2008-11-15 09:35 /usr/include/cursesw.h
However, there only seems to be one 'term.h' file in that directory and there's no 'ncursesw' subdirectory.
Consequently, I added the following lines to the top of my aforementioned 'build' script:
sed -i "s|<ncursesw/curses.h>|<cursesw.h>|g" dselect/{dselect.h,Makefile.in} || return 1
sed -i "s|<ncursesw/term.h>|<term.h>|g" dselect/main.cc || return 1
That fixed the original compilation errors, but the following new ones have surfaced. Let me know how I can overcome them.
g++ -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -DADMINDIR=\"/usr/var/dpkg\" -DLIBDIR=\"/usr/lib/dpkg\" -idirafter ../libcompat -I../lib -march=i686 -mtune=generic -O2 -pipe -MT pkginfo.o -MD -MP -MF .deps/pkginfo.Tpo -c -o pkginfo.o pkginfo.cc
pkginfo.cc: In member function ‘void packagelist::itd_relations()’:
pkginfo.cc:100: error: invalid conversion from ‘const char*’ to ‘char*’
pkginfo.cc:100: error: initializing argument 2 of ‘int CUR_waddstr(WINDOW*, char*)’
pkginfo.cc: In member function ‘void packagelist::itd_description()’:
pkginfo.cc:116: error: invalid conversion from ‘const char*’ to ‘char*’
pkginfo.cc:116: error: initializing argument 2 of ‘int CUR_waddstr(WINDOW*, char*)’
pkginfo.cc:117: warning: deprecated conversion from string constant to ‘char*’
pkginfo.cc:121: warning: deprecated conversion from string constant to ‘char*’
pkginfo.cc: In member function ‘void packagelist::itd_statuscontrol()’:
pkginfo.cc:141: error: invalid conversion from ‘const char*’ to ‘char*’
pkginfo.cc:141: error: initializing argument 2 of ‘int CUR_waddstr(WINDOW*, char*)’
pkginfo.cc: In member function ‘void packagelist::itd_availablecontrol()’:
pkginfo.cc:157: error: invalid conversion from ‘const char*’ to ‘char*’
pkginfo.cc:157: error: initializing argument 2 of ‘int CUR_waddstr(WINDOW*, char*)’
make[3]: *** [pkginfo.o] Error 1
make[3]: Leaving directory `/media/Exchange/Temp/Programming/Arch/dpkg/src/dpkg-1.14.25/dselect'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/media/Exchange/Temp/Programming/Arch/dpkg/src/dpkg-1.14.25/dselect'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/media/Exchange/Temp/Programming/Arch/dpkg/src/dpkg-1.14.25'
make: *** [all] Error 2
Reply to: