Re: [MacPorts] #65992: py310-pycryptodome fails to build on 10.5.8: error: #error No routines for aligned memory; error: ‘for’ loop initial declaration used outside C99 mode

MacPorts noreply at macports.org
Sat Oct 15 18:45:12 UTC 2022


#65992: py310-pycryptodome fails to build on 10.5.8: error: #error No routines for
aligned memory; error: ‘for’ loop initial declaration used outside C99 mode
-------------------------------------+-------------------------------------
  Reporter:  barracuda156            |      Owner:  catap
      Type:  defect                  |     Status:  assigned
  Priority:  Normal                  |  Milestone:
 Component:  ports                   |    Version:  2.7.2
Resolution:                          |   Keywords:  powerpc, leopard,
      Port:  py310-pycryptodome,     |  snowleopard
  py-pycryptodome                    |
-------------------------------------+-------------------------------------

Comment (by kencu):

 I personally find that making python ports do your bidding is hard.

 I had trouble getting the compiler_wrapper PortGroup to make this work. I
 suspect the needed linker flags were not available during the testing
 phase for posix_memalign test file.

 In the end, I hacked this workaround into the Portfile
 {{{
     livecheck.type      none

 +    configure.cc         ${configure.cc} -std=c99
 -Wl,-lMacportsLegacySupport

     test.run            yes
 }}}

 and it worked, building with the default gcc-4.2:

 {{{
 $ port -v installed  py310-pycryptodome
 The following ports are currently installed:
   py310-pycryptodome @3.15.0_0 (active) requested_variants=''
 platform='darwin 9' archs='i386' date='2022-10-15T11:37:45-0700'
 }}}

 and it seemed to do OK on the test suite:
 {{{
 ....................................................................................................................................................................................
 ----------------------------------------------------------------------
 Ran 2707 tests in 134.797s

 OK
 }}}

 that at least proves that this port can be built. What the elegant fix
 might be remains to be determined.

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


More information about the macports-tickets mailing list