Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671608 - dev-lang/rust-1.30.1-r1: /usr/include/stdlib.h:133:35: error: missing binary operator before token "("
Summary: dev-lang/rust-1.30.1-r1: /usr/include/stdlib.h:133:35: error: missing binary ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-21 07:19 UTC by Sergey 'L29Ah' Alirzaev
Modified: 2020-06-13 01:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,705.30 KB, text/x-log)
2018-11-21 07:19 UTC, Sergey 'L29Ah' Alirzaev
Details
emerge --info (emerge.info,16.74 KB, text/plain)
2018-11-21 07:21 UTC, Sergey 'L29Ah' Alirzaev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 'L29Ah' Alirzaev 2018-11-21 07:19:39 UTC
Created attachment 555846 [details]
build log

/usr/include/stdlib.h:133:35: error: missing binary operator before token "("
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
                                   ^

gcc (Gentoo Hardened 8.2.0-r4 p1.5) 8.2.0
sys-libs/glibc-2.27-r6
Comment 1 Sergey 'L29Ah' Alirzaev 2018-11-21 07:21:09 UTC
Created attachment 555848 [details]
emerge --info
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-23 12:23:56 UTC
This seems to fail while building LLVM -- which makes it not very Rust-specific. Do you get similar problems when trying to build LLVM-7.x in this build environment?
Comment 3 Sergey 'L29Ah' Alirzaev 2018-11-23 12:25:08 UTC
Nah, sys-devel/llvm-7.0.0-r1 was built fine here.
Comment 4 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-23 12:28:37 UTC
In that case, try building Rust with system-llvm.
Comment 5 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-23 12:42:08 UTC
As for the root cause, I don't have a clue. The gcc version you have is the latest stable, so presumably it's quite common and other people have built Rust with it successfully. There might be something deviant about the hardened profile or something on your box to explain this, but I can't tell what that might be.

I also checked the code in /usr/include/stdlib.h:133, which looks exactly the same for me but doesn't cause trouble, so not sure what to make of this.
Comment 6 Sergey 'L29Ah' Alirzaev 2018-11-23 16:37:12 UTC
Looks worky, thanks.
Comment 7 Georgy Yakovlev archtester gentoo-dev 2020-03-05 09:34:17 UTC
this ebuild no longer in tree, closing.
please reopen if you can reproduce on current ebuilds.
Comment 8 Alexei Colin 2020-06-13 01:39:52 UTC
FWIW: I've got this error on a different unrelated ebuild inside Gentoo Prefix. The reason turned out to be a -I/usr/include on the compile line. The /usr/include is a path on the host, outside the prefix. So, the error happened as a result of mixing system headers from different libc(/gcc toolchain) versions: headers on the host with headers in the prefix. The fix was to patch the packages build system to get rid of all -I arguments that pointed outside the prefix (which shouldn't be there in the first place, since /usr/include is implied).