Hi Paul, Thanks for your detailed response. But now I am bit confused about what do you mean by target.
Here is my build procedure: I am building on Linux x86 machine with following environment variables set: export CCPATH=/opt/kenati/mips-kenati-linux-uclibc/bin export CC=$CCPATH/gcc export CXX=$CCPATH/g++ export LD=$CCPATH/ld export AR=$CCPATH/ar export RANLIB=$CCPATH/ranlib Build command: scons arch=mips mode=debug library=static sample=shell -j4 Output: libv8.a is getting compiled. But giving endianness errors for shell. So I have question here, I am going to use libv8.a with v8cgi and apache. So can I survive currently with just v8 library build. I do not require shell at this point of time. Thanks & Regards, Nilima On Tue, Jul 13, 2010 at 11:32 PM, paul lind <[email protected]> wrote: > Hi Nilima - > > I'll try to answer your questions: > > 1. Alexandre is correct, you must make sure you are using the > 'integration' branch (it is the default). > > 2. Per your command, you built libv8 for arch=mips, but you are trying > to build your shell for the simulator (simulator=mips). You cannot mix > the two. The simulator for local testing on your x86 development > platform, but if you want to build the shell for your target, you must > use a line like: > > scons arch=mips mode=debug library=static sample=shell -j4 > > (note that I left out regexp=interpreted. That is no longer needed, > since we now have the native regular expression compiler working. I > have updated the wiki page > http://wiki.github.com/paul99/v8mips/building-v8mips) > > 3. I see from your build log that it appears that your target is beg- > endian. That is unfortunately, as v8mips does not currently support > big-endian targets. That will get done eventually, but it is low on > our priority list. Is there any way your target can be run in little- > endian mode? (the mips cores are configurable, some target boards are > configurable, some are fixed). > > I know for a fact there are places in the generated code where we make > little-endian assumptions (we have commented these), but I suspect > that there will be more issues, as to my knowledge the whole of v8 has > never been run on a big-endian target. > > 4. I also see that you are using uclibc. I do not know if that will > work, as it has not been tried. We have been using a mips Linux distro > with full glibc (both Debian and Timesys). We are now porting to > Android, which uses bionic. > > 5. The issue you fixed with mcontext.gpregs is just used when > profiling. I have only tried that on Linux 2.6. It is possibly you > just have a problem with kernel-headers, or it may be that your kernel > does not support. In any cause, it will not impact regular operation > of v8, just the profiling option (--prof option to shell). > > I hope this helps, > > paul > > On Jul 13, 2:57 am, Alexandre Rames <[email protected]> wrote: > > Hi, > > > > It has been some time I haven't build it. > > There is something weird with the endianness here. The MIPS build should > use > > the -EL option to build for little endian. > > > > Did you follow the instructions > > here<http://wiki.github.com/paul99/v8mips/building-v8mips> > > ? > > Also you should try to build the "integration" branch. This branch should > > always compile and work (kind of dev branch). > > > > Alexandre > > > > On Mon, Jul 12, 2010 at 3:26 PM, Nilima Chavan <[email protected] > >wrote: > > > > > > > > > Finally i was able to build the libv8.a successfully with following > > > command line: > > > scons arch=mips mode=debug regexp=interpreted library=static > > > > > Have done following changes in platform-linux.cc > > > #elif V8_HOST_ARCH_MIPS > > > sample.pc = reinterpret_cast<Address>(mcontext.gpregs[35]); > > > sample.sp = reinterpret_cast<Address>(mcontext.gpregs[29]); > > > sample.fp = reinterpret_cast<Address>(mcontext.gpregs[30]); > > > #endif > > > > > But still I am not able to build shell with following command: > > > scons mode=debug simulator=mips regexp=interpreted sample=shell -j4 > > > > > It is giving following kind of error: > > > /opt/kenati/lib/gcc/mips-kenati-linux-uclibc/3.4.3/../../../../mips- > > > kenati-linux-uclibc/bin/ld: /opt/kenati/lib/gcc/mips-kenati-linux- > > > uclibc/3.4.3/../../../../mips-kenati-linux-uclibc/lib/crt1.o: compiled > > > for a big endian system and target is little endian > > > /opt/kenati/lib/gcc/mips-kenati-linux-uclibc/3.4.3/../../../../mips- > > > kenati-linux-uclibc/bin/ld: /opt/kenati/lib/gcc/mips-kenati-linux- > > > uclibc/3.4.3/../../../../mips-kenati-linux-uclibc/lib/crt1.o: > > > endianness incompatible with that of the selected emulation > > > /opt/kenati/lib/gcc/mips-kenati-linux-uclibc/3.4.3/../../../../mips- > > > kenati-linux-uclibc/bin/ld: failed to merge target specific data of > > > file /opt/kenati/lib/gcc/mips-kenati-linux-uclibc/3.4.3/../../../../ > > > mips-kenati-linux-uclibc/lib/crt1.o > > > > > Please let me know if I need to any kind of environment settings for > > > this too. > > > > > Thanks & Regards, > > > Nilima > > > > > On Jul 12, 5:57 pm, Nilima Chavan <[email protected]> wrote: > > > > Thanks for the info Alexandre. > > > > > > I have downloaded v8 sources from github. > > > > But when I tried to build those sources for mips platform its giving > > > > compilation error. > > > > I am building the source code on UBuntu 8 (Linux 2.6.24-16-generic #1 > > > > SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux). > > > > > > Environment variables are as below: > > > > AR=/opt/kenati/bin/mips_sfp-uclibc-ar > > > > LD=/opt/kenati/bin/mips_sfp-uclibc-ld > > > > CXX=/opt/kenati/bin/mips_sfp-uclibc-g++ > > > > CC=/opt/kenati/bin/mips_sfp-uclibc-gcc > > > > RANLIB=/opt/kenati/bin/mips_sfp-uclibc-ranlib > > > > > > Compilation Error: > > > > opt/kenati/bin/mips_sfp-uclibc-g++ -o obj/release/platform-linux.o -c > - > > > > Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic > -EL > > > > -mips32r2 -Wa,-mips32r2 -fno-inline -mhard-float -O3 -fomit-frame- > > > > pointer -fdata-sections -ffunction-sections -ansi > -fno-strict-aliasing > > > > -fno-rtti -fno-exceptions -Wall -Werror -W -Wno-unused-parameter > -Wnon- > > > > virtual-dtor -pedantic -EL -mips32r2 -Wa,-mips32r2 -fno-inline > -mhard- > > > > float -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections - > > > > ansi -fno-strict-aliasing -DV8_TARGET_ARCH_MIPS - > > > > DENABLE_DEBUGGER_SUPPORT -DENABLE_LOGGING_AND_PROFILING -Isrc src/ > > > > platform-linux.cc > > > > > > src/platform-linux.cc: In function `void > > > > v8::internal::ProfilerSignalHandler(int, siginfo_t*, void*)': > > > > src/platform-linux.cc:828: error: 'struct mcontext_t' has no member > > > > named 'pc' > > > > src/platform-linux.cc:829: error: 'struct mcontext_t' has no member > > > > named 'gregs' > > > > src/platform-linux.cc:830: error: 'struct mcontext_t' has no member > > > > named 'gregs' > > > > scons: *** [obj/release/platform-linux.o] Error 1 > > > > scons: building terminated because of errors. > > > > > > Can anybody from your side help me on this? > > > > Thanks & Regards, > > > > Nilima > > > > > > On Jul 9, 6:39 pm, Alexandre Rames <[email protected]> > wrote: > > > > > > > Hi, > > > > > > > You can find the v8 MIPS repository with the latest code on github: > > >http://github.com/paul99/v8mips > > > > > > > <http://github.com/paul99/v8mips>Alexandre > > > > > > > On Fri, Jul 9, 2010 at 1:02 PM, Nilima Chavan < > [email protected] > > > >wrote: > > > > > > > > So we can not use v8 JavaScript engine on MIPs platform? > > > > > > Does anybody working on this. Since I see mips directory under > > > > > > Sources. Even SConstruct provides a way to select the > architecture as > > > > > > "mips". > > > > > > If yes can you let us know when the work is expected to get over. > > > > > > > > Thanks & Regards, > > > > > > Nilima > > > > > > > > On Jul 9, 1:41 am, Erik Corry <[email protected]> wrote: > > > > > > > The MIPS port isn't done. It doesn't work. > > > > > > > > > Den 8. jul. 2010 14.12 skrev Nilima Chavan < > > > [email protected]>: > > > > > > > > > > When I am trying to build v8 for MIP platform, I am getting > > > following > > > > > > > > errors: > > > > > > > > $ scons simulator=mips > > > > > > > > > > In file included from src/virtual-frame.h:41, > > > > > > > > from src/virtual-frame-inl.h:31, > > > > > > > > from src/codegen.cc:41: > > > > > > > > src/mips/virtual-frame-mips.h:74: error: 'NumberInfo' has not > > > been > > > > > > > > declared > > > > > > > > src/mips/virtual-frame-mips.h:366: error: 'NumberInfo' has > not > > > been > > > > > > > > declared > > > > > > > > src/mips/virtual-frame-mips.h:390: error: 'NumberInfo' has > not > > > been > > > > > > > > declared > > > > > > > > src/mips/virtual-frame-mips.h:391: error: 'NumberInfo' has > not > > > been > > > > > > > > declared > > > > > > > > src/mips/virtual-frame-mips.h:74: error: 'NumberInfo' has not > > > been > > > > > > > > declared > > > > > > > > src/mips/virtual-frame-mips.h:366: error: 'NumberInfo' has > not > > > been > > > > > > > > declared > > > > > > > > In file included from src/virtual-frame-inl.h:36, > > > > > > > > from src/codegen.cc:41: > > > > > > > > src/virtual-frame-light-inl.h: In constructor > > > > > > > > 'v8::internal::VirtualFrame::VirtualFrame()': > > > > > > > > src/virtual-frame-light-inl.h:41: error: class > > > > > > > > 'v8::internal::VirtualFrame' does not have any field named > > > > > > > > 'element_count_' > > > > > > > > src/virtual-frame-light-inl.h:42: error: class > > > > > > > > 'v8::internal::VirtualFrame' does not have any field named > > > > > > > > 'top_of_stack_state_' > > > > > > > > src/virtual-frame-light-inl.h:42: error: 'NO_TOS_REGISTERS' > was > > > not > > > > > > > > declared in this scope > > > > > > > > src/virtual-frame-light-inl.h:43: error: class > > > > > > > > 'v8::internal::VirtualFrame' does not have any field named > > > > > > > > 'register_allocation_map_' > > > > > > > > src/virtual-frame-light-inl.h:43: error: no matching function > for > > > call > > > > > > > > to > > > 'v8::internal::ZoneList<v8::internal::FrameElement>::ZoneList()' > > > > > > > > src/zone.h:170: note: candidates are: > > > > > > > > v8::internal::ZoneList<T>::ZoneList(int) [with T = > > > > > > > > v8::internal::FrameElement] > > > > > > > > src/zone.h:166: note: > > > > > v8::internal::ZoneList<v8::internal::FrameElement>::ZoneList(const > > > > > > > > v8::internal::ZoneList<v8::internal::FrameElement>&) > > > > > > > > src/virtual-frame-light-inl.h: In constructor > > > > > > 'v8::internal::VirtualFrame::VirtualFrame(v8::internal::VirtualFrame*)': > > > > > > > > src/virtual-frame-light-inl.h:48: error: class > > > > > > > > 'v8::internal::VirtualFrame' does not have any field named > > > > > > > > 'element_count_' > > > > > > > > src/virtual-frame-light-inl.h:49: error: class > > > > > > > > 'v8::internal::VirtualFrame' does not have any field named > > > > > > > > 'top_of_stack_state_' > > > > > > > > src/virtual-frame-light-inl.h:49: error: 'class > > > > > > > > v8::internal::VirtualFrame' has no member named > > > 'top_of_stack_state_' > > > > > > > > src/virtual-frame-light-inl.h:50: error: class > > > > > > > > 'v8::internal::VirtualFrame' does not have any field named > > > > > > > > 'register_allocation_map_' > > > > > > > > src/virtual-frame-light-inl.h:50: error: 'class > > > > > > > > v8::internal::VirtualFrame' has no member named > > > > > > > > 'register_allocation_map_' > > > > > > > > src/virtual-frame-light-inl.h:50: error: no matching function > for > > > call > > > > > > > > to > > > 'v8::internal::ZoneList<v8::internal::FrameElement>::ZoneList()' > > > > > > > > src/zone.h:170: note: candidates are: > > > > > > > > v8::internal::ZoneList<T>::ZoneList(int) [with T = > > > > > > > > v8::internal::FrameElement] > > > > > > > > src/zone.h:166: note: > > > > > v8::internal::ZoneList<v8::internal::FrameElement>::ZoneList(const > > > > > > > > v8::internal::ZoneList<v8::internal::FrameElement>&) > > > > > > > > src/virtual-frame-light-inl.h: In member function 'bool > > > > > > > > > v8::internal::VirtualFrame::Equals(v8::internal::VirtualFrame*)': > > > > > > > > src/virtual-frame-light-inl.h:55: error: > 'top_of_stack_state_' > > > was not > > > > > > > > declared in this scope > > > > > > > > src/virtual-frame-light-inl.h:55: error: 'class > > > > > > > > v8::internal::VirtualFrame' has no member named > > > 'top_of_stack_state_' > > > > > > > > src/virtual-frame-light-inl.h:56: error: > > > 'register_allocation_map_' > > > > > > > > was not declared in this scope > > > > > > > > src/virtual-frame-light-inl.h:56: error: 'class > > > > > > > > v8::internal::VirtualFrame' has no member named > > > > > > > > 'register_allocation_map_' > > > > > > > > src/codegen.cc: At global scope: > > > > > > > > src/codegen.cc:325: error: 'GenerateCallFunction' is not a > member > > > of > > > > > > > > 'v8::internal::CodeGenerator' > > > > > > > > src/codegen.cc:325: error: 'GenerateRegExpConstructResult' is > not > > > a > > > > > > > > member of 'v8::internal::CodeGenerator' > > > > > > > > src/codegen.cc:325: error: 'GenerateGetFromCache' is not a > member > > > of > > > > > > > > 'v8::internal::CodeGenerator' > > > > > > > > src/codegen.cc:325: error: 'GenerateSwapElements' is not a > member > > > of > > > > > > > > 'v8::internal::CodeGenerator' > > > > > > > > cc1plus: warnings being treated as errors > > > > > > > > src/mips/virtual-frame-mips.h:486: warning: inline function > 'void > > > > > > > > v8::internal::VirtualFrame::PushFrameSlotAt(int)' used but > never > > > > > > > > defined... > > > > read more » > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
