You are not logged in.

#1 2009-06-02 21:28:13

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

HP printer and HPLIP/ making a PKGBUILD for an old package

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

#2 2009-06-02 21:43:32

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

go to lines that fail in the source, and remove the keywork(s) "const"

Offline

#3 2009-06-02 22:42:23

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

Okay. I'll see if I can find it.

Offline

#4 2009-06-02 22:51:03

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

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

#5 2009-06-02 22:54:13

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

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

#6 2009-06-02 23:11:54

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

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

#7 2009-06-02 23:41:19

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

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

#8 2009-06-02 23:49:18

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

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

#9 2009-06-03 00:06:36

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

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

#10 2009-06-03 01:02:10

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

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

#11 2009-06-03 01:33:52

geckoguykc
Member
Registered: 2009-03-15
Posts: 49

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

Well I give up. Going back to current version and live without that feature.

Offline

#12 2009-06-03 04:05:21

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: HP printer and HPLIP/ making a PKGBUILD for an old package

I am here again. No all const no!, just only lines that compiler reports wink

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 wink

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

Board footer

Powered by FluxBB