You are not logged in.
Hi, I have a photosmart all-in-one printer which I'm driving with HPLIP. Printing to printable CD/DVD medium has known bugs in the version of HPLIP in the repos/AUR, and from what I've read it works fine in version 2.8.7. I'm trying to build this version from source, but there are some errors when I run make.
prnt/hpijs/registry.cpp: In member function 'virtual apdk::DRIVER_ERROR apdk::DeviceRegistry::SelectDevice(char*, int*, char*, apdk::SystemServices*)':
prnt/hpijs/registry.cpp:286: error: invalid conversion from 'const char*' to 'char*'
prnt/hpijs/registry.cpp:289: error: invalid conversion from 'const char*' to 'char*'
make: *** [hpijs-registry.o] Error 1
Could this have something to do with gcc libs? I don't really know what I'm talking about, but it was mentioned. Everyone on the bug report I was reading was in Ubuntu and they had dependancy errors with the older version of HPLIP. Does anyone know how I can build this version of HPLIP in arch? I need to be able to use my printable discs. Apparently the developers running the bug report became preoccupied with more pressing matters and abandoned it, so maybe It'll get fixed in the next release? I hope so....
Last edited by geckoguykc (2009-06-02 23:58:33)
Offline
go to lines that fail in the source, and remove the keywork(s) "const"
Offline
Okay. I'll see if I can find it.
Offline
Well it looks like that keyword is in the majority of the source files and there must be 50 of them. Before I try to edit them all, are you sure that this will work?
Offline
I tried to build after fixing that original registry.cpp and it still returned this error.
prnt/hpijs/registry.cpp:479: error: prototype for 'apdk::DRIVER_ERROR apdk::DeviceRegistry::SelectDevice(char*, apdk::SystemServices*)' does not match any in class 'apdk::DeviceRegistry'
prnt/hpijs/registry.cpp:220: error: candidates are: virtual apdk::DRIVER_ERROR apdk::DeviceRegistry::SelectDevice(apdk::PRINTER_TYPE)
followed by a whole host of other source files reporting the error with "const." should I edit those other source files and will that fix this new error with registry.cpp? or is it some problem caused by removing "const"?
Offline
Well I just kept editing files, and it finally completed make and make-install successfully, but I can't launch any hplip programs now that it's installed. It says "command not found" when I try to launch hp-toolbox or hp-setup.
Offline
Well, I'm trying to make a PKGBUILD for the modified package, because whenever I install source via "./configure, make, make-install" they don't show up anywhere in arch.
Offline
I tried to install my PKGBUILD with "makepkg -s" and it returned an error. I don't know anything about BUILDPKGs, and I didn't know a lot of the information it needed so I left many of the entries blank. It seems impossible to just do the regular "make-install" because the commands aren't found when installed that way.
Here's the error makepkg returned
/bin/sh ./libtool --mode=install /bin/install -c 'hpmudext.la' '/home/casey/abs/hplip-2.8.7/pkg//usr/lib/python2.6/site-packages/hpmudext.la'
libtool: install: error: cannot install `hpmudext.la' to a directory not ending in /usr/local/lib/python2.6/site-packages
make[1]: *** [install-hpmudextLTLIBRARIES] Error 1
make[1]: Leaving directory `/home/casey/abs/hplip-2.8.7/src/hplip-2.8.7'
make: *** [install-am] Error 2
==> ERROR: Build Failed.
Aborting...
It doesn't look like anything too complicated, but I'm not sure why it can't install it to that directory because "make" completed just fine whenever I built it with the regular ./configure etc. Is it impossible to use programs not installed by pacman or something?
Offline
I'm guessing it has something to do with PKGBUILD using "./configure --prefix=/usr"? It worked fine when I build with just "./configure" I really can't figure out how to install this.
Last edited by geckoguykc (2009-06-03 00:07:53)
Offline
This definitely has something to do with the "--prefix=/usr", if I remove it it will build, but when I install it when built without --prefix=/usr, the install doesn't work correctly, and it's installed in /usr/local/bin, where I have to manually run it from everytime.
Offline
Well I give up. Going back to current version and live without that feature.
Offline
I am here again. No all const no!, just only lines that compiler reports
I browse the source, in the web[#1]. The line problematic is:
286 char *cmdStr = strstr ((const char *) DevIDBuffer+2, "CMD:");
289 cmdStr = strstr ((const char *) DevIDBuffer+2, "COMMAND SET:");
And this is related to the new strict of glibc-2.10 related to const preserve[#2]
As said above, can remove the const, like:
286 char *cmdStr = strstr ((char *) DevIDBuffer+2, "CMD:");
289 cmdStr = strstr ((char *) DevIDBuffer+2, "COMMAND SET:");
or add the const in (in this case in not valid):
286 const char *cmdStr = strstr ((const char *) DevIDBuffer+2, "CMD:");
289 cmdStr = strstr ((const char *) DevIDBuffer+2, "COMMAND SET:");
Do this in all parts that are necesary, generate a patch, then include in your PKGBUILD
If you have any question, please let me know.
[#1] http://src.opensolaris.org/source/xref/ … gistry.cpp
[#2] http://udrepper.livejournal.com/20948.html
Last edited by djgera (2009-06-03 18:48:23)
Offline