From dev-return-52957-archive-asf-public=cust-asf.ponee.io@thrift.apache.org Sun Jul 1 17:24:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E3C15180654 for ; Sun, 1 Jul 2018 17:24:04 +0200 (CEST) Received: (qmail 11833 invoked by uid 500); 1 Jul 2018 15:24:03 -0000 Mailing-List: contact dev-help@thrift.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@thrift.apache.org Delivered-To: mailing list dev@thrift.apache.org Received: (qmail 11822 invoked by uid 99); 1 Jul 2018 15:24:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jul 2018 15:24:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6CBF1C984E for ; Sun, 1 Jul 2018 15:24:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id BZlzfX3fsxkk for ; Sun, 1 Jul 2018 15:24:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id CC21E5FB5C for ; Sun, 1 Jul 2018 15:24:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E0242E0F18 for ; Sun, 1 Jul 2018 15:24:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 380152183F for ; Sun, 1 Jul 2018 15:24:00 +0000 (UTC) Date: Sun, 1 Jul 2018 15:24:00 +0000 (UTC) From: "Christopher Friedt (JIRA)" To: dev@thrift.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (THRIFT-4594) Unable to Build Test Suite in Alpine Linux MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/THRIFT-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16529132#comment-16529132 ] Christopher Friedt commented on THRIFT-4594: -------------------------------------------- Rich, the Thrift code doesn't bypass calling pthread_mutex_init, as shown [here|https://github.com/apache/thrift/blob/0.11.0/lib/cpp/src/thrift/concurrency/Mutex.cpp#L244]. I think what it the failing tests highlight are just semantic differences in how e.g. glibc and Apple's libc handle those types of mutexes, vs how musl handles them. Since you're a musl developer, it would be great if you could suggest a good path to resolution for this bug. Personally, I think musl is great, and particularly think Alpine Linux is a great distro for Docker containers, but at the same time, I plan on leveraging thrift for a fair amount of commercial things too, and use Docker extensively in automated tests with GitLab CI. > Unable to Build Test Suite in Alpine Linux > ------------------------------------------ > > Key: THRIFT-4594 > URL: https://issues.apache.org/jira/browse/THRIFT-4594 > Project: Thrift > Issue Type: Bug > Components: Test Suite > Affects Versions: 0.11.0 > Environment: Ubuntu Bionic (native) > alpine:latest (docker) > Reporter: Christopher Friedt > Priority: Minor > Fix For: 0.12.0 > > Attachments: make-check-alpine-3.8.txt, make-check-macos-10.13.5.text, musl-1.1.19-mtx-init-supported-types.patch, thrift-alpine-20180701.tar.gz > > > It seems that the 0.11.0 lib/cpp/test suite is not building correctly when run inside of Alpine Linux 3.8 in a Docker container. > I've narrowed the culprits down to the non-portable (NP) class of Mutex initializers. The failure occurs in unpatched code (and obviously in my CI build recipe, attached). > Currently, I'm working on automating builds of thrift for Alpine Linux 3.8, and they will likely require "make check" to pass successfully in future versions. Might as well ensure it works now. > If you want to duplicate my build easily in Docker, you can use the attachment (e.g. tar xpvzf thrift-ci-build-20180627.tar.xz; cd thrift-20180627; docker build -t foo .) > {noformat} > make check > ... > /bin/bash ../../../libtool --tag=CXX --mode=link x86_64-alpine-linux-musl-g++ -Wall -Wextra -pedantic -Os -fomit-frame-pointer -L/usr/lib -Wl,--no-undefined -o TPipedTransportTest TPipedTransportTest.o TPipeInterruptTest.o libtestgencpp.la ../../../lib/cpp/libthrift.la /usr/lib/libboost_unit_test_framework.a /usr/lib/libboost_system.a /usr/lib/libboost_thread-mt.a -lrt -lpthread > concurrency/MutexTest.o: In function `MutexTest::happy_path::test_method()': > MutexTest.cpp:(.text+0x18): undefined reference to `apache::thrift::concurrency::Mutex::ERRORCHECK_INITIALIZER(void*)' > concurrency/MutexTest.o: In function `MutexTest::recursive_happy_path::test_method()': > MutexTest.cpp:(.text+0x580): undefined reference to `apache::thrift::concurrency::Mutex::RECURSIVE_INITIALIZER(void*)' > concurrency/MutexTest.o: In function `MutexTest::trylock::test_method()': > MutexTest.cpp:(.text+0x1573): undefined reference to `apache::thrift::concurrency::Mutex::ADAPTIVE_INITIALIZER(void*)' > concurrency/MutexTest.o: In function `LFAT::LFAT()': > MutexTest.cpp:(.text._ZN4LFATC2Ev[_ZN4LFATC5Ev]+0x17): undefined reference to `apache::thrift::concurrency::Mutex::ERRORCHECK_INITIALIZER(void*)' > collect2: error: ld returned 1 exit status > make[5]: *** [Makefile:1190: UnitTests] Error 1 > make[5]: *** Waiting for unfinished jobs.... > libtool: link: x86_64-alpine-linux-musl-g++ -Wall -Wextra -pedantic -Os -fomit-frame-pointer -Wl,--no-undefined -o .libs/TFDTransportTest TFDTransportTest.o -L/usr/lib ../../../lib/cpp/.libs/libthrift.so -lssl -lcrypto /usr/lib/libboost_unit_test_framework.a -lrt -lpthread > libtool: link: x86_64-alpine-linux-musl-g++ -Wall -Wextra -pedantic -Os -fomit-frame-pointer -Wl,--no-undefined -o .libs/TPipedTransportTest TPipedTransportTest.o TPipeInterruptTest.o -L/usr/lib ./.libs/libtestgencpp.a /home/alpine/thrift/src/thrift-0.11.0/lib/cpp/.libs/libthrift.so ../../../lib/cpp/.libs/libthrift.so -lssl -lcrypto /usr/lib/libboost_unit_test_framework.a /usr/lib/libboost_system.a /usr/lib/libboost_thread-mt.a -lrt -lpthread > make[5]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp/test' > make[4]: *** [Makefile:1507: check-am] Error 2 > make[4]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp/test' > make[3]: *** [Makefile:1510: check] Error 2 > make[3]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp/test' > make[2]: *** [Makefile:1661: check-recursive] Error 1 > make[2]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp' > make[1]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib' > make[1]: *** [Makefile:576: check-recursive] Error 1 > make: *** [Makefile:659: check-recursive] Error 1 > >>> ERROR: thrift*: check failed > >>> ERROR: thrift: all failed > >>> thrift: Uninstalling dependencies..{noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)