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

Model Smoothness Can Predict Intra Domain and Out of Domain Generalization

Paper: Predicting Out-of-Domain Generalization with Local Manifold Smoothness

Code: none yet

You Only Look Once (YOLO) Object Detection Models

YOLOv1

Code

Paper: JOseph Redmon, Santosh Divvala, Ross Girshick, Ali Farhadi, “You Only Look Once: Unified, Real-Time Object Detection“, 2016

Code: https://github.com/AlexeyAB/darknet

YOLOv2

Paper: “YOLO9000:Better, Faster, Stronger

Code: https://pjreddie.com/darknet/yolov2/

YOLOv3

Paper: YOLOv3: An Incremental Improvement

Code: https://pjreddie.com/darknet/yolo/

YOLOv4

Paper:

Code:

YOLOv5

Paper: none yet

Code: https://github.com/ultralytics/yolov5

YOLOv6

Paper: none yet

Code: https://github.com/meituan/YOLOv6

YOLOv7

Official YOLOv7 (state-of-the-art real-time detector) is more accurate and faster than:

  • – YOLOv5 by 120% FPS
  • – YOLOX by 180% FPS
  • – Dual-Swin-T by 1200% FPS
  • – ConvNext by 550% FPS
  • – SWIN-L CM-RCNN by 500% FPS
  • – PPYOLOE-X by 150% FPS

Paper: Chien-Yao Wang, Alexey Bochkovskiy, Hong-Yuan Mark Liao, YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors, 2022

Code: https://github.com/WongKinYiu/yolov7/releases

References

  • A Brief History of YOLO Object Detection Models From YOLOv1 to YOLOv5

Ethereum Merge

Update: March 24,2022

Ethereum
The Merge

Eventually the current Ethereum Mainnet will "merge" with the beacon chain proof-of-stake system.
This will mark the end of proof-of-work for Ethereum, and the full transition to proof-of-stake.
This is planned to precede the roll out of shard chains.
We formerly referred to this as "the docking."
This upgrade represents the official switch to proof-of-stake consensus. This eliminates the need for energy-intensive mining, and instead secures the network using staked ether. A truly exciting step in realizing the Ethereum vision – more scalability, security, and sustainability.

Reference: https://ethereum.org/en/upgrades/merge/