You are not logged in.

#1 2010-10-19 20:43:08

jwhendy
Member
Registered: 2010-04-01
Posts: 621

[SOLVED] Build beecrypt in 32 chroot & getting configure errors

Hi,


Odd issue that's never happened before... I'm getting this when trying to build beecrypt via yaourt:

make[3]: Entering directory `/tmp/yaourt-tmp-jwhendy/aur-beecrypt/src/beecrypt-4.2.1/python'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -I  -DOPTIMIZE_I686  -march=i686 -mtune=generic -O2 -pipe -Wa,--noexecstack -c -o _bc-py.lo _bc-py.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -I -DOPTIMIZE_I686 -march=i686 -mtune=generic -O2 -pipe -Wa,--noexecstack -c _bc-py.c  -fPIC -DPIC -o .libs/_bc-py.o
_bc-py.c:8:20: fatal error: Python.h: No such file or directory
compilation terminated.
make[3]: *** [_bc-py.lo] Error 1
make[3]: Leaving directory `/tmp/yaourt-tmp-jwhendy/aur-beecrypt/src/beecrypt-4.2.1/python'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/yaourt-tmp-jwhendy/aur-beecrypt/src/beecrypt-4.2.1/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/yaourt-tmp-jwhendy/aur-beecrypt/src/beecrypt-4.2.1'
make: *** [all] Error 2
    Aborting...

So I figured it was a python issue. But I do have it installed:

$ which python
/usr/bin/python

$ python --version
Python 3.1.2

$ pacman -Q |grep python
python 3.1.2-2

$ locate Python.h
/usr/include/python3.1/Python.h

Is it looking somewhere I'm not aware of? Is this a pkgbuild change? I just re-setup my chroot (with base/base-devel) so I'd wonder about my path or something else, but as you can see the rest of the system seems fine with finding it?

Many thanks.

[Edited the title to make the problem more clear]

Last edited by jwhendy (2010-10-20 21:35:18)

Offline

#2 2010-10-20 16:37:27

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Build beecrypt in 32 chroot & getting configure errors

Update

I tracked down the issue, I think. Here's the pertinent part from when ./configure is running:

checking for python headers...   File "<string>", line 1
    import distutils.sysconfig; print distutils.sysconfig.get_python_inc()
                                              ^
SyntaxError: invalid syntax
-I
checking where to install python libraries...   File "<string>", line 1
    import distutils.sysconfig; print distutils.sysconfig.get_python_lib()
                                              ^
SyntaxError: invalid syntax

I tracked this down to the configure file itself. Here's what it's doing:

if test "${ac_cv_python_include+set}" = set; then
  $as_echo_n "(cached) " >&6
else

      ac_cv_python_include="-I`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()'`"

fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_python_include" >&5
$as_echo "$ac_cv_python_include" >&6; }
    { $as_echo "$as_me:$LINENO: checking where to install python libraries" >&5
$as_echo_n "checking where to install python libraries... " >&6; }
if test "${ac_cv_python_libdir+set}" = set; then
  $as_echo_n "(cached) " >&6
else

      ac_cv_python_libdir=`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()'`

fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_python_libdir" >&5
$as_echo "$ac_cv_python_libdir" >&6; }
  fi
fi

So it looks like it's trying to use distutils.sysconfig to get the python include and library settings but failing. Any thoughts?

Offline

#3 2010-10-20 20:17:03

Splex
Member
Registered: 2009-03-09
Posts: 33

Re: [SOLVED] Build beecrypt in 32 chroot & getting configure errors

I don't know much about python, but after looking at the documentation, it seems 'print' must have parenthesis in python 3.1
I tried both of these on the command line:
python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()'
python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())'
For me, the first fails, the second one works.

Offline

#4 2010-10-20 20:40:52

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Build beecrypt in 32 chroot & getting configure errors

@Splex:

Perfect. That worked for the python issues. Now, however, I'm getting problems with it locating definitions for various integers:

checking for size_t... no
checking for int8_t... no
checking size of signed char... 0
checking for int16_t... no
checking size of short... 0
checking for int32_t... no
checking size of int... 0
checking for int64_t... no
checking size of long... 0
checking size of long long... 0
checking for uint8_t... no
checking size of unsigned char... 0
checking for uint16_t... no
checking size of unsigned short... 0
checking for uint32_t... no
checking size of unsigned int... 0
checking for uint64_t... no
checking size of unsigned long... 0
checking size of unsigned long long... 0
checking for long long... no
checking for unsigned long long... no
checking size of unsigned long... (cached) 0
configure: error: Illegal CPU word size

I have base-devel installed in the chroot. Any reason for this? In the configure script, it looks like this is sending the error that stops the process:

cat >>confdefs.h <<_ACEOF
#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
_ACEOF

  if test $ac_cv_sizeof_unsigned_long -eq 8; then
    MP_WBITS=64U

  elif test $ac_cv_sizeof_unsigned_long -eq 4; then
    MP_WBITS=32U

  else
    { { $as_echo "$as_me:$LINENO: error: Illegal CPU word size" >&5
$as_echo "$as_me: error: Illegal CPU word size" >&2;}
   { (exit 1); exit 1; }; }
  fi

I have no experience with this. Still can't figure out if it's my problem or something wrong with what configure is doing...

Thanks for the help!

Offline

#5 2010-10-20 21:34:46

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Build beecrypt in 32 chroot & getting configure errors

I'm marking this as solved. I'm getting a lot of other goofy errors and think this is more about setting up a proper build environment in the chroot than anything specifically about beecrypt. Definite thanks for the tip on the python line.

Offline

#6 2010-10-21 06:23:14

akephalos
Member
From: Romania
Registered: 2009-04-22
Posts: 114

Re: [SOLVED] Build beecrypt in 32 chroot & getting configure errors

You could disable the python build at all.
./configure --prefix=/usr --sysconfdir=/etc --without-java --with-python=no --disable-openmp in the PKGBUILD.

Offline

#7 2010-10-21 13:37:21

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Build beecrypt in 32 chroot & getting configure errors

@akephalos: good point. I was not quite sure what required what (why python at all, that is). All I need to do is install a few rpms.

On the other hand, see my new POST. I think this is more about my build environment altogether vs. something with just this particular package. It would bum me out to get around this by just stopping the offending packages from being built when I think there shouldn't be anything wrong with them in the first place. Something's goofed in my chroot and I'd like to figure out what it is.

Offline

Board footer

Powered by FluxBB