Linda Bloomberg Academic Writing Resource

Source: https://study.sagepub.com/sites/default/files/linda_bloomberg_academic_writing_resource.pdf

Continuation Signals (a warning that there are more ideas to come)

  • A final reason
  • Again
  • Also
  • And
  • And finally
  • Another
  • Besides
  • Equally important
  • First of all
  • Further
  • Furthermore
  • In addition
  • Last of all
  • Likewise
  • More
  • Moreover
  • Next
  • Of equal importance
  • One reason
  • Other
  • Secondly
  • Similarly
  • Then
  • Too
  • With

Change-of-Direction Signals (watch out, we’re doubling back)

  • Admittedly
  •  Although
     But
     Conversely
     Despite
     Different from
     doubtless
     Even though
     Granted
     However
     In contrast
     In spite of
     Instead of
     It is true
     Nevertheless
     On the contrary
     On the other hand
     Otherwise
     Rather
     Regardless
     Still
     The opposite
     Though
     To be sure
     True
     While
     Yet
    Sequence Signals (there is an
    order to these ideas)
     A, B, C
     After
     Always
     As soon as
     Before
     During
     Earlier
     Finally
     First, second, third
     For one thing
     From here on
     Gradually
     Hence
     In the end
     In the first place
     Into (far into the night)
     Last
     Last of all
     Later
     Next
     Now
     On time
     Since
     Then
     To begin with
     Until
     While
    Time Signals (when is it
    happening?)
     After a short time
     After awhile
     Afterward
     Already
     At last
     At length
     At the same time
     During
     Final
     Finally
     Immediately
     In the meantime
     Last
     Lastly
     Lately
     Later
     Little by little
     Next
     Now
     Once
     Presently
     Soon
     Subsequently
     The next week (month,
    day, year)
     Then
     Thereafter
     Ultimately
     When
     When
    Illustration Signals (here’s what
    that principle means in reality)
     Another
     For example
     For instance
     For this purpose
     For this reason
     For these reasons
     Furthermore
     In addition
     In the same way as
     Just as important
     Moreover
     Most important
     Much like
     Similar to
     Similarly
     Specifically
     Such as
     To be specific
     To begin with
     To illustrate
     To this end
     With this in mind
    Emphasis Signals (This is
    important)
     Aboveall
     A central issue
     A distinctive quality
     A key feature
     A major development
     A major event
     A primary concern
     A significant factor
     A vital force
     Above all
     Again
     As a matter of fact
     As has been noted
     As I have said
     By the way
     Especially important
     Especially relevant
     Especially valuable
     First and foremost
     Important to note
     Importantly
     In fact
     Indeed
     It all boils down to
     More than anything else
     Most noteworthy
     Most of all
     Of course
     Pay particular attention
    to
     Remember that
     Should be noted
     The basic concept
     The chief outcome
     The crux of the matter
     The main value
     The most substantial
    issue
     The principle item
     To be sure
    Cause, Condition, or Result
    Signals (condition or
    modification is coming up)
     Accordingly
     Also
     As a consequence
     As a result
     Because of
     But
     Consequently
     Due to
     For this reason
     From
     Hence
     If…then
     In order that/to
     May be due to
     Nevertheless
     Not only…but
     Of
     Resulting from
     Since
     So
     So that
     That
     Then…if
     Therefore
     Thus
     Unless
     Until
     Whether
     While
     Without
     Yet
    Spatial Signals (this answers
    the “where” question)
     About
     Above
     Across
     Adjacent
     Alongside
     Around
     Away
     Behind
     Below
     Beside
     Between
     Beyond
     By
     Close to
     East
     Far
     Here
     In
     In front of
     Inside
     Into
     Left
     Middle
     Near
     Next to
     North
     On
     Opposite
     Out
     Outside
     Over
     Over
     Right
     Side
     South
     There
     These
     This
     Toward
     Under
     upon
     West
    Comparison-Contrast Signals
    (we will now compare idea A
    with idea B)
     Actually
     Also
     Although
     Analogous to
     And
     And yet
     As opposed to
     As well as
     Best
     Better
     But
     Compared with
     Conversely
     Different from
     Either…or
     Even
     For all that
     Half
     However
     In contrast
     In spite
     Instead of
     In the same (like) manner
    or way
     Ironically
     Less
     Less than
     Like
     More than
     Most
     Much as
     Nevertheless
     Nonetheless
     Now
     Of course
     Of this
     On the contrary
     On the other hand
     Opposite
     Or
     Rather
     Same as
     Similar to
     Similarly
     Still
     Strangely enough
     Then
     Thought
     Too
     Unless
     While
     Yet
    Conclusion Signals (this ends
    the discussion and may have
    special importance)
     As a result
     As I have stated
     As you can see
     Briefly
     Consequently
     Finally
     From this we see
     Hence
     In conclusion
     In fact
     In short
     In summary
     In the end
     Last of all
     On the whole
     Therefore
     To repeat
     To sum up
     Ultimately
    Fuzz Signals (idea is not exact,
    or author is not positive and
    wishes to qualify a statement)
     Alleged
     Almost
     Could
     Except
     If
     Looks like
     Maybe
     Might
     Nearly
     Probably
     Purported
     Reputed
     Seems like
     Should
     Some
     Sort of
     Was reported
    Dispute Signals
     It isn’t true that
     People are wrong who
    say that
     Deny that
     Be that as it may
     By the same token
     No doubt
     We often hear it said
     Many people claim
     Many people suppose
     It used to be thought
     In any case
    Non-word Emphasis Signals
     Exclamation point (!)
     Underline
     Italics
     Bold type
     Subheads, like The
    Conclusion
    indentation of
    paragraph
     Graphic illustrations
     Numbered points (1, 2,
    3)
     Very short sentence.
    Stop War.
     “quotation marks”
    Signal Phrases for Summarizing, Paraphrasing, & Quotations
    Based on templates: They Say, I Say: The Moves that Matter in Academic Writing by Gerald Graff, Cathy
    Birkenstein
    1. Capturing Authorial Action/ For Summaries or Paraphrasing:
    These target phrases alert the reader that the author is about to summarize or paraphrase another idea
    established by an authority on a chosen topic.
     X acknowledges that _____________
     X agrees that _____________.
     X argues that ___________.
     X believes that ____________.
     X denies/ does not deny that _____________.
     X claims that ____________.
     X complains that ____________.
     X concedes that ____________.
     X demonstrates that _____________.
     X celebrates the fact that _____________.
     X emphasizes that __________.
     X insists that ___________.
     X observes that __________.
     X questions whether ______________.
     X refuses to claim that ______________.
     X reminds us that ______________.
     X reports that _____________.
     X suggests that _____________.
     X urges u
    2. Introducing Quotations:
    These target phrases alert the reader that the author is about to quote directly from another source. The writer is
    preparing the reader for the proper parenthetical citation.
     X states, “_____________.”
     In her book, __________, X maintains that “_____________.”
     Writing in the journal XxYyZz, X complains that “_____________.”
     As the prominent philosopher, X puts it, “________________.”
     According to X, “_________________.”
     X himself writes, “__________________.”
     In X’s view, “________________.”
     X agrees when she writes, “_____________.”
     X disagrees when he writes, “______________.”
     X complicates matters further when he writes, “______________.”
    3. Explaining Quotations: Every paragraph must show clarification, interpretation, or necessary analysis of
    a supplied quotation or paraphrase. This offers the research author to have the final word in a paragraph.
     Basically, X is saying ______________.
     In other words, X believes ______________.
     In making this comment, X argues that ______________.
     X’s view confirms/reaffirms/clarifies the view that ______________.
     X is insisting that ______________.
     X’s point is that _______________.
     The essence of X’s argument is that.
    4. Introducing Statistics or “Standard Views”:
    The following target phrases alert the reader that the research writer is about to use numerical data or popular
    opinions. (Remember, numerical data is cited, conventional ideas are not.)
     Americans today tend to believe that ________________.
     Conventional wisdom has it that _______________.
     Common sense seems to dictate that ______________.
     The standard way of thinking about topic X has it that _______________.
     It is often said that _____________.
     Many people assumed that ______________.
     A recent study shows ______________.
     Scientists recently noted that ______________.
     Doctors at the XxYyZz Institute claim that ______________.
     In the 2010 Census, it was shown that ______________.
    5. Introducing Contrasting Arguments: Frequently research writers find conflicting reports. Inclusion of
    these debates can add strength to their own works. Analysis of other opinions likewise needs target phrases.
    When using multiple viewpoints, it is crucial that the reader understands the different opinions.
    A number of sociologists have recently suggested that X’s work has several fundamental problems.
    It has become common today to dismiss X’s contribution to the field of sociology.
     In their recent work, Y and Z have offered harsh critiques of Dr. X for __________.
     X argues ______________.
     According to both X and Y, ________________.
     Politicians _____________, X argues, should ___________________.
    6. Expressing Authorial Opinions:
    The individual research writer may have opinions regarding the collected information shown in the report. Since
    personal voice is not allowed, the following target phrases tell the reader the commentary expressed is the
    research author and not a secondary source. Likewise, these statements help conclude the paragraph and allow
    the research writer to have the last word on the topic.
     But ___________ are real and, arguable, the most significant factor in _________.
     But X is wrong that ______________.
     However, it is simply not true that ______________.
     Indeed, it is highly likely that ____________.
     But the view that ____________ does not fit all the facts.
     X is right that ___________.
     X is wrong that __________.
     X is both right and wrong that ____________.
     Yet a sober analysis of the matter reveals _________________.
     Nevertheless, new research shows ____________.
     Anyone familiar with ___________ should see that ___________.
     Proponents of X are right to argue that ___________. But they exaggerate when they claim that
    ___________.
     While it is true that ____________, it does not necessarily follow that _________.

 

Application Control

Introduction:

Application control is a highly effective mitigation strategy for ensuring the security of systems, forming an integral part of the Essential Eight from the Strategies to Mitigate Cyber Security Incidents. This publication offers guidance on the concept of application control, what it encompasses, what it doesn’t, and how to implement it.

What Application Control Is:

Application control, as a security approach, aims to safeguard systems against the execution of malicious code or malware. A robust implementation ensures that only approved applications, such as executables, software libraries, scripts, installers, compiled HTML, HTML applications, control panel applets, and drivers, can be executed. While its primary purpose is to prevent the spread of malicious code, it also hinders the installation or use of unauthorized applications.

What Application Control Is Not:

Certain approaches are not considered application control, such as providing a portal for approved applications, using web or email content filtering, checking application reputation through cloud-based services, or relying on next-generation firewalls to identify approved network traffic.

How to Implement Application Control:

The implementation involves steps like identifying approved applications, developing control rules, maintaining these rules through a change management program, and regularly validating and updating them. Methods like cryptographic hash rules, publisher certificate rules, and path rules are suitable for enforcement, while file names or easily changed attributes are not recommended.

Application Control within Microsoft Windows Environments:

For Windows environments, the use of Windows Defender Application Control (WDAC) is suggested. Group Policy settings can be applied to enhance security, and additional hardware requirements may be necessary for virtualization-based security.

