[MacPorts] #64427: libgphoto2: builds failing on some buildbots

MacPorts noreply at macports.org
Sun Jan 16 01:34:31 UTC 2022


#64427: libgphoto2: builds failing on some buildbots
-------------------------+------------------------
  Reporter:  mascguy     |      Owner:  ryandesign
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.7.1
Resolution:              |   Keywords:
      Port:  libgphoto2  |
-------------------------+------------------------

Comment (by kencu):

 In this case, I believe if you explicitly set the C standard to something
 less than C11 you should be OK, as the fallback path will be used:

 https://github.com/gphoto/libgphoto2/blob/4602672a02a4daeeeeb6ef80a1ee6db7c4ebd14c/libgphoto2_port/libgphoto2_port
 /compiletime-assert.h#L33


 here are some other options.

 {{{static_assert}}} is supposed to work with C11 code, but it does not
 work when building C code with newer clangs on older systems like the
 10.6.8 system I have in front of me. It shows an implicit function
 definition that then fails to link, as above. I presume the function is
 missing in the system headers {{{<assert.h}}} on these older systems, and
 if that pans out true, it might be able to be added to legacysupport
 perhaps.

 {{{_Static_assert}}} does work, so you could define that, eg:
 {{{
 #define static_assert _Static_assert
 }}}

 compiling with clang++-mp-11 does work to compile {{{static_assert}}} even
 in C code, but clang-mp-11 does not work. I presume it is in the newer c++
 headers installed with clang++-mp-11.

 We are likely to see this error more.

 I don't believe there is anything wrong with libgphoto2, so you might get
 pushback from them about fixing it on their end.

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


More information about the macports-tickets mailing list