[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#914688: marked as done (g++: fails to understand BOOST_OS_LINUX on ppc64el?)



Your message dated Mon, 26 Nov 2018 14:10:17 +0100
with message-id <[🔎] 1e2aa3d0-11db-f217-f676-9574f7221ff2@debian.org>
and subject line Re: Bug#914688: Default defines discrepancy
has caused the Debian Bug report #914688,
regarding g++: fails to understand BOOST_OS_LINUX on ppc64el?
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
914688: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914688
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: gcc-8
Version: 8.2.0-10
Severity: serious
Affects: src:performous

Hello, after trying to debug why src:performous was FTBFS on ppc64el, I got this issue:

test example reproducing the issue:
cat test.c++ 
#include <boost/predef.h>
#include <stdio.h>

#if BOOST_OS_LINUX
#warning "OS LINUX DEFINED"
#endif

int main()
{
       	printf("%d\n", BOOST_OS_WINDOWS);
       	printf("%d\n", BOOST_OS_LINUX);
}


apt-get install libboost-dev

on an amd64 machine this happens:
$ g++ test.c++ 
test.c++:5:2: warning: #warning "OS LINUX DEFINED" [-Wcpp]
 #warning "OS LINUX DEFINED"
  ^~~~~~~

$ g++ test.c++  -std=c++14
test.c++:5:2: warning: #warning "OS LINUX DEFINED" [-Wcpp]
 #warning "OS LINUX DEFINED"
  ^~~~~~~

(everything is ok)

on a ppc64el machine this happens instead:
g++ test.c++ 
test.c++:5:2: warning: #warning "OS LINUX DEFINED" [-Wcpp]
 #warning "OS LINUX DEFINED"
  ^~~~~~~

g++ test.c++  -std=c++14
(NO WARNINGS HERE).

this is why the package FTBFS, because that macro is not defined when std is defined.

Any idea?
(this might be a boost issue, but I can't prove it!)


same happens with old g++-7, and with c++0x or c++11

G.

--- End Message ---
--- Begin Message ---
Control: tags -1 + wontfix

closing as won't fix, same as upstream did.  Just use the __linux__ macro.

On 26.11.18 13:52, Adrian Bunk wrote:
> Control: forwaded -1 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28314
> 
> On Mon, Nov 26, 2018 at 12:28:28PM +0000, Dimitri John Ledkov wrote:
>> xnox@diamond:~$ g++ -std=c++14 -dM -E -x c++ - < /dev/null | grep linux
>> #define __linux__ 1
>> #define __gnu_linux__ 1
>>
>> xnox@diamond:~$ g++ -std=gnu++14 -dM -E -x c++ - < /dev/null | grep linux
>> #define __linux 1
>> #define __linux__ 1
>> #define __gnu_linux__ 1
>> #define linux 1
>>
>> The same is not observed on other architectures. And for some reason,
>> boost cares about "linux" or "__linux", and is not sensitive to
>> "__linux__" nor "__gnu_linux__".
> 
> https://bugs.launchpad.net/ubuntu/+source/gcc-4.9/+bug/1349907/comments/1
> 
>> Regards,
>>
>> Dimitri.
> 
> cu
> Adrian
> 

--- End Message ---

Reply to: