macports-ports icon indicating copy to clipboard operation
macports-ports copied to clipboard

fb303: update to 2022.08.08

Open barracuda156 opened this issue 1 year ago • 2 comments

Description

This is a preliminary update of fb303. (WIP: PPC does not build yet, do not merge. I need to check if Intel builds fine or also needs patches.)

Type(s)
  • [x] bugfix
  • [x] enhancement
  • [ ] security fix
Tested on

macOS 10.6.8 Server Xcode 3.2.6

Verification

Have you

  • [x] followed our Commit Message Guidelines?
  • [x] squashed and minimized your commits?
  • [x] checked that there aren't other open pull requests for the same change?
  • [ ] referenced existing tickets on Trac with full URL?
  • [x] checked your Portfile with port lint --nitpick?
  • [ ] tried existing tests with sudo port test?
  • [ ] tried a full install with sudo port -vst install?
  • [ ] tested basic functionality of all binary files?

barracuda156 avatar Sep 01 '22 00:09 barracuda156

Sergey, let me know when you're done with your changes, and I'll test on a few older macOS releases.

There's no rush though, so take your time.

mascguy avatar Sep 01 '22 04:09 mascguy

@mascguy Thank you.

At the moment I am getting a bunch of static assert errors of this sort:

:info:build /opt/local/include/folly/Synchronized.h:1499:38: error: static assertion failed: mismatch
:info:build  1499 |     static_assert(sizeof(simulacrum) == sizeof(SynchronizedType), "mismatch");
:info:build       |                   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/folly/Synchronized.h:1499:38: note: the comparison reduces to '(52 == 56)'
:info:build /opt/local/include/folly/Synchronized.h:1500:39: error: static assertion failed: mismatch
:info:build  1500 |     static_assert(alignof(simulacrum) == alignof(SynchronizedType), "mismatch");
:info:build       |                   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/folly/Synchronized.h:1500:39: note: the comparison reduces to '(4 == 8)'

barracuda156 avatar Sep 01 '22 10:09 barracuda156

Also fails on 10.5.8:

/opt/local/include/folly/Synchronized.h:1499:38: error: static assertion failed: mismatch
 1499 |     static_assert(sizeof(simulacrum) == sizeof(SynchronizedType), "mismatch");
      |                   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/folly/Synchronized.h:1499:38: note: '(sizeof (simulacrum) == sizeof (folly::Synchronized<facebook::fb303::TimeseriesHistogram<long long int>, facebook::fb303::MutexWrapper>))' evaluates to false
/opt/local/include/folly/Synchronized.h:1500:39: error: static assertion failed: mismatch
 1500 |     static_assert(alignof(simulacrum) == alignof(SynchronizedType), "mismatch");
      |                   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/folly/Synchronized.h:1500:39: note: '(4 == 8)' evaluates to false

(So not a Rosetta-specific failure.)

barracuda156 avatar Oct 15 '22 09:10 barracuda156

This fixes the problem, apparently:

    if {${build_arch} in [list ppc ppc64]} {
        configure.cflags-append -malign-natural
        configure.cxxflags-append -malign-natural
    }

barracuda156 avatar Oct 17 '22 15:10 barracuda156

Sergey, let me know when you're done with your changes, and I'll test on a few older macOS releases. There's no rush though, so take your time.

@mascguy Done!

barracuda156 avatar Oct 17 '22 15:10 barracuda156

I believe this can be merged.

barracuda156 avatar Oct 29 '22 23:10 barracuda156

@michaelld When you get a minute, could you please help with merging this? It was ready for non-PPC long back, now PPC also building. This is the last of folly group still stuck at older version.

barracuda156 avatar Nov 11 '22 21:11 barracuda156