Ticket #157 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

dev-libs/libxml2-2.7.3 doesn't compile with +python

Reported by: sleipnir Owned by: sleipnir
Priority: major Milestone: milestone3
Component: target Keywords:
Cc: maxposedon@…

Description

The above ebuild specifies a number of fixed pathes, this need patching!!!

Unmasking the version right now, as the overlay version 2.7.2-r1 works fine. Please remove this masking when a fix is available.

Attachments

build.log (171.3 kB) - added by pierrearinsal 3 years ago.
build log of cross-compiled libxml2 on a amd64
config.log (123.4 kB) - added by pierrearinsal 3 years ago.
sorry I haven't seen your message before

Change History

  Changed 3 years ago by max_posedon

Works for me:

[ebuild   R   ] dev-libs/libxml2-2.7.3 to /usr/armv4tl-softfloat-linux-gnueabi/ USE="python readline -debug -doc -examples -ipv6 -test" 0 kB

I use x86 on host, but sleipnir uses x86_64, so host ARCH might be a key.

  Changed 3 years ago by max_posedon

  • cc maxposedon@… added

  Changed 3 years ago by max_posedon

sleipnir, python-2.7.3-r1 available, could you try it?

  Changed 3 years ago by max_posedon

sorry, I mean libxml2-2.7.3-r1

follow-up: ↓ 6   Changed 3 years ago by sleipnir

  • owner set to sleipnir
  • status changed from new to assigned

in reply to: ↑ 5   Changed 3 years ago by pierrearinsal

doesn't cross-compile ... it says :

mkdir .libs
 armv4tl-softfloat-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.6 -I../include -I../include -I../python -Os -pipe -march=armv4t -mtune=arm920t -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -MT types.lo -MD -MP -MF .deps/types.Tpo -c types.c  -fPIC -DPIC -o .libs/types.o
In file included from /usr/include/python2.6/Python.h:58,
                 from libxml_wrap.h:1,
                 from types.c:9:
/usr/include/python2.6/pyport.h:685:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from /usr/include/python2.6/Python.h:86,
                 from libxml_wrap.h:1,
                 from types.c:9:
/usr/include/python2.6/intobject.h:45: warning: ISO C90 does not support 'long long'
In file included from /usr/include/python2.6/Python.h:88,
                 from libxml_wrap.h:1,
                 from types.c:9:
/usr/include/python2.6/longobject.h:47: warning: ISO C90 does not support 'long long'
/usr/include/python2.6/longobject.h:48: warning: ISO C90 does not support 'long long'
/usr/include/python2.6/longobject.h:49: warning: ISO C90 does not support 'long long'
/usr/include/python2.6/longobject.h:50: warning: ISO C90 does not support 'long long'
/usr/include/python2.6/longobject.h:51: warning: ISO C90 does not support 'long long'
types.c: In function 'libxml_xmlXPathObjectPtrConvert':
types.c:550: warning: cast increases required alignment of target type
make[3]: *** [types.lo] Erreur 1
make[3]: *** Attente des tâches non terminées....
Found 1604 functions in libxml2-api.xml
Found 55 functions in libxml2-python-api.xml
Generated 886 wrapper functions, 557 failed, 216 skipped

Missing type converters: 
xmlRelaxNGValidityErrorFunc *:2  xmlXPathObjectPtr:22  const htmlEntityDesc *:2  xmlOutputMatchCallback:1  xmlElementContentPtr *:1  xmlStructuredErrorFunc:5  xmlSchematronValidCtxtPtr:3  xmlParserInputBufferCreateFilenameFunc:2  xmlSchemaValType:2  size_t:1  xmlEnumerationPtr:5  xmlSchemaWildcardPtr:1  xmlXIncludeCtxtPtr:4  xmlRelaxNGValidityErrorFunc:2  xmlSAXHandler *:4  ...:1  xmlShellReadlineFunc:1  xmlDict *:1  xmlAutomataPtr:19  unsigned long:1  xmlParserInputPtr:17  xmlCatalogAllow:2  xmlExpNodePtr:3  xmlElementContent *:1  xmlCharEncodingOutputFunc:1  xmlDictPtr:10  xmlTextWriterPtr:77  const htmlElemDesc *:1  xmlChRangeGroup *:1  xmlIDPtr:1  xmlSchemaValPtr:13  xmlInputMatchCallback:1  xmlElementTablePtr:2  xmlChar **:16  xmlXPathCompExprPtr:6  xmlTextReaderErrorFunc:1  xmlExternalEntityLoader:2  xmlNotationTablePtr:2  xmlXPathVariableLookupFunc:1  xmlParserNodeInfoPtr:1  xmlExpCtxtPtr:14  xmlPatternPtr:8  xmlC14NIsVisibleCallback:1  xmlDeregisterNodeFunc:2  va_list:1  xmlSchemaTypePtr:9  htmlStatus:1  xmlRegisterNodeFunc:2  xmlAttributeType:2  xmlRefPtr:1  xmlCharEncodingHandler *:4  xmlNotationPtr:3  xmlSaveCtxtPtr:8  xmlRegExecCallbacks:1  xmlNsPtr *:1  xmlLocationSetPtr:6  xmlSchemaSAXPlugPtr:1  xmlModulePtr:4  xmlEnumerationPtr *:2  xmlShellCtxtPtr:10  xlinkNodeDetectFunc:2  xmlRefTablePtr:1  xmlStreamCtxtPtr:6  xmlSchemaValidityErrorFunc *:2  xmlAttributeTablePtr:2  xmlSchematronParserCtxtPtr:5  xmlCatalogPrefer:1  xmlParserNodeInfoSeqPtr:3  xmlSchematronPtr:2  xmlNodePtr *:2  xmlInputReadCallback:7  char **:5  xmlCharEncoding:13  xmlRegExecCtxtPtr:5  xmlElementContentType:2  void *:86  xmlTextReaderErrorFunc *:1  xmlSAXHandlerPtr *:1  xmlEntityReferenceFunc:1  xmlDocPtr *:1  xmlBufferAllocationScheme:3  xmlSchemaValidityErrorFunc:2  xmlDOMWrapCtxtPtr:6  xmlOutputWriteCallback:2  xmlSchemaFacetPtr:7  xlinkHandlerPtr:2  xmlXPathFuncLookupFunc:1  htmlElemDesc *:3  xmlCharEncodingHandlerPtr:7  xmlCharEncodingInputFunc:1  xmlFeature:1  const xmlParserNodeInfo *:1  xmlNodeSetPtr:32  xmlEntitiesTablePtr:3  xmlIDTablePtr:1  xmlXPathFunction:4  xmlOutputBufferCreateFilenameFunc:2  xmlElementContentPtr:8  xmlElementTypeVal:1  xlinkType:1  xmlGenericErrorFunc *:1 
touch gen_prog
make[3]: quittant le répertoire « /var/tmp/portage/dev-libs/libxml2-2.7.3-r1/work/libxml2-2.7.3/python »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /var/tmp/portage/dev-libs/libxml2-2.7.3-r1/work/libxml2-2.7.3/python »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /var/tmp/portage/dev-libs/libxml2-2.7.3-r1/work/libxml2-2.7.3 »
make: *** [all] Erreur 2
 * 
 * ERROR: dev-libs/libxml2-2.7.3-r1 failed.
 * Call stack:
 *               ebuild.sh, line   48:  Called src_compile
 *             environment, line 3030:  Called die
 * The specific snippet of code:
 *       emake || die "Compilation failed"
 *  The die message:
 *   Compilation failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-libs/libxml2-2.7.3-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libxml2-2.7.3-r1/temp/environment'.
 * 

>>> Failed to emerge dev-libs/libxml2-2.7.3-r1 for /usr/armv4tl-softfloat-linux-gnueabi/, Log file:

>>>  '/var/tmp/portage/dev-libs/libxml2-2.7.3-r1/temp/build.log'

 * Messages for package dev-libs/libxml2-2.7.3-r1 merged to /usr/armv4tl-softfloat-linux-gnueabi/:

 * 
 * ERROR: dev-libs/libxml2-2.7.3-r1 failed.
 * Call stack:
 *               ebuild.sh, line   48:  Called src_compile
 *             environment, line 3030:  Called die
 * The specific snippet of code:
 *       emake || die "Compilation failed"
 *  The die message:
 *   Compilation failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-libs/libxml2-2.7.3-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libxml2-2.7.3-r1/temp/environment'.
 * 

  Changed 3 years ago by max_posedon

full build.log plz (and plz attache it as file)

follow-up: ↓ 10   Changed 3 years ago by max_posedon

also plz recompile _host and target_ python 2.6.2 version *from gentoo-openmoko overlay*

  Changed 3 years ago by max_posedon

and show your make.conf :)

in reply to: ↑ 8   Changed 3 years ago by pierrearinsal

Replying to max_posedon:

also plz recompile _host and target_ python 2.6.2 version *from gentoo-openmoko overlay*

they are already...

Changed 3 years ago by pierrearinsal

build log of cross-compiled libxml2 on a amd64

follow-up: ↓ 12   Changed 3 years ago by max_posedon

error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?).

What toolchain do you use? show plz, ls /var/db/pkg/cross-armv4tl-softfloat-linux-gnueabi and emerge-armv4tl... glibc

in reply to: ↑ 11   Changed 3 years ago by pierrearinsal

toolchain is :

binutils-2.18-r4 gcc-4.3.3-r2 glibc-2.9_p20081201-r2 linux-headers-2.6.28-r1

and emerge-arm... glibc gives :

[ebuild   R   ] sys-libs/glibc-2.9_p20081201-r2 to /usr/armv4tl-softfloat-linux-gnueabi/ USE="nls -crosscompile_opts_headers-only -debug -gd -glibc-omitfp -hardened -multilib -profile (-selinux) -vanilla" 0 kB

I use 2.6.29-gentoo kernel, but I doubt LONG_BIT definition changes between 2.6.28-r1 and 2.6.29?

  Changed 3 years ago by max_posedon

