Opened 3 years ago

Closed 7 months ago

#65043 closed defect (fixed)

py-lxml failures on 10.4.11 and 10.6.8

Reported by: barracuda156 Owned by: petrrr
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, tiger, rosetta, snowleopard Cc:
Port: py-lxml

Description

running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.4-ppc-cpython-39
creating build/temp.macosx-10.4-ppc-cpython-39/src
creating build/temp.macosx-10.4-ppc-cpython-39/src/lxml
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py39-lxml/work/compwrap/cc/opt/local/bin/gcc-apple-4.2 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -DCYTHON_CLINE_IN_TRACEBACK=0 -I/opt/local/include/libxml2 -Isrc -Isrc/lxml/includes -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/lxml/etree.c -o build/temp.macosx-10.4-ppc-cpython-39/src/lxml/etree.o -w -flat_namespace
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py39-lxml/work/compwrap/cc/opt/local/bin/gcc-apple-4.2 -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -arch ppc -isysroot/ build/temp.macosx-10.4-ppc-cpython-39/src/lxml/etree.o -L/opt/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.4-ppc-cpython-39/lxml/etree.cpython-39-darwin.so
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py39-lxml/work/lxml-4.8.0" && /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 setup.py --no-user-cfg build -j1 
Exit code: 138
Error: Failed to build py39-lxml: command execution failed

Attachments (1)

main.log (82.8 KB) - added by barracuda156 3 years ago.

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by barracuda156

Attachment: main.log added

comment:1 Changed 2 years ago by barracuda156

Also fails on Rosetta:

/usr/bin/gcc-4.2 -Wno-unused-result -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -DCYTHON_CLINE_IN_TRACEBACK=0 -I/opt/local/include/libxml2 -Isrc -Isrc/lxml/includes -I/opt/local/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/lxml/html/diff.c -o build/temp.macosx-10.6-ppc-cpython-310/src/lxml/html/diff.o -w -flat_namespace
/usr/bin/gcc-4.2 -Wno-unused-result -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -DCYTHON_CLINE_IN_TRACEBACK=0 -I/opt/local/include/libxml2 -Isrc -Isrc/lxml/includes -I/opt/local/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/lxml/html/clean.c -o build/temp.macosx-10.6-ppc-cpython-310/src/lxml/html/clean.o -w -flat_namespace
cc1: error: unrecognized command line option "-Wno-unused-result"
cc1: error: unrecognized command line option "-Wno-unused-result"
cc1: error: unrecognized command line option "-Wno-unused-result"
Compile failed: command '/usr/bin/gcc-4.2' failed with exit code 1
creating opt
creating opt/local
creating opt/local/var
creating opt/local/var/macports
creating opt/local/var/macports/build
creating opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml
creating opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py310-lxml
creating opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py310-lxml/work
creating opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py310-lxml/work/.tmp
cc -I/opt/local/include/libxml2 -I/usr/include/libxml2 -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py310-lxml/work/.tmp/xmlXPathInitbqdup_ic.c -o opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py310-lxml/work/.tmp/xmlXPathInitbqdup_ic.o
cc opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py310-lxml/work/.tmp/xmlXPathInitbqdup_ic.o -L/opt/local/lib -lxml2 -o a.out
ld: warning: in /opt/local/lib/libxml2.dylib, file was built for ppc7400 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_xmlXPathInit", referenced from:
      _main in xmlXPathInitbqdup_ic.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command '/usr/bin/gcc-4.2' failed with exit code 1
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py310-lxml/work/lxml-4.8.0" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 setup.py --no-user-cfg build -j6 
Exit code: 1

Oddly enough, blacklisting gcc-4* leads to a choice of clang, which obviously fails too:

/usr/bin/clang -Wno-unused-result -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -DCYTHON_CLINE_IN_TRACEBACK=0 -I/opt/local/include/libxml2 -Isrc -Isrc/lxml/includes -I/opt/local/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/lxml/html/diff.c -o build/temp.macosx-10.6-ppc-cpython-310/src/lxml/html/diff.o -w -flat_namespace
/usr/bin/clang -Wno-unused-result -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -DCYTHON_CLINE_IN_TRACEBACK=0 -I/opt/local/include/libxml2 -Isrc -Isrc/lxml/includes -I/opt/local/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/lxml/sax.c -o build/temp.macosx-10.6-ppc-cpython-310/src/lxml/sax.o -w -flat_namespace
clang: warning: not using the clang compiler for the 'powerpc' architecture
cc1: error: unrecognized command line option "-Wno-unused-result"
clang: warning: not using the clang compiler for the 'powerpc' architecture
cc1: error: unrecognized command line option "-Wno-unused-result"
Compile failed: command '/usr/bin/clang' failed with exit code 1
creating opt
creating opt/local
creating opt/local/var
creating opt/local/var/macports
creating opt/local/var/macports/build
creating opt/local/var/macports/build/_opt_PPCRosettaPorts_python_py-lxml
creating opt/local/var/macports/build/_opt_PPCRosettaPorts_python_py-lxml/py310-lxml
creating opt/local/var/macports/build/_opt_PPCRosettaPorts_python_py-lxml/py310-lxml/work
creating opt/local/var/macports/build/_opt_PPCRosettaPorts_python_py-lxml/py310-lxml/work/.tmp
cc -I/opt/local/include/libxml2 -I/usr/include/libxml2 -c /opt/local/var/macports/build/_opt_PPCRosettaPorts_python_py-lxml/py310-lxml/work/.tmp/xmlXPathInitkjdgcynh.c -o opt/local/var/macports/build/_opt_PPCRosettaPorts_python_py-lxml/py310-lxml/work/.tmp/xmlXPathInitkjdgcynh.o
cc opt/local/var/macports/build/_opt_PPCRosettaPorts_python_py-lxml/py310-lxml/work/.tmp/xmlXPathInitkjdgcynh.o -L/opt/local/lib -lxml2 -o a.out
ld: warning: in /opt/local/lib/libxml2.dylib, file was built for ppc7400 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_xmlXPathInit", referenced from:
      _main in xmlXPathInitkjdgcynh.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command '/usr/bin/clang' failed with exit code 1
Command failed:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_python_py-lxml/py310-lxml/work/lxml-4.8.0" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 setup.py --no-user-cfg build -j6 
Exit code: 1
Last edited 2 years ago by barracuda156 (previous) (diff)

comment:2 Changed 2 years ago by barracuda156

Keywords: rosetta snowleopard added
Summary: py-lxml fails to upgrade to @4.8.0 on 10.4.11py-lxml failures on 10.4.11 and 10.6.8

comment:3 Changed 15 months ago by petrrr

I have no possibility to reproduce the problem (and probably neither the skills).

So is this ticket still relevant or have we dropped support for very old versions?

comment:4 in reply to:  3 Changed 7 months ago by barracuda156

Replying to petrrr:

I have no possibility to reproduce the problem (and probably neither the skills).

So is this ticket still relevant or have we dropped support for very old versions?

It is relevant, and the port is still broken on 10.6.8 Rosetta at least:

running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.6-ppc-cpython-312
creating build/temp.macosx-10.6-ppc-cpython-312/src
creating build/temp.macosx-10.6-ppc-cpython-312/src/lxml
/usr/bin/clang -fno-strict-overflow -fno-common -dynamic -DNDEBUG -g -O3 -Wall -pipe -Os -arch ppc -isysroot/ -DCYTHON_CLINE_IN_TRACEBACK=0 -I/opt/local/include/libxml2 -Isrc -Isrc/lxml/includes -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c src/lxml/etree.c -o build/temp.macosx-10.6-ppc-cpython-312/src/lxml/etree.o -w -flat_namespace
clang: warning: not using the clang compiler for the 'powerpc' architecture
In file included from src/lxml/etree.c:297968:
/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/internal/pycore_frame.h: In function ‘_PyFrame_Initialize’:
/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/internal/pycore_frame.h:134: error: ‘for’ loop initial declaration used outside C99 mode
Compile failed: command '/usr/bin/clang' failed with exit code 1
creating opt
creating opt/local
creating opt/local/var
creating opt/local/var/macports
creating opt/local/var/macports/build
creating opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml
creating opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py312-lxml
creating opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py312-lxml/work
creating opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py312-lxml/work/.tmp
cc -I/opt/local/include/libxml2 -I/usr/include/libxml2 -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py312-lxml/work/.tmp/xmlXPathInitkfjp2usw.c -o opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py312-lxml/work/.tmp/xmlXPathInitkfjp2usw.o
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py312-lxml/work/.tmp/xmlXPathInitkfjp2usw.c: In function ‘main’:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py312-lxml/work/.tmp/xmlXPathInitkfjp2usw.c:3: warning: ‘xmlXPathInit’ is deprecated (declared at /opt/local/include/libxml2/libxml/xpath.h:564)
cc opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-lxml/py312-lxml/work/.tmp/xmlXPathInitkfjp2usw.o -L/opt/local/lib -lxml2 -o a.out
ld: warning: in /opt/local/lib/libxml2.dylib, file was built for ppc7400 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_xmlXPathInit", referenced from:
      _main in xmlXPathInitkfjp2usw.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Meson is a disaster of a build system. Probably this can be fixed by fixing compiler choice. I will try.

comment:5 Changed 7 months ago by barracuda156

Resolution: fixed
Status: assignedclosed

In 34abd4ad5ff627121ef1e266c7853aa836805cb4/macports-ports (master):

py-lxml: avoid old Xcode clang

Closes: #65043

Note: See TracTickets for help on using tickets.