You are not logged in.

#1 2009-10-23 21:44:33

deltaecho
Member
From: Georgia (USA)
Registered: 2008-08-06
Posts: 187

Trouble Compiling CUPS 1.4.1 via ABS

I've recompiled all but a few packages on my system, and am now trying to compile CUPS 1.4.1 from the extra repo.  Its compilation always errors on me with messages stating it cannot find various header files, php.h, php_ini.h, and ext/standard/info.h in particular.  Looking at the source file having issues, phpcups.c, it has those headers included as, please excuse me if my terminology is incorrect, local header files:

#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"

The problem is, those headers are located in /usr/include/php, not where I'm compiling CUPS.  Changing their lines to point to the correct locations of each (i.e. #include <php/main/php.h>) causes the compiler to complain about yet more header files that cannot be located, however the problematic header files are then referenced from within the list of PHP header files, not those belonging to CUPS.  What I thought about doing was fixing the locations of each include in the PHP header files, and the three in the CUPS header files, but was unsure how that would affect linking and compiling.

I copied the PHP headers to a temporary directory, where I ran this set of commands to fix their includes:

for header in $(grep -rE '#include (<[^>]*>|"[^"]*")' . | sed -e 's|^.*:#include\s\+||g;s/"//g;s/<//g;s/>//g' -e 's|\s\+.*$||g;/:/d' -e 's|.*/||g' | sort | uniq); do loc=$(find . -name ${header} | sed -e 's|^\./||g'); if [[ -n "$loc" ]]; then sed -e "s|^#include \"[^\"]*${header}\"|#include \"${loc}\"|g" $(for f in $(find . -type f); do echo " -i $f "; done); fi; done

(There may be a cleaner way, but this was how I fixed them)

I then ran diff -ru /usr/include/php . to check what was changed, and found, with a few exceptions, I was successful.  If I were to carefully merge the changes back into the original header files, would this approach work?


Dylon

Offline

#2 2009-10-24 22:00:36

deltaecho
Member
From: Georgia (USA)
Registered: 2008-08-06
Posts: 187

Re: Trouble Compiling CUPS 1.4.1 via ABS

bump

Has anybody compiled CUPS 1.4.1 with the ABS?

EDIT: Well, I reckon someone did, since it's in the extra repo, but how was it done?

Last edited by deltaecho (2009-10-24 22:02:34)


Dylon

Offline

Board footer

Powered by FluxBB