Opened 2 months ago

Closed 2 months ago

#70707 closed defect (fixed)

micropython, mpy-cross do not respect MacPorts compiler choice and force clang

Reported by: barracuda156 Owned by: i0ntempest
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: Cc:
Port: micropython, mpy-cross

Description

--->  Building mpy-cross
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_micropython/mpy-cross/work/micropython-1.23.0/mpy-cross" && /usr/bin/make -j6 -w all V=1 
make: clang: Command not found
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_micropython/mpy-cross/work/micropython-1.23.0/mpy-cross'
make: clang: Command not found
mkdir -p build/genhdr
mkdir -p build
mkdir -p build/py
mkdir -p build/shared/runtime
/opt/local/bin/python3.12 ../py/makeversionhdr.py build/genhdr/mpversion.h
makeversionhdr.py: Warning: No git repo or tag info available, falling back to mpconfig.h version info.
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_micropython/mpy-cross/work/micropython-1.23.0/mpy-cross/../py/makeversionhdr.py:120: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  build_date = datetime.datetime.utcfromtimestamp(
GEN build/genhdr/mpversion.h
GEN build/genhdr/qstr.i.last
/opt/local/bin/python3.12 ../py/makeqstrdefs.py pp clang -E output build/genhdr/qstr.i.last cflags -I. -Ibuild -I.. -Wall -Werror -Wextra -Wno-unused-parameter -Wpointer-arith -std=gnu99 -Os   -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables -DNO_QSTR cxxflags  -DNO_QSTR sources ../py/mpstate.c ../py/malloc.c ../py/gc.c ../py/pystack.c ../py/qstr.c ../py/vstr.c ../py/mpprint.c ../py/unicode.c ../py/mpz.c ../py/reader.c ../py/lexer.c ../py/parse.c ../py/scope.c ../py/compile.c ../py/emitcommon.c ../py/emitbc.c ../py/asmbase.c ../py/asmx64.c ../py/emitnx64.c ../py/asmx86.c ../py/emitnx86.c ../py/asmthumb.c ../py/emitnthumb.c ../py/emitinlinethumb.c ../py/asmarm.c ../py/emitnarm.c ../py/asmxtensa.c ../py/emitnxtensa.c ../py/emitinlinextensa.c ../py/emitnxtensawin.c ../py/formatfloat.c ../py/parsenumbase.c ../py/parsenum.c ../py/emitglue.c ../py/persistentcode.c ../py/runtime.c ../py/runtime_utils.c ../py/scheduler.c ../py/nativeglue.c ../py/pairheap.c ../py/ringbuf.c ../py/stackctrl.c ../py/argcheck.c ../py/warning.c ../py/profile.c ../py/map.c ../py/obj.c ../py/objarray.c ../py/objattrtuple.c ../py/objbool.c ../py/objboundmeth.c ../py/objcell.c ../py/objclosure.c ../py/objcomplex.c ../py/objdeque.c ../py/objdict.c ../py/objenumerate.c ../py/objexcept.c ../py/objfilter.c ../py/objfloat.c ../py/objfun.c ../py/objgenerator.c ../py/objgetitemiter.c ../py/objint.c ../py/objint_longlong.c ../py/objint_mpz.c ../py/objlist.c ../py/objmap.c ../py/objmodule.c ../py/objobject.c ../py/objpolyiter.c ../py/objproperty.c ../py/objnone.c ../py/objnamedtuple.c ../py/objrange.c ../py/objreversed.c ../py/objset.c ../py/objsingleton.c ../py/objslice.c ../py/objstr.c ../py/objstrunicode.c ../py/objstringio.c ../py/objtuple.c ../py/objtype.c ../py/objzip.c ../py/opmethods.c ../py/sequence.c ../py/stream.c ../py/binary.c ../py/builtinimport.c ../py/builtinevex.c ../py/builtinhelp.c ../py/modarray.c ../py/modbuiltins.c ../py/modcollections.c ../py/modgc.c ../py/modio.c ../py/modmath.c ../py/modcmath.c ../py/modmicropython.c ../py/modstruct.c ../py/modsys.c ../py/moderrno.c ../py/modthread.c ../py/vm.c ../py/bc.c ../py/showbc.c ../py/repl.c ../py/smallint.c ../py/frozenmod.c ../py/mpconfig.h mpconfigport.h dependencies ../py/mpconfig.h mpconfigport.h changed_sources ../py/mpstate.c ../py/malloc.c ../py/gc.c ../py/pystack.c ../py/qstr.c ../py/vstr.c ../py/mpprint.c ../py/unicode.c ../py/mpz.c ../py/reader.c ../py/lexer.c ../py/parse.c ../py/scope.c ../py/compile.c ../py/emitcommon.c ../py/emitbc.c ../py/asmbase.c ../py/asmx64.c ../py/emitnx64.c ../py/asmx86.c ../py/emitnx86.c ../py/asmthumb.c ../py/emitnthumb.c ../py/emitinlinethumb.c ../py/asmarm.c ../py/emitnarm.c ../py/asmxtensa.c ../py/emitnxtensa.c ../py/emitinlinextensa.c ../py/emitnxtensawin.c ../py/formatfloat.c ../py/parsenumbase.c ../py/parsenum.c ../py/emitglue.c ../py/persistentcode.c ../py/runtime.c ../py/runtime_utils.c ../py/scheduler.c ../py/nativeglue.c ../py/pairheap.c ../py/ringbuf.c ../py/stackctrl.c ../py/argcheck.c ../py/warning.c ../py/profile.c ../py/map.c ../py/obj.c ../py/objarray.c ../py/objattrtuple.c ../py/objbool.c ../py/objboundmeth.c ../py/objcell.c ../py/objclosure.c ../py/objcomplex.c ../py/objdeque.c ../py/objdict.c ../py/objenumerate.c ../py/objexcept.c ../py/objfilter.c ../py/objfloat.c ../py/objfun.c ../py/objgenerator.c ../py/objgetitemiter.c ../py/objint.c ../py/objint_longlong.c ../py/objint_mpz.c ../py/objlist.c ../py/objmap.c ../py/objmodule.c ../py/objobject.c ../py/objpolyiter.c ../py/objproperty.c ../py/objnone.c ../py/objnamedtuple.c ../py/objrange.c ../py/objreversed.c ../py/objset.c ../py/objsingleton.c ../py/objslice.c ../py/objstr.c ../py/objstrunicode.c ../py/objstringio.c ../py/objtuple.c ../py/objtype.c ../py/objzip.c ../py/opmethods.c ../py/sequence.c ../py/stream.c ../py/binary.c ../py/builtinimport.c ../py/builtinevex.c ../py/builtinhelp.c ../py/modarray.c ../py/modbuiltins.c ../py/modcollections.c ../py/modgc.c ../py/modio.c ../py/modmath.c ../py/modcmath.c ../py/modmicropython.c ../py/modstruct.c ../py/modsys.c ../py/moderrno.c ../py/modthread.c ../py/vm.c ../py/bc.c ../py/showbc.c ../py/repl.c ../py/smallint.c ../py/frozenmod.c ../py/mpconfig.h mpconfigport.h
Traceback (most recent call last):
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_micropython/mpy-cross/work/micropython-1.23.0/mpy-cross/../py/makeqstrdefs.py", line 213, in <module>
    preprocess()
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_micropython/mpy-cross/work/micropython-1.23.0/mpy-cross/../py/makeqstrdefs.py", line 83, in preprocess
    for output in p.imap(pp(flags), chunks):
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multiprocessing/pool.py", line 873, in next
    raise value
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ^^^^^^^^^^^^^^^^^^^
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_micropython/mpy-cross/work/micropython-1.23.0/mpy-cross/../py/makeqstrdefs.py", line 65, in run
    return subprocess.check_output(args.pp + flags + files)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'clang'
make: *** [build/genhdr/qstr.i.last] Error 1
make: *** Deleting file `build/genhdr/qstr.i.last'

Change History (1)

comment:1 Changed 2 months ago by Sergey Fedorov <barracuda@…>

Resolution: fixed
Status: assignedclosed

In 894fed9611498799d0773d4a6d0bd7bf9d18827c/macports-ports (master):

micropython: fix build on < 10.12, fix compiler choice

Fixes: #70707

Note: See TracTickets for help on using tickets.