From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95926 invoked by alias); 20 Sep 2019 15:17:00 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 95906 invoked by uid 89); 20 Sep 2019 15:17:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*c:alternative X-HELO: mail-io1-f43.google.com Received: from mail-io1-f43.google.com (HELO mail-io1-f43.google.com) (209.85.166.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Sep 2019 15:16:58 +0000 Received: by mail-io1-f43.google.com with SMTP id a1so16997383ioc.6 for ; Fri, 20 Sep 2019 08:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0jza8jIy00eCq+TuzNsKmbO3IhZRtZ2UnYaMPcAl5ak=; b=nq/Wn1DLB7aEZFX3Vj1pbCGupGRuwvfVRskKsUeZrfNLmDqtj5cdtcQ1U6QMmJMVoO hvo73iTlFja1Noc0AdClx01h9oyMwbIIpczY3mNsWzDX8I1s+eeUDzGz3qoeQCVYDoxw r/xSLm2iAXT5YBH+P1XCYlufiu+pjzIhl9EqrQmcrBmD6QC/VJVB+Xy379sJoX+a8xyI 3Mp6pM2mnE2ikMFDJYMvtCuG5osJbxaf2EnXXUkp5MVlqo9sOSnIyrHNJbMnD74or2jS flh4VU3MRxTV5OtNeggwnvQHu3oSNY2sngzu+LrFdEZ/N4nTAl+qKc6eyYSYSPknqDi8 LR6g== MIME-Version: 1.0 References: <20190920105756.GP9749@gate.crashing.org> In-Reply-To: <20190920105756.GP9749@gate.crashing.org> From: Vassilena Treneva Date: Fri, 20 Sep 2019 15:17:00 -0000 Message-ID: Subject: Re: [DSO missing from command line] gcc-c++ error To: Segher Boessenkool Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-09/txt/msg00058.txt.bz2 Yes, I think I have the proper flag added. CMAKE file looks like this: SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=maybe-uninitialized -std=gnu++0x --coverage -fprofile-arcs -ftest-coverage -lpthread") On Fri, Sep 20, 2019 at 1:58 PM Segher Boessenkool < segher@kernel.crashing.org> wrote: > On Fri, Sep 20, 2019 at 01:42:21PM +0300, Vassilena Treneva wrote: > > I am using the same versions of gcc-c++ and glibc (gcc-c++ 4.8.5 & glibc > > 2.17) on RHEL7 and CENTOS7, but I get a compile time error ONLY on > CENTOS7: > > > > /usr/bin/ld: CMakeFiles/GTest.Test.dir/gtest/gtest-all.cc.o: *undefined > > reference to symbol 'pthread_key_delete@@GLIBC_2.2.5'* > > //usr/lib64/libpthread.so.0: > > *error adding symbols: DSO missing from command line* > > It says you should have -lpthread on your link command line. Do you? > > (Often this library is automatically linked to, but not always). > > > Segher >