Why is Application Control Important?

Understanding the perspectives of various users, including business users, IT users, risk managers, and threat actors, emphasizes the need for application control to balance the benefits of application usage with the potential risks.

Maturity Levels of Application Control:

The document outlines three maturity levels for application control:

  1. Maturity Level 1: Application control on workstations to prevent the execution of potentially malicious code, primarily using whitelisting.
  2. Maturity Level 2: Extending application control to internet-facing servers, with a focus on logging allowed and blocked execution events.
  3. Maturity Level 3: Expanding application control to all servers, including additional measures like blocking malicious drivers and regular validation of application control rulesets.

Conclusion:

Application control is a critical aspect of cybersecurity, limiting the execution of applications to protect users and organizations from potential threats. Advanced maturity in application control involves well-defined processes, regular updates to rulesets, and proactive monitoring for signs of compromise. Implementing application control requires a strategic and cautious approach to avoid disruptions while ensuring enhanced security.

References

Writing a scientific article: A step-by-step guide for beginners

Writing a scientific article: A step-by-step guide for beginners

We describe here the basic steps to follow in writing a scientific article. We outline the main sections that an average article should contain; the elements that should appear in these sections, and some pointers for making the overall result attractive and acceptable for publication.

The vast majority of scientific journals follow the so-called ‘‘IMRAD’’ format, i.e. introduction, methods, results and discussion.

The introduction is of prime importance in grabbing the reader’s attention

The objective of the methods section is to describe exactly what you did, and how, in sufficient detail such that any average reader with the same resources at their disposal would be able to reproduce your study.

The aim of the results section is to describe what you observed, without commentary or discussion.

The discussion is where you interpret and explain the significance of your results, and how they fit into the wider picture of what has already been observed and reported on the same topic.

The reference section lists all the sources you have used as a basis to prepare your hypothesis, and build your research.

Source:

Link:

Languages and Compilers

 

Language Compiler / Interpreter Latest Versions Versions Releases  
Ada gcc 13.1 ok    
C gcc 13.1 ok    
  Intel Compiler Classic (icc) 2021.9.0 ok    
  Intel oneAPI DPC++ Compiler (icx) 2023.1.0 ok    
  Clang 16.0.6 ok    
C++ gcc 12.3 ok    
  Intel C++ Compiler Classic (icpc) 2021.9.0 ok    
  Intel oneAPI DPC++/C++ Compiler (icpx)  2023.1.0 ok    
  Clang++ 16.0.6 ok    
