CUPS building package fails

59 views
Skip to first unread message

Martin Mattronc

unread,
Apr 14, 2013, 9:05:02 AM4/14/13
to al...@googlegroups.com
I successfully built Alt-F according to the HowToBuild wiki page.
Afterwards I tried to build the packages by copying .config-packages to .config and running make again as described in HowToCreate packages.

The build process fails building CUPS.

Terminal output ist the following:

Checking whether to use network default printers... yes
checking
for default system groups... "lpadmin sys root"
configure
: error: The default system groups cannot contain the default CUPS group!
make
: *** [/home/martin/sources/alt-f-build/build_arm/cups-1.4.8/.configured] Fehler 1

I hope someone can help to determine the error's origin.

Martin Mattronc

unread,
Apr 14, 2013, 10:45:24 AM4/14/13
to al...@googlegroups.com
I determined the corresponiding code and possible cause for the error.

Code is in build/build_arm/cups-1.4.8/configure lines 21505 to 21552:

# Check whether --with-system_groups was given.
if test "${with_system_groups+set}" = set; then
  withval
=$with_system_groups; CUPS_SYSTEM_GROUPS="$withval"
else
 
if test x$uname = xDarwin; then
        CUPS_SYSTEM_GROUPS
="admin"
   
else
       
{ $as_echo "$as_me:$LINENO: checking for default system groups" >&5
$as_echo_n
"checking for default system groups... " >&6; }
       
if test -f /etc/group; then
            CUPS_SYSTEM_GROUPS
=""
            GROUP_LIST
="lpadmin sys system root"
           
for group in $GROUP_LIST; do
               
if test "`grep \^${group}: /etc/group`" != ""; then
                   
if test "x$CUPS_SYSTEM_GROUPS" = x; then
                        CUPS_SYSTEM_GROUPS
="$group"
                   
else
                        CUPS_SYSTEM_GROUPS
="$CUPS_SYSTEM_GROUPS $group"
                   
fi
               
fi
           
done

           
if test "x$CUPS_SYSTEM_GROUPS" = x; then
                CUPS_SYSTEM_GROUPS
="$GROUP_LIST"
               
{ $as_echo "$as_me:$LINENO: result: no groups found" >&5
$as_echo
"no groups found" >&6; }
           
else
               
{ $as_echo "$as_me:$LINENO: result: \"$CUPS_SYSTEM_GROUPS\"" >&5
$as_echo
"\"$CUPS_SYSTEM_GROUPS\"" >&6; }
           
fi
       
else
            CUPS_SYSTEM_GROUPS
="$GROUP_LIST"
           
{ $as_echo "$as_me:$LINENO: result: no group file" >&5
$as_echo
"no group file" >&6; }
       
fi
   
fi
fi


CUPS_PRIMARY_SYSTEM_GROUP
="`echo $CUPS_SYSTEM_GROUPS | awk '{print $1}'`"

for group in $CUPS_SYSTEM_GROUPS; do
   
if test "x$CUPS_GROUP" = "x$group"; then
       
{ { $as_echo "$as_me:$LINENO: error: The default system groups cannot contain the default CUPS group!" >&5
$as_echo
"$as_me: error: The default system groups cannot contain the default CUPS group!" >&2;}
   
{ (exit 1); exit 1; }; }
   
fi
done

The code shows, that due to the flag not being set the /etc/groups is checked for certain entries and because one of them being the same as CUPS_GROUP it breaks.

so the error is caused because the group lpadmin is present on the system I am compiling on, which in my opinion can be considered a bug.
I'm gonna give an update as soon as I figured out a proper way to circumvent it.

Joao Cardoso

unread,
Apr 14, 2013, 12:52:09 PM4/14/13
to al...@googlegroups.com
in package/cups/cups.mk

--with-cups-user=cups  --with-cups-group=lpadmin

is added to CUPS_CONF_OPT  

At install time the 'lpadmin' group is added.

You might try to use './configure --help' (but not make!) in $BLDDIR/build_arm/cups-1.4.8/ to determine what should be changed to CUPS_CONF_OPT and report back.

Thanks

Martin Mattronc

unread,
Apr 14, 2013, 3:23:14 PM4/14/13
to al...@googlegroups.com
The reason lies in $BLDDIR/build_arm/cups-1.4.8/configure in code I quoted above.

It seems like the configure script is not meant for cross compiling as it checkes your /etc/groups.

As a workaround I added the flag --with-system_groups to package/cups/cups.mk - but without a value.

    --with-cups-user=cups  --with-cups-group=lpadmin --with-system_groups\

This causes configure to jump over the groups check (see the code in my 2nd post).

This was the cleanest solution I could figure out - the omitted lines of code don't matter for the Alt-F-package anyway.

Joao Cardoso

unread,
Apr 14, 2013, 4:57:47 PM4/14/13
to al...@googlegroups.com


On Sunday, April 14, 2013 8:23:14 PM UTC+1, Martin Mattronc wrote:
The reason lies in $BLDDIR/build_arm/cups-1.4.8/configure in code I quoted above.

It seems like the configure script is not meant for cross compiling as it checkes your /etc/groups.

As a workaround I added the flag --with-system_groups to package/cups/cups.mk - but without a value.

The question if what will happens at runtime.

In my system, configure determines that (config.log)

#define CUPS_DEFAULT_SYSTEM_GROUPS "sys root"

And that should be fine for Alt-F /etc/group, so perhaps 

--with-cups-user=cups  --with-cups-group=lpadmin --with-system_groups="sys root"

will be a better choice?

Thanks

Martin Mattronc

unread,
Apr 14, 2013, 6:02:56 PM4/14/13
to al...@googlegroups.com
My change should not behave any different at runtime from before, because there were no system-groups defined as well.

Also i can't figure out the flag affecting anything else except the piece of code i posted.

Maybe you can compile with current cups.mk and afterwards with my change and diff the builds - this way we would be sure.

Martin Mattronc

unread,
Apr 20, 2013, 5:41:11 AM4/20/13
to al...@googlegroups.com
So I did a diff between compiled build with --with-system_groups="sys root" and --with-system_groups and there are differencies in a lot of files.

I did not do further research yet. But since I am not able to compile without the flag, it would but nice if you could compile yourself and check against diffs.

Also, now I think
--with-system_groups="sys root" would be the better choice, because due to the flag affects the created binaries it may negativly affect Cups on runtime if no system-groups are defined.

Reply all
Reply to author
Forward
0 new messages