From: "Dave Yeo" Received: from [192.168.100.201] (HELO mail.2rosenthals.com) by 2rosenthals.com (CommuniGate Pro SMTP 5.4.10) with ESMTPS id 753513 for gnuports@2rosenthals.com; Sun, 10 May 2020 17:28:02 -0400 Received: from [192.168.200.201] (port=42000 helo=mail2.2rosenthals.com) by mail.2rosenthals.com with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1jXtUE-0003br-2X for gnuports@2rosenthals.com; Sun, 10 May 2020 17:27:50 -0400 Received: from mail-vs1-f50.google.com ([209.85.217.50]:34330) by mail2.2rosenthals.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1jXtPJ-0004RZ-0F for gnuports@2rosenthals.com; Sun, 10 May 2020 17:22:45 -0400 Received: by mail-vs1-f50.google.com with SMTP id x6so4402394vso.1 for ; Sun, 10 May 2020 14:22:44 -0700 (PDT) X-CTCH-RefID: str=0001.0A02020E.5EB870A5.000F,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=IZz/mzlZmaDBwEJCzRgPF/j5pZtdk8Ffmpjf0TFnoZI=; b=nceXe5K6Kl6ciUd+OQ4pSosf7uCId+vh9uWNSvhHtmJtx0VvZwzf4jbkgXvxp06DjY FQmn9tQohn1tsqgeVt43rKrWU0rjOqTWLIxHtSEF6AzU4BTRgn90MKutf/Enhr0tuhxY YnGCuB8psTTM74opvHjPfH4WFGVya8/gGQP1XYTUtqe9dTm6ZkowhQ0VVuRLsdmyTt0K tuNFn/P/IXoM69gX2kE/Wuo9ktag3xAIZZDjDM7/R38JyAjrkpem4oVAxQZbjhWT4zxY nGOijVGNXPAISC586Imdg0oCczCsqlb99lCKtOYQAXGiVdX0Hk23V8bxD6IHZlTQpraU P4uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=IZz/mzlZmaDBwEJCzRgPF/j5pZtdk8Ffmpjf0TFnoZI=; b=Yo+89j8iJg4eezAXer2F9Vj0GSdmg0jDPCf34r3s1cJfDAAtoN8m54R0ZmNtYkh83M Q63BIS8tcACZ54Ini6Y+DMRRvbjuODkcq757mg9urleZ+hdwTtBsh/cXKESOkLcHNaBd QRmssdLjvpoi/LSeNNATPZKDgU0cGKpCmN3Vm9GXqchJJHqseE9KWmBpbNKBnEII7GIR Pa6WGkVH47rJ/TxgaoMeE6fimQEVHeN73Wcgqf1UvFu9rTatGoVXpcdrwcmJ9q2V3wMi vOuy2I0Buf0KNZw/vgsE9cbbmKdISfbDhEhf4Y+y91s9DO6H7uKe59bZGkCSL+88/YGW fQKA== X-Gm-Message-State: AGi0PuakokSKP1QIVaIijTLt0N8JTURWL0lJoeGSxNfzUu5y29cM568d nrEG390/MKbfeyWIRxK5U4Y6sn9R X-Google-Smtp-Source: APiQypIJ8exeHB8gr6UXt538ExCy+OIp/FBD1+Kuc7LNacSFsmnBDM8H23vI3EmMhvtr8uiBE+6j6Q== X-Received: by 2002:a62:8241:: with SMTP id w62mr7162319pfd.187.1589145329398; Sun, 10 May 2020 14:15:29 -0700 (PDT) Return-Path: Received: from [192.168.0.105] ([209.52.88.138]) by smtp.gmail.com with ESMTPSA id y21sm7198071pfm.219.2020.05.10.14.15.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 May 2020 14:15:28 -0700 (PDT) Subject: Re: [GNU Ports] _beginthread not declared To: GNU Ports for eCS Mailing List References: Message-ID: <68383c84-baff-4a37-75c5-ead75d021fc5@gmail.com> Date: Sun, 10 May 2020 14:15:31 -0700 User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 05/10/20 12:28 PM, Steven Levine wrote: > In , on 05/10/20 > at 06:19 PM, "Paul Smedley" said: > > Hi guys, > >>> Yet these turn into a fatal error if I declare __USE_EMX or such. >> I remember a similar problem years ago with one port (I forget which). >> I worked around it by adding the definition for _beginthread in the .c >> file that needed it. > I guessed a bit backwards and the macro priorities. For _beginthread to > be declared both __STRICT_ANSI__ and _POSIX_SOURCE must be undefined. > Best I can tell this logic is specific to our gcc/kLIBC ports. The use of > _WITH_UNDERSCORE and __USE_EMX also appear to be specific to our gcc/kLIBC > ports. __STRICT_ANSI__ is known to gcc and _POSIX_SOURCE is known to the > POSIX standard. _POSIX_SOURCE appears to be deprecated in favor of > _POSIX_C_SOURCE. > > One possible solution is to turn off the -ansi option which may allow > _beginthread to be defined without negative side effects. I thought of that, but I can't find them in the source excepting _POSIX_SOURCE which is in CMakeLists.txt in an EMSCRIPTEN block. Since emscription is a toolchain to build asm.js/WebAssembly, I doubt that it is getting defined. This is my first visit to a CMake build and I have no idea how to do simple things like make V=1 to get a more informative build and there seems to be one makefile which makes adding stuff like -E hard. I did follow Paul's suggestion and added the definition of _beginthread which fixed the issue. Now the build is dying at K:/work/aom/test/log2_test.cc:38:55: error: 'log2' was not declared in this scope; did you mean 'logl'? Where log2 is wrapped in a __USE_GNU block and defining that before including math.h didn't help, I guess I should do a make distclean. It's frustrating these defines guarding common functions and these are not the type of fixes to send upstream. Dave -- This email was Anti Virus checked by Astaro Security Gateway. http://www.sophos.com