Chapel Chapel 1.31.0 ok    
CSharp (C#) Microsoft .NET

SDK 7.0.306
Runtime 7.0.9

ok    
Dart Dart 3.0.6 ok running  
Erlang Erlang OTP 26.0 ok    
Fortran gcc 13.1 ok    
  Intel Fortran Compiler Classic (ifort) 2021.9.0 ok    
  Intel Fortran Compiler (ifx) 2023.1.0 ok    
FSharp Microsoft .NET SDK 7.0.306
Runtime 7.0.9
ok    
Go go 1.20.6 ok    
  GCC (gccgo) 13.1 ok    
Haskell Haskell 9.6.2 ok    
Java Java 20.0.1 ok    
JavaScript node.js 20.4.0 ok    
JRuby JRuby 9.4.3.0 ok    
Julia Julia 1.9.2 ok    
Lisp Steel Bank Common Lisp 2.3.6 ok    
Lua Lua 5.4.6 5.3.6    
OCaml OCaml 5.0.0 ok    
Pascal Free Pascal 3.2.2 ok    
Perl Perl 5.38.0 5ok    
PHP PHP 8.2.8 ok    
Python Python 3.11.4 ok    
Racket Racket 8.9 ok    
Ruby Ruby 3.2.2 ok    
Rust Rust 1.71.0 ok    
Swift Swift 5.8.1 ok    
TypeScript TypeScript 5.1.6 ok https://github.com/Microsoft/TypeScript/releases  
  Deno 1.35.1 ok https://github.com/denoland/deno/releases  
           

Ten simple rules for structuring papers

The paper introduced 10 simple rules for structuring a scientific paper.

  1. Focus on one big idea
  2. write for naive humans
  3. use context, content conclusion structure
  4. optimize logical flow
  5. abstract: compact summary of paper
  6. introduction: why paper matter
  7. result: why the conclusion is justified
  8. discussion: preempt criticism, give future impact
  9. allocate time wisely
  10. iterate the story

Source: https://journals.plos.org/ploscompbiol/article?id=10.1371%252Fjournal.pcbi.1005619

Build/Install GCC Compiler for C, C++, Fortran, Go, Ada in Ubuntu Operating System

I need to compare performance of various C,C++, Fortran,Go and ADA compiler. So I need to install or build various version of GCC compilers. Installing from apt is easier but not all versions are available from apt.

First step is to install all prerequisites

apt install -y build-essential linux-tools-common libapr1-dev
apt install libgmp3-dev apache2-dev libapr1-dev libaprutil1-dev apache2-dev libapr1-dev libaprutil1-dev 
apt install -y gcc make libhts-dev libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 libpcre3-dev flex gnat

Most gcc is in C/C++, so we need to install any gcc compiler

To build Ada compiler (gnat), we need other Ada compiler. Hence we install any gnat version.

Clone gcc github repository. Only need to do once. When building each gcc version, we need only to clone from this local repository.

git clone https://github.com/gcc-mirror/gcc

Some gcc versions can only be built on a specific Ubuntu version. Here is the summary result of compiling gcc in various Ubuntu versions. Old versions can only be built on Ubuntu 16.04. Modern versions can be built/compiled on Ubuntu 20.04

Summary

GCC VersionUbuntu 16.04Ubuntu 18.04Ubuntu 20.04
GCC 4.9.3 (gnat)install from apt
GCC 5.1.0build okbuild failbuild fail
GCC 5.2.0build failbuild fail
GCC 5.3.0build failbuild fail
GCC 5.4.0install from aptbuild failbuild fail
GCC 5.5.0install from aptbuild fail
GCC 6.1.0build failbuild fail
GCC 6.2.0(building)build failbuild fail
GCC 6.3.0build failbuild fail
GCC 6.4.0build failbuild fail
GCC 6.5.0apt not availableinstall from aptbuild fail
GCC 7.1.0build okbuild failbuild fail
GCC 7.2.0build okbuild fail
GCC 7.3.0build okbuild fail
GCC 7.4.0build okbuild fail
GCC 7.5.0install from aptinstall from apt
GCC 8.1.0build okbuild fail
GCC 8.2.0build okbuild fail
GCC 8.3.0build okbuild fail
GCC 8.4.0install from aptinstall from apt
GCC 8.5.0build okbuild ok
GCC 9.1.0build okbuild fail
GCC 9.2.0build okbuild fail
GCC 9.3.0(building)???
GCC 9.4.0apt not availableinstall from apt
GCC 9.5.0build ok
GCC 10.1.0build ok
GCC 10.2.0build ok
GCC 10.3.0build ok
GCC 10.4.0apt not availablebuild ok
GCC 11.1.0build ok
GCC 11.2.0build ok
GCC 11.3.0apt not availableapt
GCC 12.1.0build ok
GCC 12.2.0apt not availablebuild ok

cd ~
git clone https://github.com/gcc-mirror/gcc

GCC 5.1.0

Install gcc 5.1.0 in Ubuntu 18.04

gnatgcc version 6.5.0

gcc version 6.5.0

cd ~
mkdir gcc-5.1
cd    gcc-5.1
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-5.1.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-5.1 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-5.1 CC=gnatgcc
make
make install

Build failed with the following message:

In file included from ../../gcc/gcc/cp/except.c:1023:0:
cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’:
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here
cfns.gperf: At global scope:
cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int)’ used but never defined

Discussion of the problem: https://stackoverflow.com/questions/41204632/unable-to-build-gcc-due-to-c11-errors

GCC 5.2.0

cd ~
mkdir gcc-5.2
cd    gcc-5.2
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-5.2.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-5.2 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-5.2 CC=gnatgcc
make -j 8
make install

Error

x86_64-linux-gnu-g++ -c  -DIN_GCC_FRONTEND -g -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp -I../../gcc/gcc -I../../gcc/gcc/cp -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I/root/gcc-5.2/build/./gmp -I/root/gcc-5.2/gcc/gmp -I/root/gcc-5.2/build/./mpfr -I/root/gcc-5.2/gcc/mpfr -I/root/gcc-5.2/gcc/mpc/src  -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/gcc/../libbacktrace -I/root/gcc-5.2/build/./isl/include -I/root/gcc-5.2/gcc/isl/include  -o cp/except.o -MT cp/except.o -MMD -MP -MF cp/.deps/except.TPo ../../gcc/gcc/cp/except.c
In file included from ./tm.h:27:0,
                 from ../../gcc/gcc/cp/except.c:27:
../../gcc/gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
    fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
                     ^
../../gcc/gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
       fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",  \
                        ^
In file included from ./tm.h:48:0,
                 from ../../gcc/gcc/cp/except.c:27:
../../gcc/gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
       fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",  \
                        ^
In file included from ../../gcc/gcc/cp/except.c:1023:0:
cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’:
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here
cfns.gperf: At global scope:
cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int)’ used but never defined
Makefile:1065: recipe for target 'cp/except.o' failed
make[3]: *** [cp/except.o] Error 1

GCC 5.3.0

cd ~
mkdir gcc-5.3
cd    gcc-5.3
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-5.3.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-5.3 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-5.3 CC=gnatgcc
make -j 8
make install

Result: compile fail on Ubuntu 18.04

x86_64-linux-gnu-g++ -c  -DIN_GCC_FRONTEND -g -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp -I../../gcc/gcc -I../../gcc/gcc/cp -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I/root/gcc-5.3/build/./gmp -I/root/gcc-5.3/gcc/gmp -I/root/gcc-5.3/build/./mpfr -I/root/gcc-5.3/gcc/mpfr -I/root/gcc-5.3/gcc/mpc/src  -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/gcc/../libbacktrace -I/root/gcc-5.3/build/./isl/include -I/root/gcc-5.3/gcc/isl/include  -o cp/except.o -MT cp/except.o -MMD -MP -MF cp/.deps/except.TPo ../../gcc/gcc/cp/except.c
In file included from ./tm.h:27:0,
                 from ../../gcc/gcc/cp/except.c:27:
../../gcc/gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
    fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
                     ^
../../gcc/gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
       fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",  \
                        ^
In file included from ./tm.h:48:0,
                 from ../../gcc/gcc/cp/except.c:27:
../../gcc/gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
       fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",  \
                        ^
In file included from ../../gcc/gcc/cp/except.c:1023:0:
cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’:
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here
cfns.gperf: At global scope:
cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int)’ used but never defined
Makefile:1065: recipe for target 'cp/except.o' failed

GCC 5.4.0

cd ~
mkdir gcc-5.4
cd    gcc-5.4
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-5.4.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-5.4 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-5.4 CC=gnatgcc
make -j 8
make install

build fail

/root/gcc-5.4/build/./gcc/xgcc -B/root/gcc-5.4/build/./gcc/ -B/usr/local/gcc-5.4/x86_64-linux-gnu/bin/ -B/usr/local/gcc-5.4/x86_64-linux-gnu/lib/ -isystem /usr/local/gcc-5.4/x86_64-linux-gnu/include -isystem /usr/local/gcc-5.4/x86_64-linux-gnu/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/. -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include -I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c ../../../gcc/libgcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from ../../../gcc/libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function ‘x86_64_fallback_frame_state’:
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type ‘struct ucontext’
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^
../../../gcc/libgcc/shared-object.mk:14: recipe for target 'unwind-dw2.o' failed
make[3]: *** [unwind-dw2.o] Error 1

GCC 5.5.0

available on apt, no need to compile

apt install gcc-5
apt install g++-5
apt install gfortran-5
apt install gnat-5
apt install gccgo-5

GCC 6.1.0

cd
mkdir gcc-6.1
cd    gcc-6.1
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-6.1.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-6.1 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-6.1 CC=gnatgcc
make -j 8
make install

build fail

/root/gcc-6.1/build/./gcc/xgcc -B/root/gcc-6.1/build/./gcc/ -B/usr/local/gcc-6.1/x86_64-linux-gnu/bin/ -B/usr/local/gcc-6.1/x86_64-linux-gnu/lib/ -isystem /usr/local/gcc-6.1/x86_64-linux-gnu/include -isystem /usr/local/gcc-6.1/x86_64-linux-gnu/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/. -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include -I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c ../../../gcc/libgcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from ../../../gcc/libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function ‘x86_64_fallback_frame_state’:
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type ‘struct ucontext’
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^~
../../../gcc/libgcc/shared-object.mk:14: recipe for target 'unwind-dw2.o' failed
make[3]: *** [unwind-dw2.o] Error 1

GCC 6.2.0

cd
mkdir gcc-6.2
cd    gcc-6.2
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-6.2.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-6.2 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-6.2 CC=gnatgcc
make -j 8
make install

build failed on Ubuntu 18.04

/root/gcc-6.2/build/./gcc/xgcc -B/root/gcc-6.2/build/./gcc/ -B/usr/local/gcc-6.2/x86_64-linux-gnu/bin/ -B/usr/local/gcc-6.2/x86_64-linux-gnu/lib/ -isystem /usr/local/gcc-6.2/x86_64-linux-gnu/include -isystem /usr/local/gcc-6.2/x86_64-linux-gnu/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/. -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include -I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c ../../../gcc/libgcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from ../../../gcc/libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function ‘x86_64_fallback_frame_state’:
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type ‘struct ucontext’
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^~
../../../gcc/libgcc/shared-object.mk:14: recipe for target 'unwind-dw2.o' failed

GCC 6.3.0

cd
mkdir gcc-6.3
cd    gcc-6.3
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-6.3.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-6.3 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-6.3 CC=gnatgcc
make -j 8
make install

build fail on Ubuntu 18.04


/root/gcc-6.3/build/./gcc/xgcc -B/root/gcc-6.3/build/./gcc/ -B/usr/local/gcc-6.3/x86_64-linux-gnu/bin/ -B/usr/local/gcc-6.3/x86_64-linux-gnu/lib/ -isystem /usr/local/gcc-6.3/x86_64-linux-gnu/include -isystem /usr/local/gcc-6.3/x86_64-linux-gnu/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/. -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include -I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c ../../../gcc/libgcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from ../../../gcc/libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function ‘x86_64_fallback_frame_state’:
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type ‘struct ucontext’
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^~
../../../gcc/libgcc/shared-object.mk:14: recipe for target 'unwind-dw2.o' failed
make[3]: *** [unwind-dw2.o] Error 1

GCC 6.4.0

cd
mkdir gcc-6.4
cd    gcc-6.4
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-6.4.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-6.4 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-6.4 CC=gnatgcc
make -j 8
make install

Build fail in Ubuntu 18.04

/root/gcc-6.4/build/./gcc/xgcc -B/root/gcc-6.4/build/./gcc/ -B/usr/local/gcc-6.4/x86_64-linux-gnu/bin/ -B/usr/local/gcc-6.4/x86_64-linux-gnu/lib/ -isystem /usr/local/gcc-6.4/x86_64-linux-gnu/include -isystem /usr/local/gcc-6.4/x86_64-linux-gnu/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/. -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include -I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c ../../../gcc/libgcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from ../../../gcc/libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function ‘x86_64_fallback_frame_state’:
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type ‘struct ucontext’
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^~
../../../gcc/libgcc/shared-object.mk:14: recipe for target 'unwind-dw2.o' failed
make[3]: *** [unwind-dw2.o] Error 1

GCC 6.5.0

available on apt

apt install gcc-6
apt install g++-6
apt install gfortran-6
apt install gnat-6
apt install gccgo-6

GCC 7.1.0

cd
mkdir gcc-7.1
cd    gcc-7.1
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-7.1.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-7.1 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-7.1 CC=gnatgcc
make -j 8
make install

build fail


/root/gcc-7.1/build/./gcc/xgcc -B/root/gcc-7.1/build/./gcc/ -B/usr/local/gcc-7.1/x86_64-linux-gnu/bin/ -B/usr/local/gcc-7.1/x86_64-linux-gnu/lib/ -isystem /usr/local/gcc-7.1/x86_64-linux-gnu/include -isystem /usr/local/gcc-7.1/x86_64-linux-gnu/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/. -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include -I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c ../../../gcc/libgcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from ../../../gcc/libgcc/unwind-dw2.c:403:0:
./md-unwind-support.h: In function ‘x86_64_fallback_frame_state’:
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type ‘struct ucontext’
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^~
../../../gcc/libgcc/shared-object.mk:14: recipe for target 'unwind-dw2.o' failed
make[3]: *** [unwind-dw2.o] Error 1

mentioned in “gcc does not compile when using glib 2.2.6 (everything works fine with 2.25)

GCC 7.2.0

cd /root
mkdir build-7.2
cd    build-7.2
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-7.2.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-7.2 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-7.2 CC=gnatgcc
make
make install

build ok on Ubuntu 18.04

GCC 7.3.0

cd /root
mkdir gcc-7.3
cd    gcc-7.3
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-7.3.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-7.3 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-7.3 CC=gnatgcc
make -j 8
make install

GCC 7.4.0

GCC 7.5.0

