On 7 April 2010 13:19, Tarjei Knapstad <[email protected]> wrote:
> Hi,
>
> I've been trying to build CUPS 1.4.2 and 1.4.3 on the OE unstable
> branch (Angstrom for a BeagleBoard) which seems to work fine after tweaking
> the recipes for 1.3.8 slightly. The cupsd daemon segfaults instantly
> however, and I'm having
> some trouble debugging the cause.
>
> Before I spend more time trying to get to the bottom of this, has
> anyone been able to successfully build and run CUPS 1.4.x on the BB
> and have a recipe they could share? I found a posting from Jay Snyder
> back in January, but couldn't find an actual commit anywhere:
> http://www.mail-archive.com/[email protected]/msg02702.html
>
> I have attached my attempt at a recipe (skips building manpages and
> testing the ppdc tools).
>
Finally figured it out. Seems like the Beagle is not too happy about
code compiled with the '-pie -fPIE' and '-fstack-protector' options.
After removing these from the configure script everything seems to be
running just fine.
Crude patch attached (should probably patch configure.in instead and
run autoreconf, but can't be bothered at the mo).
Regards,
--
Tarjei
--- cups-1.4.3/configure.orig 2010-04-08 11:14:19.092296014 +0200
+++ cups-1.4.3/configure 2010-04-08 11:19:02.661417938 +0200
@@ -10940,114 +10940,6 @@
OPTIM="-fPIC $OPTIM"
fi
- # The -fstack-protector option is available with some versions of
- # GCC and adds "stack canaries" which detect when the return address
- # has been overwritten, preventing many types of exploit attacks.
- { echo "$as_me:$LINENO: checking if GCC supports -fstack-protector" >&5
-echo $ECHO_N "checking if GCC supports -fstack-protector... $ECHO_C" >&6; }
- OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fstack-protector"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- OPTIM="$OPTIM -fstack-protector"
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
- CFLAGS="$OLDCFLAGS"
-
- # The -pie option is available with some versions of GCC and adds
- # randomization of addresses, which avoids another class of exploits
- # that depend on a fixed address for common functions.
- { echo "$as_me:$LINENO: checking if GCC supports -pie" >&5
-echo $ECHO_N "checking if GCC supports -pie... $ECHO_C" >&6; }
- OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -pie -fPIE"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- PIEFLAGS="-pie -fPIE"
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$OLDCFLAGS"
-
if test "x$with_optim" = x; then
# Add useful warning options for tracking down problems...
OPTIM="-Wall -Wno-format-y2k $OPTIM"
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel