Closed GoogleCodeExporter closed 8 years ago
This problem is due to the default gcc version for Ubuntu 9.10 is not
compatible with
latest version of ACC.
Currently, the ACC compiler only support gcc 4.1 or lower.(gcc 4.2 will fail
some
test cases)
Test Case:
-Download ACC to machine with gcc version higher than 4.1.
-untar ACC by typing "tar -xvf ACC.tar"
-make
The expected result:
...
...
testing: case93 ........pass
testing: case94_argtype ........pass
testing: case95_line ........pass
testing: case96_return_func_pointer ........pass
testing: case97_pragma ........pass
testing: case98_fp ........pass
result:
total=98, succeed = 98 , fail = 0
The actual result:
compile time errors.
Solution:
There is a temporary solution to this problem which is force the system to use
lower
version of gcc.
Attempt #1: Changing default gcc to earlier version.
For Ubuntu 9.04, with gcc-4.3.
Type the following command to download and install gcc-4.1.
>sudo apt-get update
>sudo apt-get install gcc-4.1
go to ../usr/bin to force the system to use gcc-4.1
cd /usr/bin
sudo mv gcc gcc44 # save the current gcc and rename is to gcc44
sudo ln -s gcc-4.1 gcc # force system to use gcc 4.1 by default
After all of the above progress. The default gcc for the system should be
gcc-4.1
You can type "gcc-v" to check your gcc version.
Attempt #2: Compile with earilier version of gcc without change the default gcc.
Step 1:
Download earilier version of gcc.
Step 2:
Use the following command line.
gcc -V <version number> <.c files>
For example:
download gcc-3.4
>sudo apt-get update
>sudo apt-get install gcc-3.4
compile main.c with gcc-3.4
>gcc -V 3.4 main.c
In this way, You should be able to run a newer version of
gcc with a flag to force behavior according
to an older version.
This problem is due to the default gcc version for Ubuntu 9.10 is not
compatible with
latest version of ACC.
*Important: Currently, the ACC compiler only support gcc 4.1 or lower.
Original comment by kedeng1...@gmail.com
on 17 May 2010 at 8:54
This Bug is also reported by Micha Kalfon
Original comment by kedeng1...@gmail.com
on 17 May 2010 at 8:54
This issue is fixed in the latest version. You can now use any version of GCC
to compile ACC
Original comment by lzmliz...@gmail.com
on 19 Jul 2010 at 4:37
Original issue reported on code.google.com by
spei...@fim.uni-passau.de
on 22 Mar 2010 at 10:07Attachments: