[PTLsim-devel] Build Failure gcc 4.1.2

Jorge Albericio
Fri Aug 24 03:27:12 EDT 2007


The problem is with PAGE_SIZE, it is defined in  as a call
to syscall. I had the same problem and I fixed it changing that call
to sysconf by 4096 that is the size of page on my system. Now it is
running




2007/8/24, Christopher Nitta <cjnitta at ucdavis.edu>:
> Hi,
> I downloaded the latest stable version of PTLsim svn revision 219,
> ptlsim-20070512-r219.tar.bz2.
> I am using gcc 4.1.2 on Ubuntu Feisty
> cjnitta at Guiness:~/ptlsim$ uname -a
> Linux Guiness 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686
> GNU/Linux
> cjnitta at Guiness:~/ptlsim$ gcc -dumpversion
> 4.1.2
>
> When I tried to build it, I get the following error:
>
> cjnitta at Guiness:~/ptlsim$ make
> g++ -O99 -g -fomit-frame-pointer -march=pentium4 -falign-functions=16
> -fno-trapping-math -fno-exceptions -fno-rtti -funroll-loops
> -mpreferred-stack-boundary=4 -fno-strict-aliasing -Wreturn-type
> -D__PTLSIM_OOO_ONLY__ -I. -DBUILDHOST="`hostname -f`" -DSVNREV="`svn
> info | grep "Last Changed Rev" | cut -d " " -f4`" -DSVNDATE="`svn info |
> grep "Last Changed Date" | cut -d " " -f4`" -MM ptlsim.cpp kernel.cpp
> mm.cpp superstl.cpp ptlhwdef.cpp decode-core.cpp decode-fast.cpp
> decode-complex.cpp decode-x87.cpp decode-sse.cpp lowlevel-64bit.S
> lowlevel-32bit.S linkstart.S linkend.S uopimpl.cpp dcache.cpp config.cpp
> datastore.cpp injectcode.cpp ptlcalls.c cpuid.cpp ptlstats.cpp klibc.cpp
> glibc.cpp mathlib.cpp syscalls.cpp makeusage.cpp ooocore.cpp ooopipe.cpp
> oooexec.cpp smtcore.cpp smtpipe.cpp smtexec.cpp seqcore.cpp
> branchpred.cpp > .depend
> g++ -O99 -g -fomit-frame-pointer -march=pentium4 -falign-functions=16
> -fno-trapping-math -fno-exceptions -fno-rtti -funroll-loops
> -mpreferred-stack-boundary=4 -fno-strict-aliasing -Wreturn-type
> -D__PTLSIM_OOO_ONLY__ -I. -DBUILDHOST="`hostname -f`" -DSVNREV="`svn
> info | grep "Last Changed Rev" | cut -d " " -f4`" -DSVNDATE="`svn info |
> grep "Last Changed Date" | cut -d " " -f4`" -c linkstart.S
> g++ -c -O99 -g -fomit-frame-pointer -march=pentium4 -falign-functions=16
> -fno-trapping-math -fno-exceptions -fno-rtti -funroll-loops
> -mpreferred-stack-boundary=4 -fno-strict-aliasing -Wreturn-type
> -D__PTLSIM_OOO_ONLY__ -I. -DBUILDHOST="`hostname -f`" -DSVNREV="`svn
> info | grep "Last Changed Rev" | cut -d " " -f4`" -DSVNDATE="`svn info |
> grep "Last Changed Date" | cut -d " " -f4`" -g -O3 lowlevel-32bit.S
> g++ -O99 -g -fomit-frame-pointer -march=pentium4 -falign-functions=16
> -fno-trapping-math -fno-exceptions -fno-rtti -funroll-loops
> -mpreferred-stack-boundary=4 -fno-strict-aliasing -Wreturn-type
> -D__PTLSIM_OOO_ONLY__ -I. -DBUILDHOST="`hostname -f`" -DSVNREV="`svn
> info | grep "Last Changed Rev" | cut -d " " -f4`" -DSVNDATE="`svn info |
> grep "Last Changed Date" | cut -d " " -f4`" -c ptlsim.cpp
> ./ptlhwdef.h:837: error: array bound is not an integer constant
> ./kernel.h: In member function 'Waddr AddressSpace::pageid(void*) const':
> ./kernel.h:145: error: 'long int sysconf(int)' cannot appear in a
> constant-expression
> ./kernel.h:145: error: a function call cannot appear in a
> constant-expression
> ./kernel.h:145: error: template argument 1 is invalid
> make: *** [ptlsim.o] Error 1
>
> It seems to be having a problem with the following line:
> byte padding[PAGE_SIZE - sizeof(ContextBase)];
> I assume it is complaining about the sizeof
>
> Any suggestions would be greatly appreciated.
>
> Thanks,
> Chris
> _______________________________________________
> PTLsim-devel mailing list
> PTLsim-devel at ptlsim.org
> https://ptlsim.org/mailman/listinfo/ptlsim-devel
>


More information about the PTLsim-devel mailing list