Bug #8436

developer/gcc-49 installs incorrect os_defines.h

Added by Gary Mills over 1 year ago. Updated over 1 year ago.

Status:FeedbackStart date:2017-06-28
Priority:NormalDue date:
Assignee:OI Userland% Done:


Target version:-
Difficulty:Medium Tags:needs-triage


The developer/gcc-49 package installs an incorrect version of /usr/gcc/4.9/include/c++/4.9.4/i386-pc-solaris2.11/bits/os_defines.h . This file contains the following text:

/* Solaris 9 uses the non-standard CLOCK_HIGHRES instead.  */

This is incorrect for Solaris 11, for illumos, and for OI. The /usr/include/sys/time_impl.h file already contains the necessary definitions of these two symbols.

Fortunately, this incorrect information only affects c++ builds. This error results:

.../proto/root_i386/usr/include/sys/time_impl.h:124:0: error: "CLOCK_MONOTONIC" redefined [-Werror]
 #define CLOCK_MONOTONIC  4 /* high resolution monotonic clock */

I don't know if other gcc packages install this same incorrect file, but if so the erroneous definitions should be deleted from all of them.


#1 Updated by Gary Mills over 1 year ago

There is another copy of the same file at: i386-pc-solaris2.11/amd64/bits/os_defines.h . Both copies need the same change.

#2 Updated by Aurélien Larcher over 1 year ago

I guess it is up to you to check with illumos developers if it is reasonable then submit the changes.
At least I do not have time for that, sorry.

#3 Updated by Gary Mills over 1 year ago

I just checked a few other gcc packages for OI Hipster. The erroneous lines only appear in the os_defines.h file for gcc-4.9 . They don't appear for earlier or later gcc versions. (I checked 4.8 and 6.3). Is there some way we can tell people not to use gcc-4.9?

#4 Updated by Aurélien Larcher over 1 year ago

This is the default userland compiler.

Also available in: Atom