Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Error #1

Closed
agyaglikci opened this issue Jan 6, 2016 · 2 comments
Closed

Compilation Error #1

agyaglikci opened this issue Jan 6, 2016 · 2 comments

Comments

@agyaglikci
Copy link

I'm trying to compile CACTI 6.5 (a clone of this repo) on a Ubuntu 14.04 64-bit system and gcc 4.8.4. make command gives me the following error:

g++ -m32 -Wno-unknown-pragmas  -O3 -msse2 -mfpmath=sse -DNTHREADS=4 -Icacti  -c cacti/Ucache.cc -o obj_opt/Ucache.o
In file included from /usr/include/c++/4.8/bits/stl_algo.h:59:0,
                 from /usr/include/c++/4.8/algorithm:62,
                 from cacti/Ucache.cc:50:
/usr/include/c++/4.8/cstdlib:178:10: error: expected unqualified-id before ‘__int128’
   inline __int128

As far as I understand from other occurrences of this error, it's some how related with 32-bit 64-bit difference.
The CACTI in McPAT also gives the same error.
How can I walk around this problem?
Which platform do you prefer for these simulators?

@nicmcd
Copy link
Member

nicmcd commented Jan 6, 2016

Any Linux platform should work fine. I've also had issues with this. For me, I removed the two "-m32" instances in cacti.mk and it worked fine (although my error was different than yours).

I believe the next cacti release will have a cleaned up makefile.

@agyaglikci
Copy link
Author

That worked perfect! The only necessary change was removing -m32 as you said.

diff --git a/cacti.mk b/cacti.mk
index b76f38f..238fdee 100644
--- a/cacti.mk
+++ b/cacti.mk
@@ -21,8 +21,8 @@ endif

 #CXXFLAGS = -Wall -Wno-unknown-pragmas -Winline $(DBG) $(OPT) 
 CXXFLAGS = -Wno-unknown-pragmas $(DBG) $(OPT) 
-CXX = g++ -m32
-CC  = gcc -m32
+CXX = g++ 
+CC  = gcc 

 SRCS  = area.cc bank.cc mat.cc main.cc Ucache.cc io.cc technology.cc basic_circuit.cc parameter.cc \
                decoder.cc component.cc uca.cc subarray.cc wire.cc htree2.cc \

Just in case anybody has trouble like some file is not found, I also needed to add 3 directories to C++ Include Path for my system as follows:

CPLUS_INCLUDE_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8:/usr/include/x86_64-linux-gnu/c++/4.8:/usr/include/x86_64-linux-gnu
export CPLUS_INCLUDE_PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants