Science & Technology
This blog introduces new topics of Science & Technologies. I will post the mobile devices, web service, programming and consumer devices.
2012년 10월 4일 목요일
valgrind error when using ssh connection
error message : valgrind : failed to start tool 'memcheck' for platform 'x86-linux' ...
check : ssh userid@host "env; valgrind"
...
if no "VALGRIND_LIB" settings, you can try again as follow:
check : ssh userid@host "export VALGRIND_LIB=/usr/lib/valgrind; valgrind"
of
check : ssh userid@host "export VALGRIND_LIB=/usr/local/lib/valgrind; valgrind"
...
reason : valgrind cannot found memcheck or callgrind for x86-linux platform, they should be located at valgrind lib directory such as "/usr/lib/valgrind" or "/usr/local/lib/valgrind"
solution
modify sshd_config :
PermitUserEnvironment no --> yes
add user ssh environment file
#> vi ~/.ssh/environment
VALGRIND_LIB=/usr/lib/valgrind
or
VALGRIND_LIB=/usr/local/lib/valgrind
and, you should restart sshd on server.
2010년 10월 18일 월요일
Android (froyo) full source compile on Snow Leopard (MacOS 10.6)
Conditions
MacOS 10.6 (named "Snow Leopard")
Intel/x86 machine
Create new case-sensitive disk image
how to: http://sites.google.com/a/android.com/opensource/download
Install the XCode version 2.4 or later
how to: http://developer.apple.com
Install MacPorts and modify your .bash_profile file.
how to: http://sites.google.com/a/android.com/opensource/download
Note: Please, check the version of gmake
If the version of installed gmake is 3.82, you should downgrade to 3.81
how to:
>sudo port installed gmake
>sudo port install subversion
>svn co -r 71288 http://svn.macports.org/repository/macports/trunk/dports/devel/gmake
>cd gmake
>sudo port install +gmake
The following ports are currently installed:
gmake @3.81_0 (active)
gmake @3.82_0
Install Java-1.5.0 for Leopard
how-to:
>curl -o java.1.5.0-leopard.tar.gz http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.5.0-leopard.tar.gz
>tar -xvzf java.1.5.0-leopard.tar.gz
>sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
>cd /System/Library/Frameworks/JavaVM.framework/Versions/
>sudo rm 1.5.0
>sudo ln -s 1.5.0-leopard 1.5.0
>open /Applications/Utilities/Java\ Preferences.app
Change the preference to as shown in the image below.
You would have to drag and drop different Java version to change the preference.
Install Repo and get Android source files
how to: http://sites.google.com/a/android.com/opensource/download
Build
how to: http://sites.google.com/a/android.com/opensource/download
Solving errors:
case 1:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
In file included from external/qemu/elff/dwarf_die.h:21,
from external/qemu/elff/elf_file.h:20,
from external/qemu/elff/dwarf_cu.cc:20:
external/qemu/elff/elf_alloc.h: In static member function ‘static void* DwarfAllocBase::operator new(size_t)’:
external/qemu/elff/elf_alloc.h:156: warning: ‘operator new’ must not return NULL unless it is declared ‘throw()’ (or -fcheck-new is in effect)
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/emulator-elff_intermediates/elff/dwarf_cu.o] Error 1
solution
>vi external/qemu/Makefile.android
find
MY_CFLAGS += -mdynamic-no-pic
replace
MY_CFLAGS += -mdynamic-no-pic -I /Developer/usr/lib/gcc/i686-apple-darwin10/4.0.1/include/
case 2:
external/v8/src/arm/assembler-arm-inl.h: In constructor
‘v8::internal::Operand::Operand(const v8::internal::ExternalReference&)’:
external/v8/src/arm/assembler-arm-inl.h:172: error: cast from ‘v8::internal::byte*’ to ‘int32_t’ loses precision
In file included from external/v8/src/macro-assembler.h:87,
from external/v8/src/ic-inl.h:33,
from external/v8/src/assembler.cc:39:
external/v8/src/arm/assembler-arm-inl.h: In constructor
‘v8::internal::Operand::Operand(const char*)’:
external/v8/src/arm/assembler-arm-inl.h:165: error: cast from ‘const char*’ to ‘int32_t’ loses precision
external/v8/src/arm/assembler-arm-inl.h: In constructor
‘v8::internal::Operand::Operand(const v8::internal::ExternalReference&)’:
external/v8/src/arm/assembler-arm-inl.h:172: error: cast from ‘v8::internal::byte*’ to ‘int32_t’ loses precision
Solution
>vi build/core/config.mk
find
PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true)
replace
PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true)
ifeq ($(HOST_OS),darwin)
HOST_GLOBAL_CFLAGS += -arch i386
HOST_GLOBAL_CPPFLAGS += -arch i386
HOST_GLOBAL_LDFLAGS += -arch i386
endif
case 3:
ld: warning: in out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a, file is not of required architecture
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [out/host/darwin-x86/obj/EXECUTABLES/acp_intermediates/acp] Error 1
Solution
>vi build/core/combo/darwin-x86.mk
or
>vi build/core/combo/HOST_darwin-x86.mk
find
$(HOST_CXX) \
-dynamiclib -single_module -read_only_relocs suppress \
$(HOST_GLOBAL_LD_DIRS) \
replace
$(HOST_CXX) \
-dynamiclib -single_module -read_only_relocs suppress \
$(HOST_GLOBAL_LD_DIRS) \
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(HOST_GLOBAL_LDFLAGS) \
) \
find
$(HOST_CXX) \
-Wl,-dynamic -headerpad_max_install_names \
$(HOST_GLOBAL_LD_DIRS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
replace
$(HOST_CXX) \
-Wl,-dynamic -headerpad_max_install_names \
$(HOST_GLOBAL_LD_DIRS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(HOST_GLOBAL_LDFLAGS) \
) \
2009년 9월 13일 일요일
2007년 6월 2일 토요일
Robot Runs on 2-Wheeled Scooter

2007년 5월 17일 목요일
Mundie: Future software to exist in the clouds and on your PC
Posted by Robert Vamosi
For all the talk about future software leaving the desktop and running exclusively from services on the Internet, Microsoft chief research and strategy officer Craig Mundie doubts this will be so. Speaking in Los Angeles at WinHEC 2007, Mundie's keynote speech, The Evolution of Computing, described, in part, the future of software. He admitted desktop software has reached a road bump; faster apps will require faster CPUs on the PC and that's becoming harder to accomplish--the old way.
Mundie talked on Tuesday morning about the evolution of multicore processor architecture on desktops and laptops. He said that the 3GHz dual-core processor on today's PCs will soon give way to 3GHz quad-core and then 3GHz eight-cores down the road. The new processors will require new software languages. The new programming languages will run programs in parallel and on multiple platforms--PC, mobile, and the Internet.
Mundie says current software poorly utilizes the full CPU potential of any PC; most of the time our screensaver kicks in and performs no background operations. Mundie predicts new software on the PC will utilize the full potential, being capable of anticipating tasks performed frequently (such as downloading Web mail) and perhaps executing these before we sit down to the computer in the morning. Given the PC will soon become a "supercomputer on a die," capable of fast, parallel computations, he says there's room for both Internet-based services and a robust new environment for PC software development.
2007년 4월 2일 월요일
Touch screen without touch!?
Touch screens are certainly cool when used in the right place. Touch screen tech isn’t all that great for those who have used it to replace a PC mouse. The pointer never seems to go where you want it too. Another big side effect is that you end up with gobs of greasy fingerprints all over your screen.
A company called TouchKo has a solution for the dirty display woes associated with touch screens in the form of a touch screen you don’t have to touch; it relies on sensors that allow you to control the screen from up to six inches away. Intended for medical use the technology behind it will likely make its way to consumer gear at some point. Story and image via Sci Fi Tech.

Reference news :
A touchscreen you don't need to touch
Touchscreens are all the rage these days, what with the upcoming iPhone bringing them to the forefront of the gadget world. They aren't without their drawbacks, however. The lack of tactile feedback generally makes them difficult to control, at least until you get used to it, and you end up getting greasy thumbprints all over the nice, shiny screen of your flashy new device.
This touchscreen monitor from TouchKo might not solve that first problem, but at least it'll stay clean for you after a lot of use. That's because it's a touchscreen you don't even need to touch, instead relying on sensors to be controlled from up to 6 inches away. Just wave your hand near it and it'll understand your gesture and translate it into a command. It's designed for medical use, but it'll be interesting to see what consumer applications this makes its way into. Hit the jump for a video of the screen in action. — Adam Frucci
A touchscreen you don't need to touch