yes, kernel doesn't matter.

problem is looks like it happens only for x86_64 host, so I suggest you continue use 2.7.2-r1, let wait what news sleipnir gives us

  Changed 3 years ago by sleipnir

Look at the error above and you see in the compile line a "-I/usr/include/python2.6" This is the culprint not the toolchain...

  Changed 3 years ago by sleipnir

I think this part of the ebuild is bugging us:

        # Patching the Makefiles to respect get_libdir
        # Fixes BUG #86766, please keep this.
        # Danny van Dyk <kugelfang@gentoo.org> 2005/03/26
        for x in $(find "${S}" -name "Makefile") ; do
                sed \
                        -e "s|^\(PYTHON_SITE_PACKAGES\ =\ \/usr\/\).*\(\/python.*\)|\1$(get_libdir)\2|g" \
                        -i ${x} \
                        || die "sed failed"
        done

If you want, you can leave the bug for me max_posedon.

  Changed 3 years ago by sleipnir

pierrearinsal: Could you please also attach your config.log!?

Changed 3 years ago by pierrearinsal

sorry I haven't seen your message before

follow-up: ↓ 18   Changed 3 years ago by sleipnir

Ok, here we go. Your config.log contains:

PYTHON_INCLUDES='/usr/include/python2.6'

Which is not what we want. If you want to dig deeper into this yourself, try to find how and where this variable is defined (in configure.ac).

in reply to: ↑ 17 ; follow-up: ↓ 20   Changed 3 years ago by pierrearinsal

ok I'll figure it out and will send a pacth for configs file...

pierre

  Changed 3 years ago by sleipnir

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in revision r361. Please update your overlay and test! If you find any problems, reopen this ticket...

in reply to: ↑ 18   Changed 3 years ago by pierrearinsal

so in configure I found that, line 27575, run (host)/python -c "import sys; print sys.version[0:3]" to determine host python version. then look for python includes :

if test -r $prefix/include/python$PYTHON_VERSION/Python.h
      then
           PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
           PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
      else

so as configure has to run python, you can not do a ./configure --with-python=/usr/armv4.../usr because it will fail with a "cannot execute binary file", so I did a ./configure --prefix="/usr/armv4.../usr", and it gave me the exact same config.log , except for python lines :

PYTHON='/usr/bin/python'
PYTHON_INCLUDES='/usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6'
PYTHON_SITE_PACKAGES='/usr/lib64/python2.6/site-packages'
PYTHON_SUBDIR='python'
PYTHON_TESTS=' RelaxNGPythonTests SchemasPythonTests'
PYTHON_VERSION='2.6'

I did a make, and it crashed at the exact same location :

In file included from /usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/Python.h:58,
                 from libxml.c:14:
/usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/pyport.h:685:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from /usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/Python.h:86,
                 from libxml.c:14:
/usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/intobject.h:45: warning: ISO C90 does not support 'long long'
In file included from /usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/Python.h:88,
                 from libxml.c:14:
/usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/longobject.h:47: warning: ISO C90 does not support 'long long'
/usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/longobject.h:48: warning: ISO C90 does not support 'long long'
/usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/longobject.h:49: warning: ISO C90 does not support 'long long'
/usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/longobject.h:50: warning: ISO C90 does not support 'long long'
/usr/armv4tl-softfloat-linux-gnueabi/usr/include/python2.6/longobject.h:51: warning: ISO C90 does not support 'long long'
libxml.c: In function 'libxml_xmlValidCtxtGenericErrorFuncHandler':
libxml.c:1748: warning: unused parameter 'severity'
libxml.c: In function 'libxml_xmlValidCtxtGenericWarningFuncHandler':
libxml.c:1775: warning: unused parameter 'severity'
libxml.c: At top level:
libxml.c:2676: warning: no previous prototype for 'libxml_xmlNodeRemoveNsDef'
libxml.c: In function 'libxml_serializeNode':
libxml.c:2764: warning: unused variable 'len'
make[3]: *** [libxml.lo] Erreur 1
make[3]: quittant le répertoire « /var/tmp/portage/dev-libs/libxml2-2.7.3-r1/work/libxml2-2.7.3/python »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /var/tmp/portage/dev-libs/libxml2-2.7.3-r1/work/libxml2-2.7.3/python »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /var/tmp/portage/dev-libs/libxml2-2.7.3-r1/work/libxml2-2.7.3 »
make: *** [all] Erreur 

  Changed 3 years ago by max_posedon

  • status changed from closed to reopened
  • resolution fixed deleted

  Changed 3 years ago by max_posedon

pierrearinsal, plz don't forget reopen tickets if you have issues

  Changed 3 years ago by sleipnir

pierrearinsal, can you please test my patch!? It should fix the issue you found. :-) Please report back and close this bug, if you can confirm the patch works. Thanks!

  Changed 3 years ago by pierrearinsal

  • status changed from reopened to closed
  • resolution set to fixed

sorry I didn't see it...

yes, python install and library are found and patch is working..

I close this ticket thx..

Note: See TracTickets for help on using tickets.