You are not logged in.

#1 2011-09-29 06:57:42

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

Problem compiling Canon MG5200 and MG6100 drivers (technically solved)

There is a compile error that is happening with both drivers:

bjcupsmon_cups.c: In function 'getProductName':
bjcupsmon_cups.c:106:2: error: unknown type name 'ppd_file_t'
bjcupsmon_cups.c:114:3: warning: implicit declaration of function 'ppdOpenFile' [-Wimplicit-function-declaration]
bjcupsmon_cups.c:114:13: warning: assignment makes pointer from integer without a cast [enabled by default]
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: warning: left-hand operand of comma expression has no effect [-Wunused-value]
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: warning: value computed is not used [-Wunused-value]
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: warning: left-hand operand of comma expression has no effect [-Wunused-value]
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:115:8: error: request for member 'manufacturer' in something not a structure or union
bjcupsmon_cups.c:116:5: error: request for member 'modelname' in something not a structure or union
bjcupsmon_cups.c:116:5: error: request for member 'modelname' in something not a structure or union
bjcupsmon_cups.c:118:58: error: request for member 'model_number' in something not a structure or union
bjcupsmon_cups.c:121:4: warning: implicit declaration of function 'ppdClose' [-Wimplicit-function-declaration]
make[2]: *** [bjcupsmon_cups.o] Error 1
make[2]: Leaving directory `/tmp/yaourt-tmp-den/aur-cnijfilter-mg5200/src/cnijfilter-source-3.40-1/cngpijmon/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/yaourt-tmp-den/aur-cnijfilter-mg5200/src/cnijfilter-source-3.40-1/cngpijmon'
make: *** [all] Error 2

The solution is such:

[a header in two files fixed it]:

diff -aur package.pristine/cnijfilter-source-3.40-1/backend/src/cnij_backend_common.c package.new/cnijfilter-source-3.40-1/backend/src/cnij_backend_common.c
--- cnijfilter-source-3.40-1/backend/src/cnij_backend_common.c 2011-09-18 11:45:43.498572950 +0200
+++ cnijfilter-source-3.40-1/backend/src/cnij_backend_common.c 2011-09-18 12:01:55.550897076 +0200
@@ -38,6 +38,7 @@
// CUPS Header
#include <cups/cups.h>
#include <cups/ipp.h>
+#include <cups/ppd.h>

// Header file for CANON
#include "cnij_backend_common.h"
diff -aur package.pristine/cnijfilter-source-3.40-1/cngpijmon/src/bjcupsmon_cups.c package.new/cnijfilter-source-3.40-1/cngpijmon/src/bjcupsmon_cups.c
--- cnijfilter-source-3.40-1/cngpijmon/src/bjcupsmon_cups.c 2011-09-18 11:45:43.548573378 +0200
+++ /cnijfilter-source-3.40-1/cngpijmon/src/bjcupsmon_cups.c 2011-09-18 11:47:44.469600456 +0200
@@ -20,6 +20,7 @@
/*** Includes ***/
#include <cups/cups.h>
#include <cups/language.h>
+#include <cups/ppd.h>
#include <sys/types.h>
#include <unistd.h> 
#include <pwd.h>

I am unclear on how to properly implement this so that I can update my pkgbuild and offer the fix to voRia (maintainer of MG6100 pkg)... if someone could help me better comprehend what exactly is being done here, I'd appreciate it.  I get that two header files are being made and the code above is what goes in them, but my primary question is where exactly do they go?  Knowing this, I can incorporate the info into the PKGBUILD to automate the process a bit and get this driver to build!

Thanks in advance...

EDIT:
OK... after further review, I figured out where to put the edits to the two files manually... if I'm reading the code above correctly, this should be dropped into the PKGBUILD verbatim so that it does the edit for you... the question I have now is where in the PKGBUILD does this fit... I take it that it goes before the build process, but where exactly is what I'm unsure of...

EDIT2:  Now I'm just annoyed! I figured out what files to edit and I put the missing #include in place, but everytime I makepkg, the files get overwritten and my edit is lost (even if I make the file read-only)... do I need to extract the source tarballs and edit the files there or what?  This is NOT cool...

EDIT3: Now an hour late for going to sleep tongue I got what I needed to do done... I manually edited the source by the code that I copied here (changing certain *.c files to reflect the necessary information) and got a compile to complete.  Debating on whether I wish to host the code myself or see if I can find a solution to work into the PKGBUILD to fix the code and start the compile afterwards... suggestions are ALWAYS welcome...

Last edited by CPUnltd (2011-09-29 08:17:34)


Help grow the dev population... have your tech trained and certified!

Offline

#2 2011-10-20 09:35:14

EdKoArch
Member
Registered: 2011-10-20
Posts: 1

Re: Problem compiling Canon MG5200 and MG6100 drivers (technically solved)

Hi

I also use this printer. I get exact this message too. Can you tell me where you made your technical changes, so I can get it to work on my system too?

I ran packer for the aur packages (and yaourt) but can't figure out in which files to place those header lines. Or am I missing it as a arch noob?

Thanks in advance

Offline

#3 2011-10-20 15:35:32

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

Re: Problem compiling Canon MG5200 and MG6100 drivers (technically solved)

unfortunately, getting the driver to compile and install has, so far, been a lost cause, as getting it to WORK with CUPS 1.5.X is currently not happening... if a solution shows itself on THAT topic, I will post about it here and comment in the AUR package itself...

There is a fundamental flaw that is not showing itself at the moment... that seems to be Arch specific... so far, I have seen many SOLVED topics on this printer in the forums of the .deb family of distros... haven't really checked many in the .rpm family yet.  Since we are neither, I'm just not sure...

Last edited by CPUnltd (2011-10-20 18:02:07)


Help grow the dev population... have your tech trained and certified!

Offline

Board footer

Powered by FluxBB