Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56572 closed update (fixed)

fbthrift: update to 2018.05.28.00

Reported by: mohd-akram (Mohamed Akram) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: fbthrift

Description


Attachments (1)

patch-cmake-config.diff (644 bytes) - added by mohd-akram (Mohamed Akram) 6 years ago.
Patch to fix CMake build

Download all attachments as: .zip

Change History (7)

comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Status: newaccepted

I'm trying to. It now uses cmake, and it requires its dependency folly to have been installed with cmake too, and that currently isn't working for me, so more investigation is needed.

Changed 6 years ago by mohd-akram (Mohamed Akram)

Attachment: patch-cmake-config.diff added

Patch to fix CMake build

comment:2 Changed 6 years ago by mohd-akram (Mohamed Akram)

Found the culprit.

In ./work/build/CMakeFiles/CMakeError.log:

Building C object CMakeFiles/cmTC_513c0.dir/CheckSymbolExists.c.o
/usr/bin/clang  -I/opt/local/include  -pipe -Os -DNDEBUG -I/opt/local/include -std=gnu++14 -arch x86_64 -mmacosx-version-min=10.13   -o CMakeFiles/cmTC_513c0.dir/CheckSymbolExists.c.o   -c /opt/local/var/macports/build/_Users_mohamed_.ports_devel_folly/folly/work/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
error: invalid argument '-std=gnu++14' not allowed with 'C'
make[1]: *** [CMakeFiles/cmTC_513c0.dir/CheckSymbolExists.c.o] Error 1
make: *** [cmTC_513c0/fast] Error 2

File /opt/local/var/macports/build/_Users_mohamed_.ports_devel_folly/folly/work/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_atfork
  return ((int*)(&pthread_atfork))[argc];
#else
  (void)argc;
  return 0;
#endif
}

clang gives an error when passing an invalid -std argument, causing cmake checks to fail, while GCC (tested with gcc-mp-5) treats it as a warning.

The std=gnu++14 argument is added here.

I've attached a patch for this that removes that flag for C-based checks.

comment:3 Changed 6 years ago by mohd-akram (Mohamed Akram)

Resolution: fixed
Status: acceptedclosed

In 737c3fceee492c943f787441d10a64afc875fe7b/macports-ports (master):

fbthrift: update to 2018.05.28.00

Removes autoconf related configuration.

Closes: #56572

comment:4 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

So the patch wasn't needed after all? It was not added in the above commit.

comment:5 Changed 6 years ago by mohd-akram (Mohamed Akram)

I wasn't clear. That patch was needed for folly - https://github.com/macports/macports-ports/pull/1933.

comment:6 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Oh right, sorry. And just to record it here, that got merged in [38a75a7125234b3b8b06e3e2f76db876cac04e53/macports-ports].

Note: See TracTickets for help on using tickets.