On Wed, Jul 11, 2012 at 5:24 AM, Jason Schmidt <[email protected]> wrote:
> I have a 32-bit Ubuntu virtual machine following the instructions from
>
> http://www.droboports.com/setting-up-a-vm
>
> Everything seems to build successfully up until the end of v8
>
>   CXX(target)
> /home/zannalov/code/node-v0.8.2/out/Release/obj.target/v8_base/deps/v8/src/accessors.o
> ...
>   CXX(target)
> /home/zannalov/code/node-v0.8.2/out/Release/obj.target/v8_base/deps/v8/src/platform-posix.o
>
> but when it gets to the snapshot I get the following:
>
>   LINK(target) /home/zannalov/code/node-v0.8.2/out/Release/mksnapshot
> /home/zannalov/code/node-v0.8.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a(builtins.o):
> In function
> `v8::internal::Generate_FrameDropper_LiveEdit(v8::internal::MacroAssembler*)':
> builtins.cc:(.text._ZN2v88internal30Generate_FrameDropper_LiveEditEPNS0_14MacroAssemblerE+0x0):
> undefined reference to
> `v8::internal::Debug::GenerateFrameDropperLiveEdit(v8::internal::MacroAssembler*)'
> /home/zannalov/code/node-v0.8.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a(builtins.o):
> In function
> `v8::internal::Generate_PlainReturn_LiveEdit(v8::internal::MacroAssembler*)':
> builtins.cc:(.text._ZN2v88internal29Generate_PlainReturn_LiveEditEPNS0_14MacroAssemblerE+0x0):
> undefined reference to
> `v8::internal::Debug::GeneratePlainReturnLiveEdit(v8::internal::MacroAssembler*)'
>
> etc. (seems to be every v8 reference is failing)
>
> If I add --without-snapshot to the configure line, it makes it all the way
> to linking node, but still fails the exact same way (no surprise there)
>
>   LINK(target) /home/zannalov/code/node-v0.8.2/out/Release/node
> /home/zannalov/code/node-v0.8.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a(builtins.o):
> In function
> `v8::internal::Generate_FrameDropper_LiveEdit(v8::internal::MacroAssembler*)':
> builtins.cc:(.text._ZN2v88internal30Generate_FrameDropper_LiveEditEPNS0_14MacroAssemblerE+0x0):
> undefined reference to
> `v8::internal::Debug::GenerateFrameDropperLiveEdit(v8::internal::MacroAssembler*)'
> /home/zannalov/code/node-v0.8.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a(builtins.o):
> In function
> `v8::internal::Generate_PlainReturn_LiveEdit(v8::internal::MacroAssembler*)':
> builtins.cc:(.text._ZN2v88internal29Generate_PlainReturn_LiveEditEPNS0_14MacroAssemblerE+0x0):
> undefined reference to
> `v8::internal::Debug::GeneratePlainReturnLiveEdit(v8::internal::MacroAssembler*)'
>
> I've searched and tried a number of things for cross compiling for the ARM
> processor, but nothing seems to get me past this linking problem.
>
> There are a few times the build tries to use the host compiler despite being
> told to use the client compiler, so I've spoofed the toolset for those
> (created a temporary directory and symlinked all the cross-compile commands
> to their simple name, e.g.
> /usr/local/arm-2007q1/bin/arm-none-linux-gnueabi-gcc becomes gcc) and added
> that temporary directory to my path.
>
> In addition to the cross-compile variables that are set from the above
> instructions, I've also set the following (per several instructions I've
> found via Google):
>
> export CSTOOLS=/usr/local/arm-2007q1/
> export CSTOOLS_INC=$CSTOOLS/arm-none-linux-gnueabi/libc/usr/include/
> export CSTOOLS_LIB=$CSTOOLS/arm-none-linux-gnueabi/libc/usr/lib/
> export TARGET_ARCH="-march=armv5t"
> export CCFLAGS="$CCFLAGS -march=armv5t"
> export CXXFLAGS="$CCFLAGS -march=armv5t"
> export CFLAGS="$CFLAGS -O3"
>
> I call make like so:
>
> ./configure --dest-cpu=arm-none-linux-gnueabi --prefix=$DEST
> #--without-snapshot
> make clean
> make
>
> Here is the CPU info from the target machine:
>
> # cat /proc/cpuinfo
> Processor       : ARM926EJ-S rev 0 (v5l)
> BogoMIPS        : 999.42
> Features        : swp half thumb fastmult vfp edsp
> CPU implementer : 0x41
> CPU architecture: 5TE
> CPU variant     : 0x1
> CPU part        : 0x926
> CPU revision    : 0
> Cache type      : write-back
> Cache clean     : cp15 c7 ops
> Cache lockdown  : format C
> Cache format    : Harvard
> I size          : 32768
> I assoc         : 4
> I line length   : 32
> I sets          : 256
> D size          : 32768
> D assoc         : 4
> D line length   : 32
> D sets          : 256
>
> Hardware        : Feroceon-MV78XX0
> Revision        : 0000
> Serial          : 0000000000000000
>
> Any help is greatly appreciated. Thanks!

Cross-compiling for ARM is notoriously difficult but the following
usually works:

  $ ./configure --dest-cpu=arm --without-snapshot
  $ make \
    CC=/path/to/arm-gcc \
    CXX=/path/to/arm-g++ \
    CFLAGS+=-march=armv5t \
    CXXFLAGS+=-march=armv5t \
    LDFLAGS+=

I've left LDFLAGS empty here but you can use it to pass additional
linker switches.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to