Re: [MacPorts] #71661: py-ujson fails to build: error: ‘TypeContext’ has no member named ‘longValue’

MacPorts noreply at macports.org
Sat Dec 28 18:32:46 UTC 2024


#71661: py-ujson fails to build: error: ‘TypeContext’ has no member named
‘longValue’
------------------------------------+------------------------
  Reporter:  barracuda156           |      Owner:  reneeotten
      Type:  defect                 |     Status:  assigned
  Priority:  Normal                 |  Milestone:
 Component:  ports                  |    Version:  2.10.5
Resolution:                         |   Keywords:
      Port:  py312-ujson, py-ujson  |
------------------------------------+------------------------

Comment (by barracuda156):

 Replying to [comment:1 reneeotten]:

 Ok, so nothing powerpc-related, it just needs C++11 with newer pythons.

 Here is the fix:
 {{{
     if {${python.version} > 311} {
         compiler.cxx_standard 2011
     }
 }}}

 And then:

 {{{
 --->  Building py312-ujson
 Executing:  cd "/opt/local/var/macports/build
 /_opt_PPCSnowLeopardPorts_python_py-ujson/py312-ujson/work/ujson-5.10.0"
 &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
 -m build --no-isolation --wheel --outdir /opt/local/var/macports/build
 /_opt_PPCSnowLeopardPorts_python_py-ujson/py312-ujson/work
 * Getting build dependencies for wheel...
 * Building wheel...
 WARNING setuptools_scm.pyproject_reading toml section missing
 'pyproject.toml does not contain a tool.setuptools_scm section'
 Traceback (most recent call last):
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36,
 in read_pyproject
     section = defn.get("tool", {})[tool_name]
               ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
 KeyError: 'setuptools_scm'
 running bdist_wheel
 running build
 running build_ext
 INFO: Disabling color, you really want to install colorlog.
 Disabling color, you really want to install colorlog.
 building 'ujson' extension
 creating build/temp.macosx-10.6-ppc-cpython-312/deps/double-conversion
 /double-conversion
 creating build/temp.macosx-10.6-ppc-cpython-312/lib
 creating build/temp.macosx-10.6-ppc-cpython-312/python
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -I./python -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./deps/double-conversion/double-conversion/bignum-dtoa.cc -o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/bignum-dtoa.o -D_GNU_SOURCE
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -I./python -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./deps/double-conversion/double-conversion/bignum.cc -o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/bignum.o -D_GNU_SOURCE
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -I./python -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./deps/double-conversion/double-conversion/cached-powers.cc -o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/cached-powers.o -D_GNU_SOURCE
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -I./python -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./deps/double-conversion/double-conversion/double-to-string.cc -o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/double-to-string.o -D_GNU_SOURCE
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -I./python -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./deps/double-conversion/double-conversion/fast-dtoa.cc -o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/fast-dtoa.o -D_GNU_SOURCE
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -I./python -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./deps/double-conversion/double-conversion/fixed-dtoa.cc -o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/fixed-dtoa.o -D_GNU_SOURCE
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -I./python -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./deps/double-conversion/double-conversion/string-to-double.cc -o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/string-to-double.o -D_GNU_SOURCE
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -I./python -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./deps/double-conversion/double-conversion/strtod.cc -o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/strtod.o -D_GNU_SOURCE
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -I./python -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./lib/dconv_wrapper.cc -o build/temp.macosx-10.6-ppc-
 cpython-312/./lib/dconv_wrapper.o -D_GNU_SOURCE
 /opt/local/bin/gcc-mp-14 -fno-strict-overflow -Wsign-compare -fno-common
 -dynamic -DNDEBUG -g -O3 -Wall -pipe -Os -arch ppc -isysroot/ -I./python
 -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./lib/ultrajsondec.c -o build/temp.macosx-10.6-ppc-
 cpython-312/./lib/ultrajsondec.o -D_GNU_SOURCE
 ./lib/ultrajsondec.c:69:47: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
    69 | static JSOBJ FASTCALL_MSVC decode_any( struct DecoderState *ds)
 FASTCALL_ATTR;
       |                                               ^~~~~~~~~~~~
 ./lib/ultrajsondec.c:80:1: warning: 'fastcall' attribute directive ignored
 [-Wattributes]
    80 | {
       | ^
 ./lib/ultrajsondec.c:92:1: warning: 'fastcall' attribute directive ignored
 [-Wattributes]
    92 | {
       | ^
 ./lib/ultrajsondec.c:250:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   250 | {
       | ^
 ./lib/ultrajsondec.c:270:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   270 | {
       | ^
 ./lib/ultrajsondec.c:292:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   292 | {
       | ^
 ./lib/ultrajsondec.c:312:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   312 | {
       | ^
 ./lib/ultrajsondec.c:363:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   363 | {
       | ^
 ./lib/ultrajsondec.c:590:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   590 | {
       | ^
 ./lib/ultrajsondec.c:654:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   654 | {
       | ^
 ./lib/ultrajsondec.c:748:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   748 | {
       | ^
 /opt/local/bin/gcc-mp-14 -fno-strict-overflow -Wsign-compare -fno-common
 -dynamic -DNDEBUG -g -O3 -Wall -pipe -Os -arch ppc -isysroot/ -I./python
 -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./lib/ultrajsonenc.c -o build/temp.macosx-10.6-ppc-
 cpython-312/./lib/ultrajsonenc.o -D_GNU_SOURCE
 ./lib/ultrajsonenc.c:184:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   184 | {
       | ^
 ./lib/ultrajsonenc.c:543:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   543 | {
       | ^
 ./lib/ultrajsonenc.c:565:1: warning: 'fastcall' attribute directive
 ignored [-Wattributes]
   565 | {
       | ^
 /opt/local/bin/gcc-mp-14 -fno-strict-overflow -Wsign-compare -fno-common
 -dynamic -DNDEBUG -g -O3 -Wall -pipe -Os -arch ppc -isysroot/ -I./python
 -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./python/JSONtoObj.c -o build/temp.macosx-10.6-ppc-
 cpython-312/./python/JSONtoObj.o -D_GNU_SOURCE
 In file included from
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/Python.h:44,
                  from ./python/JSONtoObj.c:41:
 In function '_Py_IsImmortal',
     inlined from 'Py_DECREF' at
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/object.h:700:9,
     inlined from 'JSONToObj' at ./python/JSONtoObj.c:244:5:
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/object.h:244:14:
 warning: 'sarg' may be used uninitialized [-Wmaybe-uninitialized]
   244 |     return op->ob_refcnt == _Py_IMMORTAL_REFCNT;
       |            ~~^~~~~~~~~~~
 ./python/JSONtoObj.c: In function 'JSONToObj':
 ./python/JSONtoObj.c:157:13: note: 'sarg' was declared here
   157 |   PyObject *sarg;
       |             ^~~~
 /opt/local/bin/gcc-mp-14 -fno-strict-overflow -Wsign-compare -fno-common
 -dynamic -DNDEBUG -g -O3 -Wall -pipe -Os -arch ppc -isysroot/ -I./python
 -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./python/objToJSON.c -o build/temp.macosx-10.6-ppc-
 cpython-312/./python/objToJSON.o -D_GNU_SOURCE
 ./python/objToJSON.c: In function 'PyUnicodeToUTF8Raw':
 ./python/objToJSON.c:129:18: warning: initialization discards 'const'
 qualifier from pointer target type [-Wdiscarded-qualifiers]
   129 |     char *data = PyUnicode_AsUTF8AndSize(obj, &len);
       |                  ^~~~~~~~~~~~~~~~~~~~~~~
 /opt/local/bin/gcc-mp-14 -fno-strict-overflow -Wsign-compare -fno-common
 -dynamic -DNDEBUG -g -O3 -Wall -pipe -Os -arch ppc -isysroot/ -I./python
 -I./lib -I./deps/double-conversion/double-conversion
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c ./python/ujson.c -o build/temp.macosx-10.6-ppc-
 cpython-312/./python/ujson.o -D_GNU_SOURCE
 creating build/lib.macosx-10.6-ppc-cpython-312
 /opt/local/bin/g++-mp-14 -arch ppc -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/
 -bundle -undefined dynamic_lookup -L/opt/local/lib
 -Wl,-headerpad_max_install_names -arch ppc -arch ppc
 -D_GLIBCXX_USE_CXX11_ABI=0 -isysroot/ build/temp.macosx-10.6-ppc-
 cpython-312/./deps/double-conversion/double-conversion/bignum-dtoa.o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/bignum.o build/temp.macosx-10.6-ppc-cpython-312/./deps/double-
 conversion/double-conversion/cached-powers.o build/temp.macosx-10.6-ppc-
 cpython-312/./deps/double-conversion/double-conversion/double-to-string.o
 build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion/double-
 conversion/fast-dtoa.o build/temp.macosx-10.6-ppc-cpython-312/./deps
 /double-conversion/double-conversion/fixed-dtoa.o build/temp.macosx-10.6
 -ppc-cpython-312/./deps/double-conversion/double-conversion/string-to-
 double.o build/temp.macosx-10.6-ppc-cpython-312/./deps/double-conversion
 /double-conversion/strtod.o build/temp.macosx-10.6-ppc-
 cpython-312/./lib/dconv_wrapper.o build/temp.macosx-10.6-ppc-
 cpython-312/./lib/ultrajsondec.o build/temp.macosx-10.6-ppc-
 cpython-312/./lib/ultrajsonenc.o build/temp.macosx-10.6-ppc-
 cpython-312/./python/JSONtoObj.o build/temp.macosx-10.6-ppc-
 cpython-312/./python/objToJSON.o build/temp.macosx-10.6-ppc-
 cpython-312/./python/ujson.o -o build/lib.macosx-10.6-ppc-
 cpython-312/ujson.cpython-312-darwin.so -lstdc++ -lm
 installing to build/bdist.macosx-10.6-ppc/wheel
 running install
 running install_lib
 creating build/bdist.macosx-10.6-ppc/wheel
 copying build/lib.macosx-10.6-ppc-cpython-312/ujson.cpython-312-darwin.so
 -> build/bdist.macosx-10.6-ppc/wheel/.
 running install_egg_info
 running egg_info
 writing ujson.egg-info/PKG-INFO
 writing dependency_links to ujson.egg-info/dependency_links.txt
 writing top-level names to ujson.egg-info/top_level.txt
 reading manifest file 'ujson.egg-info/SOURCES.txt'
 reading manifest template 'MANIFEST.in'
 adding license file 'LICENSE.txt'
 writing manifest file 'ujson.egg-info/SOURCES.txt'
 Copying ujson.egg-info to
 build/bdist.macosx-10.6-ppc/wheel/./ujson-5.10.0-py3.12.egg-info
 running install_scripts
 creating build/bdist.macosx-10.6-ppc/wheel/ujson-5.10.0.dist-info/WHEEL
 creating '/opt/local/var/macports/build
 /_opt_PPCSnowLeopardPorts_python_py-ujson/py312-ujson/work/.tmp-
 gvhdwrgj/ujson-5.10.0-cp312-cp312-macosx_10_6_ppc.whl' and adding
 'build/bdist.macosx-10.6-ppc/wheel' to it
 adding 'ujson.cpython-312-darwin.so'
 adding 'ujson-5.10.0.dist-info/LICENSE.txt'
 adding 'ujson-5.10.0.dist-info/METADATA'
 adding 'ujson-5.10.0.dist-info/WHEEL'
 adding 'ujson-5.10.0.dist-info/top_level.txt'
 adding 'ujson-5.10.0.dist-info/RECORD'
 removing build/bdist.macosx-10.6-ppc/wheel
 Successfully built ujson-5.10.0-cp312-cp312-macosx_10_6_ppc.whl
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/71661#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list