GCC 7.5.0 is available in Ubuntu 18.04 and Ubuntu 20.04. Easier to install with apt rather than compiling itself.

apt install gcc-7
apt install g++-7
apt install gfortran-7
apt install gnat-7
apt install gccgo-7

GCC 8.1.0

cd /root
mkdir build-8.1
cd    build-8.1
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-8.1.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-8.1 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-8.1 CC=gnatgcc
make -j 8
make install

It works in Ubuntu 18.04

Fails in Ubuntu 20.04

GCC 8.2.0

#instalasi gcc 8.2
cd /root
mkdir build-8.2
cd    build-8.2
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-8.2.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-8.2 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-8.2 CC=gnatgcc
make -j 8
make install

It works in Ubuntu 18.04

Fails in Ubuntu 20.04

GCC 8.3.0

cd /root
mkdir build-8.3
cd    build-8.3
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-8.3.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-8.3 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-8.3 CC=gnatgcc
make -j 8
make install

It works in Ubuntu 18.04

Fails in Ubuntu 20.04

GCC 8.4.0

available on apt

cd /root
mkdir build-8.4
cd    build-8.4
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-8.4.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-8.4 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-8.4 CC=gnatgcc
make
make install

GCC-8.5.0

cd /root
mkdir gcc-8.5
cd    gcc-8.5
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-8.5.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-8.5 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-8.5 CC=gnatgcc
make
make install

GCC 9.1.0

Ubuntu 20.04: error

glibc make[4]: *** No rule to make target '../libbacktrace/libbacktrace.la', needed by                                            

GCC 9.2.0

cd ~
mkdir gcc-9.2
cd    gcc-9.2
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-9.2.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-9.2 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-9.2 CC=gnatgcc
make -j 8
make install

GCC 9.3.0

Successfull build in Ubuntu 20.04

Procedure:

cd
mkdir gcc-9.3
cd gcc-9.3
git clone ../gcc
cd gcc
git checkout releases/gcc-9.3.0
contrib/download_prerequisites
cd ..
mkdir build
cd build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-9.3 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-9.3 CC=gnatgcc
make
make install

GCC 9.4.0

GCC 9.5.0

GCC 10.1.0

GCC 10.2.0

GCC 10.3.0

GCC 10.4.0

GCC 11.1.0

GCC 11.2.0

GCC 11.3.0

GCC 12.1.0

cd
mkdir gcc-12.1
cd    gcc-12.1
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-12.1.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-12.1 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-12.1 CC=gnatgcc
make -j 8
make install

GCC 12.2.0

cd
mkdir build-12.2
cd    build-12.2
mkdir build
git clone ../gcc
cd gcc
git checkout releases/gcc-12.2.0
contrib/download_prerequisites
cd ../build
../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-12.2 --enable-checking=release --enable-languages=c,c++,fortran,go,ada --disable-multilib --program-suffix=-12.2 CC=gnatgcc
make -j 8
make install

Installing Update Alternatives

Update Alternatives for GCC

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 55
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 65
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 75
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 84
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 94
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 103
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 111
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-8.5/bin/gcc-8.5 85
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-9.4/bin/gcc-9.4 94 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-9.5/bin/gcc-9.5 95 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-10.1/bin/gcc-10.1  101 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-10.2/bin/gcc-10.2  102 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-10.3/bin/gcc-10.3  103 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-10.4/bin/gcc-10.4  104 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-11.1/bin/gcc-11.1  111 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-11.2/bin/gcc-11.2  112 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-11.3/bin/gcc-11.3  113 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-12.1/bin/gcc-12.1  121 
update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-12.2/bin/gcc-12.2  122 

Updater alternatives for g++

update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 55
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 65
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 75
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 84
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 94
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 103
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 111
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-8.5/bin/g++-8.5 85
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-9.4/bin/g++-9.4 94 
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-9.5/bin/g++-9.5 95 
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-10.1/bin/g++-10.1  101 
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-10.2/bin/g++-10.2  102 
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-10.3/bin/g++-10.3  103
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-10.4/bin/g++-10.4  104 
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-11.1/bin/g++-11.1  111 
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-11.2/bin/g++-11.2  112 
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-11.3/bin/g++-11.3  113 
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-12.1/bin/g++-12.1  121 
update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-12.2/bin/g++-12.2  122 

Update Alternatives for gfortran

Update alternatives for gccgo

Update alternatives for gnat (Ada compiler)

update-alternatives --install /usr/bin/gnat gnat /usr/bin/gnat-7                     75 --slave /usr/bin/gnatchop gnatchop /usr/bin/gnatchop-7 --slave /usr/bin/gnatmake gnatmake /usr/bin/gnatmake-7 --slave /usr/bin/gnatbind gnatbind /usr/bin/gnatbind-7  --slave /usr/bin/gnatlink gnatlink /usr/bin/gnatlink-7
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-8.5/bin/gnat-8.5     85 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-8.5/bin/gnatchop-8.5 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-8.5/bin/gnatmake-8.5 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-8.5/bin/gnatbind-8.5 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-8.5/bin/gnatlink-8.5
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-9.4/bin/gnat-9.4     94 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-9.4/bin/gnatchop-9.4 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-9.4/bin/gnatmake-9.4 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-9.4/bin/gnatbind-9.4 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-9.4/bin/gnatlink-9.4
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-9.5/bin/gnat-9.5     95 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-9.5/bin/gnatchop-9.5 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-9.5/bin/gnatmake-9.5 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-9.5/bin/gnatbind-9.5 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-9.5/bin/gnatlink-9.5
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-10.1/bin/gnat-10.1  101 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-10.1/bin/gnatchop-10.1 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-10.1/bin/gnatmake-10.1 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-10.1/bin/gnatbind-10.1 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-10.1/bin/gnatlink-10.1
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-10.2/bin/gnat-10.2  102 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-10.2/bin/gnatchop-10.2 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-10.2/bin/gnatmake-10.2 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-10.2/bin/gnatbind-10.2 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-10.2/bin/gnatlink-10.2 
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-10.3/bin/gnat-10.3  103 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-10.3/bin/gnatchop-10.3 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-10.3/bin/gnatmake-10.3 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-10.3/bin/gnatbind-10.3 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-10.3/bin/gnatlink-10.3 
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-10.4/bin/gnat-10.4  104 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-10.4/bin/gnatchop-10.4 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-10.4/bin/gnatmake-10.4 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-10.4/bin/gnatbind-10.4 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-10.4/bin/gnatlink-10.4 
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-11.1/bin/gnat-11.1  111 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-11.1/bin/gnatchop-11.1 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-11.1/bin/gnatmake-11.1 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-11.1/bin/gnatbind-11.1 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-11.1/bin/gnatlink-11.1 
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-11.2/bin/gnat-11.2  112 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-11.2/bin/gnatchop-11.2 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-11.2/bin/gnatmake-11.2 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-11.2/bin/gnatbind-11.2 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-11.2/bin/gnatlink-11.2 
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-11.3/bin/gnat-11.3  113 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-11.3/bin/gnatchop-11.3 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-11.3/bin/gnatmake-11.3 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-11.3/bin/gnatbind-11.3 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-11.3/bin/gnatlink-11.3 
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-12.1/bin/gnat-12.1  121 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-12.1/bin/gnatchop-12.1 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-12.1/bin/gnatmake-12.1 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-12.1/bin/gnatbind-12.1 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-12.1/bin/gnatlink-12.1 
update-alternatives --install /usr/bin/gnat gnat /usr/local/gcc-12.2/bin/gnat-12.2  122 --slave /usr/bin/gnatchop gnatchop /usr/local/gcc-12.2/bin/gnatchop-12.2 --slave /usr/bin/gnatmake gnatmake /usr/local/gcc-12.2/bin/gnatmake-12.2 --slave /usr/bin/gnatbind gnatbind /usr/local/gcc-12.2/bin/gnatbind-12.2 --slave /usr/bin/gnatlink gnatlink /usr/local/gcc-12.2/bin/gnatlink-12.2 

References

  • https://linuxize.com/post/how-to-install-gcc-on-ubuntu-20-04/
  • https://iamsorush.com/posts/build-gcc11/
  • https://github.com/gcc-mirror/gcc
  • https://commons.wikimedia.org/wiki/File:GNU_Compiler_Collection_logo.svg

Problem Compiling with Clang 16.0.0 in Ubuntu 20.04

I encountered a problem when compiling a C program with Clang compiler version 16.0.0 , in Ubuntu 20.04

Here is the error message:


clang -pipe -Wall -O3 -fomit-frame-pointer -march=native -fopenmp=libiomp5 -D_FILE_OFFSET_BITS=64 -I/usr/include/apr-1.0 binarytrees.gcc-3.c -lapr-1 -lm -o binarytrees
clang: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by clang)
make[1]: *** [Makefile:7: binarytrees] Error 1
make[1]: Leaving directory '/home/waskita/energy-languages-internal/bench-clbg/Cclang/binarytrees'
make: *** [Makefile:2: compile] Error 2

Most likely reason: clang version 16.0.0 need GLIBCXX_3.4.30 , which is not available in Ubuntu 20.04

Solution: find newer libstdc++.so.6. In my case, I obtained it from gcc 12.1.0 in other directory.

Command to change:

cd /usr/lib/x86_64-linux-gnu
rm libstdc++.so.6
ln -s /usr/local/gcc-12.1/lib64/libstdc++.so.6.0.30 libstdc++.so.6 

Energy Efficiency Across Programming Languages

Main Literature:

Related Links

Related Paper

Discussion on HN